[dpdk-dev] [PATCH 7/8] net/vmxnet3: correct offload not supported mask

Xiaolong Ye xiaolong.ye at intel.com
Sat Oct 27 12:40:31 CEST 2018


Previously XXX_TX_OFFLOAD_NOTSUP_MASK is obtained via xor which would lead
to unexpected result, correct it by using a NOT-AND operation.

Fixes: baf3bbae5556 ("net/vmxnet3: add Tx preparation")

Cc: konstantin.ananyev at intel.com
Cc: stable at dpdk.org
Signed-off-by: Xiaolong Ye <xiaolong.ye at intel.com>
---
 drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index cf85f3d61..ab3505886 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -54,7 +54,7 @@
 		PKT_TX_TCP_SEG)
 
 #define	VMXNET3_TX_OFFLOAD_NOTSUP_MASK	\
-	(PKT_TX_OFFLOAD_MASK ^ VMXNET3_TX_OFFLOAD_MASK)
+	~(PKT_TX_OFFLOAD_MASK & VMXNET3_TX_OFFLOAD_MASK)
 
 static const uint32_t rxprod_reg[2] = {VMXNET3_REG_RXPROD, VMXNET3_REG_RXPROD2};
 
-- 
2.17.1



More information about the dev mailing list