[2/8] net/avf: correct offload not supported mask

Message ID 20181027104032.10251-3-xiaolong.ye@intel.com (mailing list archive)
State Rejected, archived
Delegated to: Ferruh Yigit
Headers
Series Correct XXX_TX_OFFLOAD_NOTSUP_MASK |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Xiaolong Ye Oct. 27, 2018, 10:40 a.m. UTC
  Previously AVF_TX_OFFLOAD_NOTSUP_MASK is obtained via xor which would lead
to unexpected result, correct it by using a NOT-AND operation.

Fixes: a2b29a7733ef ("net/avf: enable basic Rx Tx")

Cc: wenzhuo.lu@intel.com
Cc: stable@dpdk.org
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/avf/avf_rxtx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/drivers/net/avf/avf_rxtx.h b/drivers/net/avf/avf_rxtx.h
index 898d2f387..5583b68be 100644
--- a/drivers/net/avf/avf_rxtx.h
+++ b/drivers/net/avf/avf_rxtx.h
@@ -49,7 +49,7 @@ 
 		PKT_TX_TCP_SEG)
 
 #define AVF_TX_OFFLOAD_NOTSUP_MASK \
-		(PKT_TX_OFFLOAD_MASK ^ AVF_TX_OFFLOAD_MASK)
+		~(PKT_TX_OFFLOAD_MASK & AVF_TX_OFFLOAD_MASK)
 
 /* HW desc structure, both 16-byte and 32-byte types are supported */
 #ifdef RTE_LIBRTE_AVF_16BYTE_RX_DESC