diff mbox series

[ovs-dev,v3,dpdk-latest,1/3] netdev-dpdk: Update for DPDK CRC strip flags change.

Message ID 20181115183543.13416-2-ktraynor@redhat.com
State Superseded
Delegated to: Ian Stokes
Headers show
Series Update to DPDK 18.11-rc3 | expand

Commit Message

Kevin Traynor Nov. 15, 2018, 6:35 p.m. UTC
DEV_RX_OFFLOAD_CRC_STRIP has been removed from
DPDK 18.11. DEV_RX_OFFLOAD_KEEP_CRC can now be
used to keep the CRC. Use the correct flag and
check it is supported.

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
 lib/netdev-dpdk.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Stokes, Ian Nov. 22, 2018, 9:43 a.m. UTC | #1
On 11/15/2018 6:35 PM, Kevin Traynor wrote:
> DEV_RX_OFFLOAD_CRC_STRIP has been removed from
> DPDK 18.11. DEV_RX_OFFLOAD_KEEP_CRC can now be
> used to keep the CRC. Use the correct flag and
> check it is supported.
> 
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
> ---
>   lib/netdev-dpdk.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
> index 1480bf8d1..c586144f5 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -930,6 +930,7 @@ dpdk_eth_dev_port_config(struct netdev_dpdk *dev, int n_rxq, int n_txq)
>       }
>   
> -    if (dev->hw_ol_features & NETDEV_RX_HW_CRC_STRIP) {
> -        conf.rxmode.offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
> +    if (!(dev->hw_ol_features & NETDEV_RX_HW_CRC_STRIP)
> +        && info.rx_offload_capa & DEV_RX_OFFLOAD_KEEP_CRC) {
> +        conf.rxmode.offloads |= DEV_RX_OFFLOAD_KEEP_CRC;
>       }

Thanks for this Kevin, resolves the previous issue reported.

Ian

>   
>
diff mbox series

Patch

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 1480bf8d1..c586144f5 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -930,6 +930,7 @@  dpdk_eth_dev_port_config(struct netdev_dpdk *dev, int n_rxq, int n_txq)
     }
 
-    if (dev->hw_ol_features & NETDEV_RX_HW_CRC_STRIP) {
-        conf.rxmode.offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
+    if (!(dev->hw_ol_features & NETDEV_RX_HW_CRC_STRIP)
+        && info.rx_offload_capa & DEV_RX_OFFLOAD_KEEP_CRC) {
+        conf.rxmode.offloads |= DEV_RX_OFFLOAD_KEEP_CRC;
     }