From 3382eb3a3ae2866a2e59fecdd5c3ca2926f59f57 Mon Sep 17 00:00:00 2001 From: Ophir Munk Date: Tue, 13 Feb 2018 08:14:25 +0000 Subject: [PATCH] net/tap: add CRC stripping capability CRC stripping is executed in the kernel outside of TAP PMD scope. There is no prevention that the TAP PMD will report on Rx CRC stripping capability. In the corrupted code, TAP PMD did not report on this capability. The fix enables TAP PMD to report that Rx CRC stripping is supported. Fixes: 02f96a0a82d1 ("net/tap: add TUN/TAP device PMD") 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 9d39384ac5..f09db0ea9d 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.20.1