]> git.droids-corp.org - dpdk.git/commitdiff
net/tap: add CRC stripping capability
authorOphir Munk <ophirmu@mellanox.com>
Tue, 13 Feb 2018 08:14:25 +0000 (08:14 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 13 Feb 2018 17:17:30 +0000 (18:17 +0100)
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 <ophirmu@mellanox.com>
drivers/net/tap/rte_eth_tap.c

index 9d39384ac5cadd15977f8fa1a340cd68c43d993e..f09db0ea9deccc8936e5b4b917c4601bade2b723 100644 (file)
@@ -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