From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ophir Munk Subject: [PATCH v1] net/tap: fix CRC stripping capability report Date: Mon, 12 Feb 2018 14:43:18 +0000 Message-ID: <1518446598-24238-1-git-send-email-ophirmu@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Thomas Monjalon , Olga Shern , Ophir Munk , stable@dpdk.org To: dev@dpdk.org, Pascal Mazon Return-path: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" CRC stripping is executed outside of TAP PMD scope. There is no prevention that TAP reports on Rx CRC stripping capability. It is especially required when TAP is operating as failsafe sub-device with another PCI sub-device which supports CRC stripping. In the corrupted code TAP did not report on this capability which caused failsafe to not report on it as well. The fix is for TAP to report that Rx CRC stripping is supported. Fixes: 95ae196ae10b ("net/tap: use new Rx offloads API") Cc: stable@dpdk.org Signed-off-by: Ophir Munk --- drivers/net/tap/rte_eth_tap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 9d39384..f09db0e 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -261,7 +261,8 @@ tap_rx_offload_get_port_capa(void) return DEV_RX_OFFLOAD_SCATTER | DEV_RX_OFFLOAD_IPV4_CKSUM | DEV_RX_OFFLOAD_UDP_CKSUM | - DEV_RX_OFFLOAD_TCP_CKSUM; + DEV_RX_OFFLOAD_TCP_CKSUM | + DEV_RX_OFFLOAD_CRC_STRIP; } static uint64_t @@ -270,7 +271,8 @@ tap_rx_offload_get_queue_capa(void) return DEV_RX_OFFLOAD_SCATTER | DEV_RX_OFFLOAD_IPV4_CKSUM | DEV_RX_OFFLOAD_UDP_CKSUM | - DEV_RX_OFFLOAD_TCP_CKSUM; + DEV_RX_OFFLOAD_TCP_CKSUM | + DEV_RX_OFFLOAD_CRC_STRIP; } static bool -- 2.7.4