summaryrefslogtreecommitdiff
path: root/lib/librte_pmd_e1000
diff options
context:
space:
mode:
authorIvan Boule <ivan.boule@6wind.com>2013-04-16 14:42:33 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2013-11-24 21:31:37 +0100
commite2daaf5cbcecd77260c492fc5433382f7d713a65 (patch)
treed589e21ab22634144877dc7bdeb234da2041c6dd /lib/librte_pmd_e1000
parentc9c0579c5f4de5a0001f7b575d549f09fecaa2f0 (diff)
downloaddpdk-e2daaf5cbcecd77260c492fc5433382f7d713a65.zip
dpdk-e2daaf5cbcecd77260c492fc5433382f7d713a65.tar.gz
dpdk-e2daaf5cbcecd77260c492fc5433382f7d713a65.tar.xz
ethdev: add support for device offload capabilities
1) Make device RX and TX offload capabilities to be returned in the rte_eth_dev_info data structure by the function rte_eth_dev_info_get The following initial set of RX offload capabilities are defined: - VLAN header stripping - IPv4 header checksum check - UDP checksum check - TCP checksum check - TCP large receive offload (LRO) The following initial set of TX offload capabilities are defined: - VLAN header insertion - IPv4 header checksum computation - UDP checksum computation - TCP checksum computation - SCTP checksum computation - TCP segmentation offload (Transmit Segmentation Offload) - UDP segmentation offload 2) Update the eth_dev_infos_get() function of the igb and ixgbe PMDs to return the offload capabilities which are supported by the device and that are effectively managed by the driver. Signed-off-by: Ivan Boule <ivan.boule@6wind.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Diffstat (limited to 'lib/librte_pmd_e1000')
-rw-r--r--lib/librte_pmd_e1000/igb_ethdev.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/librte_pmd_e1000/igb_ethdev.c b/lib/librte_pmd_e1000/igb_ethdev.c
index 4561af2..9dabc59 100644
--- a/lib/librte_pmd_e1000/igb_ethdev.c
+++ b/lib/librte_pmd_e1000/igb_ethdev.c
@@ -1125,6 +1125,17 @@ eth_igb_infos_get(struct rte_eth_dev *dev,
dev_info->min_rx_bufsize = 256; /* See BSIZE field of RCTL register. */
dev_info->max_rx_pktlen = 0x3FFF; /* See RLPML register. */
dev_info->max_mac_addrs = hw->mac.rar_entry_count;
+ dev_info->rx_offload_capa =
+ DEV_RX_OFFLOAD_VLAN_STRIP |
+ DEV_RX_OFFLOAD_IPV4_CKSUM |
+ DEV_RX_OFFLOAD_UDP_CKSUM |
+ DEV_RX_OFFLOAD_TCP_CKSUM;
+ dev_info->tx_offload_capa =
+ DEV_TX_OFFLOAD_VLAN_INSERT |
+ DEV_TX_OFFLOAD_IPV4_CKSUM |
+ DEV_TX_OFFLOAD_UDP_CKSUM |
+ DEV_TX_OFFLOAD_TCP_CKSUM |
+ DEV_TX_OFFLOAD_SCTP_CKSUM;
switch (hw->mac.type) {
case e1000_82575: