From 745d58e0df5b5a7fee6c9c9bac142da67d9bbc88 Mon Sep 17 00:00:00 2001 From: Xiaoyun Li Date: Fri, 2 Feb 2018 13:45:16 +0800 Subject: [PATCH] net/i40e: fix CRC strip enabling New testpmd will get CRC strip offload from rx_offload_capa. I40evf cannot disable CRC strip. And in fact, it is enabled by PF. This patch solves the issue by adding CRC strip flag into rx_offload_capa in i40e and i40evf. Fixes: 8b9bd0efe0b6 ("app/testpmd: disable Rx VLAN offloads by default") Signed-off-by: Xiaoyun Li Acked-by: Beilei Xing --- drivers/net/i40e/i40e_ethdev.c | 3 ++- drivers/net/i40e/i40e_ethdev_vf.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index a7fa5e511d..a07c2deded 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -3084,7 +3084,8 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) DEV_RX_OFFLOAD_IPV4_CKSUM | DEV_RX_OFFLOAD_UDP_CKSUM | DEV_RX_OFFLOAD_TCP_CKSUM | - DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM; + DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | + DEV_RX_OFFLOAD_CRC_STRIP; dev_info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT | DEV_TX_OFFLOAD_QINQ_INSERT | diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 7e5c6e901f..708756e064 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -2195,7 +2195,8 @@ i40evf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) DEV_RX_OFFLOAD_IPV4_CKSUM | DEV_RX_OFFLOAD_UDP_CKSUM | DEV_RX_OFFLOAD_TCP_CKSUM | - DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM; + DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | + DEV_RX_OFFLOAD_CRC_STRIP; dev_info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT | DEV_TX_OFFLOAD_QINQ_INSERT | -- 2.20.1