* [dpdk-dev] [PATCH 1/2] mbuf: fix bitmask of Tx offload flags
@ 2017-01-24 11:50 Jingjing Wu
2017-01-24 11:50 ` [dpdk-dev] [PATCH 2/2] net/i40e: fix bitmask of supported Tx flags Jingjing Wu
` (2 more replies)
0 siblings, 3 replies; 39+ messages in thread
From: Jingjing Wu @ 2017-01-24 11:50 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang, tomaszx.kulasek
Some Tx offload flags are missed in bitmask of all supported packet
Tx offload features flags.
This patch fixes it.
Fixes: 4fb7e803eb1a ("ethdev: add Tx preparation")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
lib/librte_mbuf/rte_mbuf.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index bfce9f4..e57a4d2 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -295,8 +295,12 @@ extern "C" {
*/
#define PKT_TX_OFFLOAD_MASK ( \
PKT_TX_IP_CKSUM | \
+ PKT_TX_IPV4 | \
+ PKT_TX_IPV6 | \
PKT_TX_L4_MASK | \
PKT_TX_OUTER_IP_CKSUM | \
+ PKT_TX_OUTER_IPV4 | \
+ PKT_TX_OUTER_IPV6 | \
PKT_TX_TCP_SEG | \
PKT_TX_QINQ_PKT | \
PKT_TX_VLAN_PKT | \
--
2.4.11
^ permalink raw reply [flat|nested] 39+ messages in thread
* [dpdk-dev] [PATCH 2/2] net/i40e: fix bitmask of supported Tx flags
2017-01-24 11:50 [dpdk-dev] [PATCH 1/2] mbuf: fix bitmask of Tx offload flags Jingjing Wu
@ 2017-01-24 11:50 ` Jingjing Wu
2017-01-26 14:19 ` [dpdk-dev] [PATCH 1/2] mbuf: fix bitmask of Tx offload flags Ferruh Yigit
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 0/5] fix bitmask of supported Tx flags Jingjing Wu
2 siblings, 0 replies; 39+ messages in thread
From: Jingjing Wu @ 2017-01-24 11:50 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang, tomaszx.kulasek
Some Tx offload flags are missed in bitmask of all supported packet
Tx flags by i40e.
This patch fixes it.
Fixes: 3f33e643e5c6 ("net/i40e: add Tx preparation")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/i40e_rxtx.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 89b9bf1..509d379 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -83,11 +83,16 @@
#define I40E_TX_OFFLOAD_MASK ( \
PKT_TX_IP_CKSUM | \
+ PKT_TX_IPV4 | \
+ PKT_TX_IPV6 | \
PKT_TX_L4_MASK | \
PKT_TX_OUTER_IP_CKSUM | \
+ PKT_TX_OUTER_IPV4 | \
+ PKT_TX_OUTER_IPV6 | \
PKT_TX_TCP_SEG | \
PKT_TX_QINQ_PKT | \
- PKT_TX_VLAN_PKT)
+ PKT_TX_VLAN_PKT | \
+ PKT_TX_TUNNEL_MASK)
#define I40E_TX_OFFLOAD_NOTSUP_MASK \
(PKT_TX_OFFLOAD_MASK ^ I40E_TX_OFFLOAD_MASK)
--
2.4.11
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] mbuf: fix bitmask of Tx offload flags
2017-01-24 11:50 [dpdk-dev] [PATCH 1/2] mbuf: fix bitmask of Tx offload flags Jingjing Wu
2017-01-24 11:50 ` [dpdk-dev] [PATCH 2/2] net/i40e: fix bitmask of supported Tx flags Jingjing Wu
@ 2017-01-26 14:19 ` Ferruh Yigit
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 0/5] fix bitmask of supported Tx flags Jingjing Wu
2 siblings, 0 replies; 39+ messages in thread
From: Ferruh Yigit @ 2017-01-26 14:19 UTC (permalink / raw)
To: Jingjing Wu, dev; +Cc: helin.zhang, tomaszx.kulasek, Olivier MATZ
On 1/24/2017 11:50 AM, Jingjing Wu wrote:
> Some Tx offload flags are missed in bitmask of all supported packet
> Tx offload features flags.
> This patch fixes it.
>
> Fixes: 4fb7e803eb1a ("ethdev: add Tx preparation")
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Cc: Olivier MATZ <olivier.matz@6wind.com>
<...>
^ permalink raw reply [flat|nested] 39+ messages in thread
* [dpdk-dev] [PATCH v2 0/5] fix bitmask of supported Tx flags
2017-01-24 11:50 [dpdk-dev] [PATCH 1/2] mbuf: fix bitmask of Tx offload flags Jingjing Wu
2017-01-24 11:50 ` [dpdk-dev] [PATCH 2/2] net/i40e: fix bitmask of supported Tx flags Jingjing Wu
2017-01-26 14:19 ` [dpdk-dev] [PATCH 1/2] mbuf: fix bitmask of Tx offload flags Ferruh Yigit
@ 2017-02-04 3:36 ` Jingjing Wu
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 1/5] mbuf: fix bitmask of Tx offload flags Jingjing Wu
` (5 more replies)
2 siblings, 6 replies; 39+ messages in thread
From: Jingjing Wu @ 2017-02-04 3:36 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu
Some Tx offload flags are missed in bitmask of all supported packet
Tx flags, it will cause rte_eth_tx_prepare fails when Tx burst packets.
v2 changes:
- redefine the PKT_TX_OFFLOAD_MASK
- fix more drivers
Jingjing Wu (5):
mbuf: fix bitmask of Tx offload flags
net/i40e: fix bitmask of supported Tx flags
net/ixgbe: fix bitmask of supported Tx flags
net/e1000: fix bitmask of supported Tx flags
net/fm10k: fix bitmask of supported Tx flags
drivers/net/e1000/igb_rxtx.c | 11 +++++++++++
drivers/net/fm10k/fm10k_rxtx.c | 1 +
drivers/net/i40e/i40e_rxtx.c | 36 ++++++++++++++++++++++++++++--------
drivers/net/ixgbe/ixgbe_rxtx.c | 17 ++++++++++++++++-
lib/librte_mbuf/rte_mbuf.h | 22 +++++++++++-----------
5 files changed, 67 insertions(+), 20 deletions(-)
--
2.4.11
^ permalink raw reply [flat|nested] 39+ messages in thread
* [dpdk-dev] [PATCH v2 1/5] mbuf: fix bitmask of Tx offload flags
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 0/5] fix bitmask of supported Tx flags Jingjing Wu
@ 2017-02-04 3:36 ` Jingjing Wu
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 2/5] net/i40e: fix bitmask of supported Tx flags Jingjing Wu
` (4 subsequent siblings)
5 siblings, 0 replies; 39+ messages in thread
From: Jingjing Wu @ 2017-02-04 3:36 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, olivier.matz
Some Tx offload flags are missed in bitmask of all supported packet
Tx offload features flags.
This patch fixes it by redefining PKT_TX_OFFLOAD_MASK.
PKT_RX_OFFLOAD_MASK is also defined in this patch.
CC: olivier.matz@6wind.com
Fixes: 4fb7e803eb1a ("ethdev: add Tx preparation")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
lib/librte_mbuf/rte_mbuf.h | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 0d01167..018a604 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -177,10 +177,11 @@ extern "C" {
*/
#define PKT_RX_LRO (1ULL << 16)
-/* add new RX flags here */
-
-/* add new TX flags here */
+/* add new RX flags here, and update __PKT_RX_NEXT */
+#define __PKT_RX_NEXT (1ULL << 17)
+/* add new TX flags here, and update __PKT_TX_NEXT */
+#define __PKT_TX_NEXT (1ULL << 43)
/**
* Offload the MACsec. This flag must be set by the application to enable
* this offload feature for a packet to be transmitted.
@@ -283,6 +284,12 @@ extern "C" {
#define PKT_TX_OUTER_IPV4 (1ULL << 59)
/**
+ * Bitmask of all supported packet Rx offload features flags,
+ * which can be set for packet.
+ **/
+#define PKT_RX_OFFLOAD_MASK (__PKT_RX_NEXT - 1)
+
+/**
* Packet outer header is IPv6. This flag must be set when using any
* outer offload feature (L4 checksum) to tell the NIC that the outer
* header of the tunneled packet is an IPv6 packet.
@@ -293,14 +300,7 @@ extern "C" {
* Bitmask of all supported packet Tx offload features flags,
* which can be set for packet.
*/
-#define PKT_TX_OFFLOAD_MASK ( \
- PKT_TX_IP_CKSUM | \
- PKT_TX_L4_MASK | \
- PKT_TX_OUTER_IP_CKSUM | \
- PKT_TX_TCP_SEG | \
- PKT_TX_QINQ_PKT | \
- PKT_TX_VLAN_PKT | \
- PKT_TX_TUNNEL_MASK)
+#define PKT_TX_OFFLOAD_MASK ((~(__PKT_TX_NEXT - 1)) & 0x1fffffffffffffff)
#define __RESERVED (1ULL << 61) /**< reserved for future mbuf use */
--
2.4.11
^ permalink raw reply [flat|nested] 39+ messages in thread
* [dpdk-dev] [PATCH v2 2/5] net/i40e: fix bitmask of supported Tx flags
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 0/5] fix bitmask of supported Tx flags Jingjing Wu
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 1/5] mbuf: fix bitmask of Tx offload flags Jingjing Wu
@ 2017-02-04 3:36 ` Jingjing Wu
2017-02-05 10:28 ` Ferruh Yigit
2017-02-06 10:26 ` Olivier Matz
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 3/5] net/ixgbe: " Jingjing Wu
` (3 subsequent siblings)
5 siblings, 2 replies; 39+ messages in thread
From: Jingjing Wu @ 2017-02-04 3:36 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Some Tx offload flags are missed in bitmask of all supported packet
Tx flags by i40e.
This patch fixes it.
CC: helin.zhang@intel.com
Fixes: 3f33e643e5c6 ("net/i40e: add Tx preparation")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/i40e_rxtx.c | 36 ++++++++++++++++++++++++++++--------
1 file changed, 28 insertions(+), 8 deletions(-)
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 608685f..4dd45f3 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -80,15 +80,35 @@
PKT_TX_L4_MASK | \
PKT_TX_TCP_SEG | \
PKT_TX_OUTER_IP_CKSUM)
+#ifdef RTE_LIBRTE_IEEE1588
+#define I40E_TX_OFFLOAD_MASK ( \
+ PKT_TX_IP_CKSUM | \
+ PKT_TX_IPV4 | \
+ PKT_TX_IPV6 | \
+ PKT_TX_L4_MASK | \
+ PKT_TX_OUTER_IP_CKSUM | \
+ PKT_TX_OUTER_IPV4 | \
+ PKT_TX_OUTER_IPV6 | \
+ PKT_TX_IEEE1588_TMST | \
+ PKT_TX_TCP_SEG | \
+ PKT_TX_QINQ_PKT | \
+ PKT_TX_VLAN_PKT | \
+ PKT_TX_TUNNEL_MASK)
+#else
+#define I40E_TX_OFFLOAD_MASK ( \
+ PKT_TX_IP_CKSUM | \
+ PKT_TX_IPV4 | \
+ PKT_TX_IPV6 | \
+ PKT_TX_L4_MASK | \
+ PKT_TX_OUTER_IP_CKSUM | \
+ PKT_TX_OUTER_IPV4 | \
+ PKT_TX_OUTER_IPV6 | \
+ PKT_TX_TCP_SEG | \
+ PKT_TX_QINQ_PKT | \
+ PKT_TX_VLAN_PKT | \
+ PKT_TX_TUNNEL_MASK)
-#define I40E_TX_OFFLOAD_MASK ( \
- PKT_TX_IP_CKSUM | \
- PKT_TX_L4_MASK | \
- PKT_TX_OUTER_IP_CKSUM | \
- PKT_TX_TCP_SEG | \
- PKT_TX_QINQ_PKT | \
- PKT_TX_VLAN_PKT)
-
+#endif
#define I40E_TX_OFFLOAD_NOTSUP_MASK \
(PKT_TX_OFFLOAD_MASK ^ I40E_TX_OFFLOAD_MASK)
--
2.4.11
^ permalink raw reply [flat|nested] 39+ messages in thread
* [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of supported Tx flags
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 0/5] fix bitmask of supported Tx flags Jingjing Wu
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 1/5] mbuf: fix bitmask of Tx offload flags Jingjing Wu
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 2/5] net/i40e: fix bitmask of supported Tx flags Jingjing Wu
@ 2017-02-04 3:36 ` Jingjing Wu
2017-02-05 11:59 ` Ananyev, Konstantin
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 4/5] net/e1000: " Jingjing Wu
` (2 subsequent siblings)
5 siblings, 1 reply; 39+ messages in thread
From: Jingjing Wu @ 2017-02-04 3:36 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, konstantin.ananyev
Add missed flags to bitmask of all supported packet Tx flags.
CC: konstantin.ananyev@intel.com
Fixes: 7829b8d52be0 ("net/ixgbe: add Tx preparation")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/ixgbe/ixgbe_rxtx.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 36f1c02..8454581 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -81,13 +81,28 @@
#include "ixgbe_rxtx.h"
/* Bit Mask to indicate what bits required for building TX context */
+#ifdef RTE_LIBRTE_IEEE1588
#define IXGBE_TX_OFFLOAD_MASK ( \
PKT_TX_VLAN_PKT | \
PKT_TX_IP_CKSUM | \
+ PKT_TX_IPV4 | \
PKT_TX_L4_MASK | \
+ PKT_TX_IEEE1588_TMST | \
PKT_TX_TCP_SEG | \
PKT_TX_MACSEC | \
- PKT_TX_OUTER_IP_CKSUM)
+ PKT_TX_OUTER_IP_CKSUM | \
+ PKT_TX_OUTER_IPV4)
+#else
+#define IXGBE_TX_OFFLOAD_MASK ( \
+ PKT_TX_VLAN_PKT | \
+ PKT_TX_IP_CKSUM | \
+ PKT_TX_IPV4 | \
+ PKT_TX_L4_MASK | \
+ PKT_TX_TCP_SEG | \
+ PKT_TX_MACSEC | \
+ PKT_TX_OUTER_IP_CKSUM | \
+ PKT_TX_OUTER_IPV4)
+#endif
#define IXGBE_TX_OFFLOAD_NOTSUP_MASK \
(PKT_TX_OFFLOAD_MASK ^ IXGBE_TX_OFFLOAD_MASK)
--
2.4.11
^ permalink raw reply [flat|nested] 39+ messages in thread
* [dpdk-dev] [PATCH v2 4/5] net/e1000: fix bitmask of supported Tx flags
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 0/5] fix bitmask of supported Tx flags Jingjing Wu
` (2 preceding siblings ...)
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 3/5] net/ixgbe: " Jingjing Wu
@ 2017-02-04 3:36 ` Jingjing Wu
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 5/5] net/fm10k: " Jingjing Wu
2017-02-07 3:22 ` [dpdk-dev] [PATCH v3 0/4] " Jingjing Wu
5 siblings, 0 replies; 39+ messages in thread
From: Jingjing Wu @ 2017-02-04 3:36 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, wenzhuo.lu
Add missed flags to bitmask of all supported packet Tx flags.
CC: wenzhuo.lu@intel.com
Fixes: 2b76648872c9 ("net/e1000: add Tx preparation")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/e1000/igb_rxtx.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 45f3f24..a478a00 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -73,11 +73,22 @@
#include "e1000_ethdev.h"
/* Bit Mask to indicate what bits required for building TX context */
+#ifdef RTE_LIBRTE_IEEE1588
#define IGB_TX_OFFLOAD_MASK ( \
PKT_TX_VLAN_PKT | \
PKT_TX_IP_CKSUM | \
+ PKT_TX_IPV4 | \
PKT_TX_L4_MASK | \
+ PKT_TX_IEEE1588_TMST | \
PKT_TX_TCP_SEG)
+#else
+#define IGB_TX_OFFLOAD_MASK ( \
+ PKT_TX_VLAN_PKT | \
+ PKT_TX_IPV4 | \
+ PKT_TX_IP_CKSUM | \
+ PKT_TX_L4_MASK | \
+ PKT_TX_TCP_SEG)
+#endif
#define IGB_TX_OFFLOAD_NOTSUP_MASK \
(PKT_TX_OFFLOAD_MASK ^ IGB_TX_OFFLOAD_MASK)
--
2.4.11
^ permalink raw reply [flat|nested] 39+ messages in thread
* [dpdk-dev] [PATCH v2 5/5] net/fm10k: fix bitmask of supported Tx flags
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 0/5] fix bitmask of supported Tx flags Jingjing Wu
` (3 preceding siblings ...)
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 4/5] net/e1000: " Jingjing Wu
@ 2017-02-04 3:36 ` Jingjing Wu
2017-02-07 3:22 ` [dpdk-dev] [PATCH v3 0/4] " Jingjing Wu
5 siblings, 0 replies; 39+ messages in thread
From: Jingjing Wu @ 2017-02-04 3:36 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, jing.d.chen
Add missed flags to bitmask of all supported packet Tx flags.
CC: jing.d.chen@intel.com
Fixes: 9b134aa39716 ("net/fm10k: add Tx preparation")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/fm10k/fm10k_rxtx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c
index 144e5e6..7976c24 100644
--- a/drivers/net/fm10k/fm10k_rxtx.c
+++ b/drivers/net/fm10k/fm10k_rxtx.c
@@ -69,6 +69,7 @@ static inline void dump_rxd(union fm10k_rx_desc *rxd)
#define FM10K_TX_OFFLOAD_MASK ( \
PKT_TX_VLAN_PKT | \
PKT_TX_IP_CKSUM | \
+ PKT_TX_IPV4 | \
PKT_TX_L4_MASK | \
PKT_TX_TCP_SEG)
--
2.4.11
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [dpdk-dev] [PATCH v2 2/5] net/i40e: fix bitmask of supported Tx flags
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 2/5] net/i40e: fix bitmask of supported Tx flags Jingjing Wu
@ 2017-02-05 10:28 ` Ferruh Yigit
2017-02-06 3:02 ` Wu, Jingjing
2017-02-06 10:26 ` Olivier Matz
1 sibling, 1 reply; 39+ messages in thread
From: Ferruh Yigit @ 2017-02-05 10:28 UTC (permalink / raw)
To: Jingjing Wu, dev; +Cc: helin.zhang
On 2/4/2017 3:36 AM, Jingjing Wu wrote:
> Some Tx offload flags are missed in bitmask of all supported packet
> Tx flags by i40e.
> This patch fixes it.
>
> CC: helin.zhang@intel.com
> Fixes: 3f33e643e5c6 ("net/i40e: add Tx preparation")
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> ---
> drivers/net/i40e/i40e_rxtx.c | 36 ++++++++++++++++++++++++++++--------
> 1 file changed, 28 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
> index 608685f..4dd45f3 100644
> --- a/drivers/net/i40e/i40e_rxtx.c
> +++ b/drivers/net/i40e/i40e_rxtx.c
> @@ -80,15 +80,35 @@
> PKT_TX_L4_MASK | \
> PKT_TX_TCP_SEG | \
> PKT_TX_OUTER_IP_CKSUM)
> +#ifdef RTE_LIBRTE_IEEE1588
> +#define I40E_TX_OFFLOAD_MASK ( \
> + PKT_TX_IP_CKSUM | \
> + PKT_TX_IPV4 | \
> + PKT_TX_IPV6 | \
> + PKT_TX_L4_MASK | \
> + PKT_TX_OUTER_IP_CKSUM | \
> + PKT_TX_OUTER_IPV4 | \
> + PKT_TX_OUTER_IPV6 | \
> + PKT_TX_IEEE1588_TMST | \
> + PKT_TX_TCP_SEG | \
> + PKT_TX_QINQ_PKT | \
> + PKT_TX_VLAN_PKT | \
> + PKT_TX_TUNNEL_MASK)
> +#else
> +#define I40E_TX_OFFLOAD_MASK ( \
> + PKT_TX_IP_CKSUM | \
> + PKT_TX_IPV4 | \
> + PKT_TX_IPV6 | \
> + PKT_TX_L4_MASK | \
> + PKT_TX_OUTER_IP_CKSUM | \
> + PKT_TX_OUTER_IPV4 | \
> + PKT_TX_OUTER_IPV6 | \
> + PKT_TX_TCP_SEG | \
> + PKT_TX_QINQ_PKT | \
> + PKT_TX_VLAN_PKT | \
> + PKT_TX_TUNNEL_MASK)
Functionally will be same, but what do you think about following, to
make easy to see what define adds:
+#define I40E_TX_OFFLOAD_MASK ( \
+ PKT_TX_IP_CKSUM | \
+ PKT_TX_IPV4 | \
+ PKT_TX_IPV6 | \
+ PKT_TX_L4_MASK | \
+ PKT_TX_OUTER_IP_CKSUM | \
+ PKT_TX_OUTER_IPV4 | \
+ PKT_TX_OUTER_IPV6 | \
+#ifdef RTE_LIBRTE_IEEE1588
+ PKT_TX_IEEE1588_TMST | \
+#endif
+ PKT_TX_TCP_SEG | \
+ PKT_TX_QINQ_PKT | \
+ PKT_TX_VLAN_PKT | \
+ PKT_TX_TUNNEL_MASK)
>
> -#define I40E_TX_OFFLOAD_MASK ( \
> - PKT_TX_IP_CKSUM | \
> - PKT_TX_L4_MASK | \
> - PKT_TX_OUTER_IP_CKSUM | \
> - PKT_TX_TCP_SEG | \
> - PKT_TX_QINQ_PKT | \
> - PKT_TX_VLAN_PKT)
> -
> +#endif
> #define I40E_TX_OFFLOAD_NOTSUP_MASK \
> (PKT_TX_OFFLOAD_MASK ^ I40E_TX_OFFLOAD_MASK)
>
>
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of supported Tx flags
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 3/5] net/ixgbe: " Jingjing Wu
@ 2017-02-05 11:59 ` Ananyev, Konstantin
2017-02-05 12:10 ` Ananyev, Konstantin
0 siblings, 1 reply; 39+ messages in thread
From: Ananyev, Konstantin @ 2017-02-05 11:59 UTC (permalink / raw)
To: Wu, Jingjing, dev
Hi Jingjing,
> -----Original Message-----
> From: Wu, Jingjing
> Sent: Saturday, February 4, 2017 3:36 AM
> To: dev@dpdk.org
> Cc: Wu, Jingjing <jingjing.wu@intel.com>; Ananyev, Konstantin <konstantin.ananyev@intel.com>
> Subject: [PATCH v2 3/5] net/ixgbe: fix bitmask of supported Tx flags
>
> Add missed flags to bitmask of all supported packet Tx flags.
>
> CC: konstantin.ananyev@intel.com
> Fixes: 7829b8d52be0 ("net/ixgbe: add Tx preparation")
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> ---
> drivers/net/ixgbe/ixgbe_rxtx.c | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
> index 36f1c02..8454581 100644
> --- a/drivers/net/ixgbe/ixgbe_rxtx.c
> +++ b/drivers/net/ixgbe/ixgbe_rxtx.c
> @@ -81,13 +81,28 @@
> #include "ixgbe_rxtx.h"
>
> /* Bit Mask to indicate what bits required for building TX context */
> +#ifdef RTE_LIBRTE_IEEE1588
> #define IXGBE_TX_OFFLOAD_MASK ( \
> PKT_TX_VLAN_PKT | \
> PKT_TX_IP_CKSUM | \
> + PKT_TX_IPV4 | \
> PKT_TX_L4_MASK | \
> + PKT_TX_IEEE1588_TMST | \
> PKT_TX_TCP_SEG | \
> PKT_TX_MACSEC | \
> - PKT_TX_OUTER_IP_CKSUM)
> + PKT_TX_OUTER_IP_CKSUM | \
> + PKT_TX_OUTER_IPV4)
> +#else
> +#define IXGBE_TX_OFFLOAD_MASK ( \
> + PKT_TX_VLAN_PKT | \
> + PKT_TX_IP_CKSUM | \
> + PKT_TX_IPV4 | \
Wonder why ixgbe doesn't have PKT_TX_IPV6?
Konstantin
> + PKT_TX_L4_MASK | \
> + PKT_TX_TCP_SEG | \
> + PKT_TX_MACSEC | \
> + PKT_TX_OUTER_IP_CKSUM | \
> + PKT_TX_OUTER_IPV4)
> +#endif
>
> #define IXGBE_TX_OFFLOAD_NOTSUP_MASK \
> (PKT_TX_OFFLOAD_MASK ^ IXGBE_TX_OFFLOAD_MASK)
> --
> 2.4.11
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of supported Tx flags
2017-02-05 11:59 ` Ananyev, Konstantin
@ 2017-02-05 12:10 ` Ananyev, Konstantin
2017-02-06 8:53 ` Wu, Jingjing
0 siblings, 1 reply; 39+ messages in thread
From: Ananyev, Konstantin @ 2017-02-05 12:10 UTC (permalink / raw)
To: Ananyev, Konstantin, Wu, Jingjing, dev
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ananyev, Konstantin
> Sent: Sunday, February 5, 2017 11:59 AM
> To: Wu, Jingjing <jingjing.wu@intel.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of supported Tx flags
>
> Hi Jingjing,
>
>
> > -----Original Message-----
> > From: Wu, Jingjing
> > Sent: Saturday, February 4, 2017 3:36 AM
> > To: dev@dpdk.org
> > Cc: Wu, Jingjing <jingjing.wu@intel.com>; Ananyev, Konstantin <konstantin.ananyev@intel.com>
> > Subject: [PATCH v2 3/5] net/ixgbe: fix bitmask of supported Tx flags
> >
> > Add missed flags to bitmask of all supported packet Tx flags.
> >
> > CC: konstantin.ananyev@intel.com
> > Fixes: 7829b8d52be0 ("net/ixgbe: add Tx preparation")
> > Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> > ---
> > drivers/net/ixgbe/ixgbe_rxtx.c | 17 ++++++++++++++++-
> > 1 file changed, 16 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
> > index 36f1c02..8454581 100644
> > --- a/drivers/net/ixgbe/ixgbe_rxtx.c
> > +++ b/drivers/net/ixgbe/ixgbe_rxtx.c
> > @@ -81,13 +81,28 @@
> > #include "ixgbe_rxtx.h"
> >
> > /* Bit Mask to indicate what bits required for building TX context */
> > +#ifdef RTE_LIBRTE_IEEE1588
> > #define IXGBE_TX_OFFLOAD_MASK ( \
> > PKT_TX_VLAN_PKT | \
> > PKT_TX_IP_CKSUM | \
> > + PKT_TX_IPV4 | \
> > PKT_TX_L4_MASK | \
> > + PKT_TX_IEEE1588_TMST | \
> > PKT_TX_TCP_SEG | \
> > PKT_TX_MACSEC | \
> > - PKT_TX_OUTER_IP_CKSUM)
> > + PKT_TX_OUTER_IP_CKSUM | \
> > + PKT_TX_OUTER_IPV4)
> > +#else
> > +#define IXGBE_TX_OFFLOAD_MASK ( \
> > + PKT_TX_VLAN_PKT | \
> > + PKT_TX_IP_CKSUM | \
> > + PKT_TX_IPV4 | \
>
> Wonder why ixgbe doesn't have PKT_TX_IPV6?
Same question for e1000 and fm10k.
Also if you decided to go that way, you'll probably need to update TX_OFFLOAD_MASK
for enic and vmxnet3.
That's why I still think it would be much less hassle not to include
these flags (PKT_TX_IPV4 and PKT_TX_IPV6) into TX_OFFLOAD_MASK at all.
Konstantin
>
> > + PKT_TX_L4_MASK | \
> > + PKT_TX_TCP_SEG | \
> > + PKT_TX_MACSEC | \
> > + PKT_TX_OUTER_IP_CKSUM | \
> > + PKT_TX_OUTER_IPV4)
> > +#endif
> >
> > #define IXGBE_TX_OFFLOAD_NOTSUP_MASK \
> > (PKT_TX_OFFLOAD_MASK ^ IXGBE_TX_OFFLOAD_MASK)
> > --
> > 2.4.11
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [dpdk-dev] [PATCH v2 2/5] net/i40e: fix bitmask of supported Tx flags
2017-02-05 10:28 ` Ferruh Yigit
@ 2017-02-06 3:02 ` Wu, Jingjing
2017-02-06 10:28 ` Olivier Matz
0 siblings, 1 reply; 39+ messages in thread
From: Wu, Jingjing @ 2017-02-06 3:02 UTC (permalink / raw)
To: Yigit, Ferruh, dev; +Cc: Zhang, Helin
>
> Functionally will be same, but what do you think about following, to make
> easy to see what define adds:
>
> +#define I40E_TX_OFFLOAD_MASK ( \
> + PKT_TX_IP_CKSUM | \
> + PKT_TX_IPV4 | \
> + PKT_TX_IPV6 | \
> + PKT_TX_L4_MASK | \
> + PKT_TX_OUTER_IP_CKSUM | \
> + PKT_TX_OUTER_IPV4 | \
> + PKT_TX_OUTER_IPV6 | \
>
> +#ifdef RTE_LIBRTE_IEEE1588
> + PKT_TX_IEEE1588_TMST | \
> +#endif
>
> + PKT_TX_TCP_SEG | \
> + PKT_TX_QINQ_PKT | \
> + PKT_TX_VLAN_PKT | \
> + PKT_TX_TUNNEL_MASK)
>
Hi, Ferruh
As I know, the above change is incorrect in C code. We cannot use #ifdef #endif inside #define
Thanks
Jingjing
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of supported Tx flags
2017-02-05 12:10 ` Ananyev, Konstantin
@ 2017-02-06 8:53 ` Wu, Jingjing
2017-02-06 12:11 ` Ananyev, Konstantin
0 siblings, 1 reply; 39+ messages in thread
From: Wu, Jingjing @ 2017-02-06 8:53 UTC (permalink / raw)
To: Ananyev, Konstantin, dev
> -----Original Message-----
> From: Ananyev, Konstantin
> Sent: Sunday, February 5, 2017 8:11 PM
> To: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; dev@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of supported
> Tx flags
>
>
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ananyev,
> > Konstantin
> > Sent: Sunday, February 5, 2017 11:59 AM
> > To: Wu, Jingjing <jingjing.wu@intel.com>; dev@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of
> > supported Tx flags
> >
> > Hi Jingjing,
> >
> >
> > > -----Original Message-----
> > > From: Wu, Jingjing
> > > Sent: Saturday, February 4, 2017 3:36 AM
> > > To: dev@dpdk.org
> > > Cc: Wu, Jingjing <jingjing.wu@intel.com>; Ananyev, Konstantin
> > > <konstantin.ananyev@intel.com>
> > > Subject: [PATCH v2 3/5] net/ixgbe: fix bitmask of supported Tx flags
> > >
> > > Add missed flags to bitmask of all supported packet Tx flags.
> > >
> > > CC: konstantin.ananyev@intel.com
> > > Fixes: 7829b8d52be0 ("net/ixgbe: add Tx preparation")
> > > Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> > > ---
> > > drivers/net/ixgbe/ixgbe_rxtx.c | 17 ++++++++++++++++-
> > > 1 file changed, 16 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c
> > > b/drivers/net/ixgbe/ixgbe_rxtx.c index 36f1c02..8454581 100644
> > > --- a/drivers/net/ixgbe/ixgbe_rxtx.c
> > > +++ b/drivers/net/ixgbe/ixgbe_rxtx.c
> > > @@ -81,13 +81,28 @@
> > > #include "ixgbe_rxtx.h"
> > >
> > > /* Bit Mask to indicate what bits required for building TX context
> > > */
> > > +#ifdef RTE_LIBRTE_IEEE1588
> > > #define IXGBE_TX_OFFLOAD_MASK ( \
> > > PKT_TX_VLAN_PKT | \
> > > PKT_TX_IP_CKSUM | \
> > > + PKT_TX_IPV4 | \
> > > PKT_TX_L4_MASK | \
> > > + PKT_TX_IEEE1588_TMST | \
> > > PKT_TX_TCP_SEG | \
> > > PKT_TX_MACSEC | \
> > > - PKT_TX_OUTER_IP_CKSUM)
> > > + PKT_TX_OUTER_IP_CKSUM | \
> > > + PKT_TX_OUTER_IPV4)
> > > +#else
> > > +#define IXGBE_TX_OFFLOAD_MASK ( \
> > > + PKT_TX_VLAN_PKT | \
> > > + PKT_TX_IP_CKSUM | \
> > > + PKT_TX_IPV4 | \
> >
> > Wonder why ixgbe doesn't have PKT_TX_IPV6?
>
> Same question for e1000 and fm10k.
> Also if you decided to go that way, you'll probably need to update
> TX_OFFLOAD_MASK for enic and vmxnet3.
> That's why I still think it would be much less hassle not to include these flags
> (PKT_TX_IPV4 and PKT_TX_IPV6) into TX_OFFLOAD_MASK at all.
> Konstantin
>
>
Thanks for pointing that. PKT_TX_IPV6 is missed.
About whether include these flags (PKT_TX_IPV4 and PKT_TX_IPV6) into TX_OFFLOAD_MASK, I think they should be
Included. Think about one NIC may support IPV4 L4 checksum offload, but not support IPV6? Even I don't know who it is.
Thanks
Jingjing
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [dpdk-dev] [PATCH v2 2/5] net/i40e: fix bitmask of supported Tx flags
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 2/5] net/i40e: fix bitmask of supported Tx flags Jingjing Wu
2017-02-05 10:28 ` Ferruh Yigit
@ 2017-02-06 10:26 ` Olivier Matz
2017-02-07 2:30 ` Wu, Jingjing
1 sibling, 1 reply; 39+ messages in thread
From: Olivier Matz @ 2017-02-06 10:26 UTC (permalink / raw)
To: Jingjing Wu; +Cc: dev, helin.zhang, Ananyev, Konstantin, Ferruh Yigit
Hi Jingjing,
On Sat, 4 Feb 2017 11:36:12 +0800, Jingjing Wu <jingjing.wu@intel.com>
wrote:
> Some Tx offload flags are missed in bitmask of all supported packet
> Tx flags by i40e.
> This patch fixes it.
Could you detail which flag was missing?
Is it PKT_TX_TUNNEL_MASK?
If yes, shouldn't we have a "Fixes:" line?
I think most of the patchset should be merged in one patch, because
changing only the mbuf part (PKT_TX_OFFLOAD_MASK) would break the
drivers that checks the offload bits at init, and this is not suitable,
especially if we want to be able to do git bisect.
My suggestion is to have:
1- fix i40 (add missing tunnel mask?)
2- fix missing MACSET in TX_OFFLOAD_MASK
3- change TX_OFFLOAD_MASK to include all flags (this impacts all
drivers using TX_OFFLOAD_MASK)
Regards,
Olivier
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [dpdk-dev] [PATCH v2 2/5] net/i40e: fix bitmask of supported Tx flags
2017-02-06 3:02 ` Wu, Jingjing
@ 2017-02-06 10:28 ` Olivier Matz
2017-02-07 2:30 ` Wu, Jingjing
0 siblings, 1 reply; 39+ messages in thread
From: Olivier Matz @ 2017-02-06 10:28 UTC (permalink / raw)
To: Wu, Jingjing; +Cc: Yigit, Ferruh, dev, Zhang, Helin
On Mon, 6 Feb 2017 03:02:12 +0000, "Wu, Jingjing"
<jingjing.wu@intel.com> wrote:
> >
> > Functionally will be same, but what do you think about following,
> > to make easy to see what define adds:
> >
> > +#define I40E_TX_OFFLOAD_MASK ( \
> > + PKT_TX_IP_CKSUM | \
> > + PKT_TX_IPV4 | \
> > + PKT_TX_IPV6 | \
> > + PKT_TX_L4_MASK | \
> > + PKT_TX_OUTER_IP_CKSUM | \
> > + PKT_TX_OUTER_IPV4 | \
> > + PKT_TX_OUTER_IPV6 | \
> >
> > +#ifdef RTE_LIBRTE_IEEE1588
> > + PKT_TX_IEEE1588_TMST | \
> > +#endif
> >
> > + PKT_TX_TCP_SEG | \
> > + PKT_TX_QINQ_PKT | \
> > + PKT_TX_VLAN_PKT | \
> > + PKT_TX_TUNNEL_MASK)
> >
>
> Hi, Ferruh
>
> As I know, the above change is incorrect in C code. We cannot use
> #ifdef #endif inside #define
>
> Thanks
> Jingjing
You can do:
#ifdef RTE_LIBRTE_IEEE1588
#define I40_TX_IEEE1588_TMST PKT_TX_IEEE1588_TMST
#else
#define I40_TX_IEEE1588_TMST 0
#endif
#define I40E_TX_OFFLOAD_MASK ( \
I40_TX_IEEE1588_TMST | \
PKT_TX_IP_CKSUM | \
...
Regards,
Olivier
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of supported Tx flags
2017-02-06 8:53 ` Wu, Jingjing
@ 2017-02-06 12:11 ` Ananyev, Konstantin
2017-02-07 2:29 ` Wu, Jingjing
0 siblings, 1 reply; 39+ messages in thread
From: Ananyev, Konstantin @ 2017-02-06 12:11 UTC (permalink / raw)
To: Wu, Jingjing, dev
> -----Original Message-----
> From: Wu, Jingjing
> Sent: Monday, February 6, 2017 8:54 AM
> To: Ananyev, Konstantin <konstantin.ananyev@intel.com>; dev@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of supported Tx flags
>
>
>
> > -----Original Message-----
> > From: Ananyev, Konstantin
> > Sent: Sunday, February 5, 2017 8:11 PM
> > To: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Wu, Jingjing
> > <jingjing.wu@intel.com>; dev@dpdk.org
> > Subject: RE: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of supported
> > Tx flags
> >
> >
> >
> > > -----Original Message-----
> > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ananyev,
> > > Konstantin
> > > Sent: Sunday, February 5, 2017 11:59 AM
> > > To: Wu, Jingjing <jingjing.wu@intel.com>; dev@dpdk.org
> > > Subject: Re: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of
> > > supported Tx flags
> > >
> > > Hi Jingjing,
> > >
> > >
> > > > -----Original Message-----
> > > > From: Wu, Jingjing
> > > > Sent: Saturday, February 4, 2017 3:36 AM
> > > > To: dev@dpdk.org
> > > > Cc: Wu, Jingjing <jingjing.wu@intel.com>; Ananyev, Konstantin
> > > > <konstantin.ananyev@intel.com>
> > > > Subject: [PATCH v2 3/5] net/ixgbe: fix bitmask of supported Tx flags
> > > >
> > > > Add missed flags to bitmask of all supported packet Tx flags.
> > > >
> > > > CC: konstantin.ananyev@intel.com
> > > > Fixes: 7829b8d52be0 ("net/ixgbe: add Tx preparation")
> > > > Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> > > > ---
> > > > drivers/net/ixgbe/ixgbe_rxtx.c | 17 ++++++++++++++++-
> > > > 1 file changed, 16 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c
> > > > b/drivers/net/ixgbe/ixgbe_rxtx.c index 36f1c02..8454581 100644
> > > > --- a/drivers/net/ixgbe/ixgbe_rxtx.c
> > > > +++ b/drivers/net/ixgbe/ixgbe_rxtx.c
> > > > @@ -81,13 +81,28 @@
> > > > #include "ixgbe_rxtx.h"
> > > >
> > > > /* Bit Mask to indicate what bits required for building TX context
> > > > */
> > > > +#ifdef RTE_LIBRTE_IEEE1588
> > > > #define IXGBE_TX_OFFLOAD_MASK ( \
> > > > PKT_TX_VLAN_PKT | \
> > > > PKT_TX_IP_CKSUM | \
> > > > + PKT_TX_IPV4 | \
> > > > PKT_TX_L4_MASK | \
> > > > + PKT_TX_IEEE1588_TMST | \
> > > > PKT_TX_TCP_SEG | \
> > > > PKT_TX_MACSEC | \
> > > > - PKT_TX_OUTER_IP_CKSUM)
> > > > + PKT_TX_OUTER_IP_CKSUM | \
> > > > + PKT_TX_OUTER_IPV4)
> > > > +#else
> > > > +#define IXGBE_TX_OFFLOAD_MASK ( \
> > > > + PKT_TX_VLAN_PKT | \
> > > > + PKT_TX_IP_CKSUM | \
> > > > + PKT_TX_IPV4 | \
> > >
> > > Wonder why ixgbe doesn't have PKT_TX_IPV6?
> >
> > Same question for e1000 and fm10k.
> > Also if you decided to go that way, you'll probably need to update
> > TX_OFFLOAD_MASK for enic and vmxnet3.
> > That's why I still think it would be much less hassle not to include these flags
> > (PKT_TX_IPV4 and PKT_TX_IPV6) into TX_OFFLOAD_MASK at all.
> > Konstantin
> >
> >
> Thanks for pointing that. PKT_TX_IPV6 is missed.
> About whether include these flags (PKT_TX_IPV4 and PKT_TX_IPV6) into TX_OFFLOAD_MASK, I think they should be
> Included. Think about one NIC may support IPV4 L4 checksum offload, but not support IPV6? Even I don't know who it is.
>
I don't think such combination is possible now anyway.
But ok, if your preference is it to do more work and add (PKT_TX_IPV4 | PKT_TX_IPV6)
into all required places, I wouldn't argue.
BTW, as a side notice, what will be really good is to have a function that would take
tx_offload_capabilities as an input and return tx_offload_mask.
That would remove necessity to update/support TX_OFFLOAD_MASK for each PMD,
and hopefully will allow to avoid confusion for PMD writers.
Though that's probably subject of another patch.
Konstantin
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of supported Tx flags
2017-02-06 12:11 ` Ananyev, Konstantin
@ 2017-02-07 2:29 ` Wu, Jingjing
2017-02-08 0:34 ` Ananyev, Konstantin
0 siblings, 1 reply; 39+ messages in thread
From: Wu, Jingjing @ 2017-02-07 2:29 UTC (permalink / raw)
To: Ananyev, Konstantin, dev
> -----Original Message-----
> From: Ananyev, Konstantin
> Sent: Monday, February 6, 2017 8:11 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>; dev@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of supported
> Tx flags
>
>
>
> > -----Original Message-----
> > From: Wu, Jingjing
> > Sent: Monday, February 6, 2017 8:54 AM
> > To: Ananyev, Konstantin <konstantin.ananyev@intel.com>; dev@dpdk.org
> > Subject: RE: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of
> > supported Tx flags
> >
> >
> >
> > > -----Original Message-----
> > > From: Ananyev, Konstantin
> > > Sent: Sunday, February 5, 2017 8:11 PM
> > > To: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Wu, Jingjing
> > > <jingjing.wu@intel.com>; dev@dpdk.org
> > > Subject: RE: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of
> > > supported Tx flags
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ananyev,
> > > > Konstantin
> > > > Sent: Sunday, February 5, 2017 11:59 AM
> > > > To: Wu, Jingjing <jingjing.wu@intel.com>; dev@dpdk.org
> > > > Subject: Re: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of
> > > > supported Tx flags
> > > >
> > > > Hi Jingjing,
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Wu, Jingjing
> > > > > Sent: Saturday, February 4, 2017 3:36 AM
> > > > > To: dev@dpdk.org
> > > > > Cc: Wu, Jingjing <jingjing.wu@intel.com>; Ananyev, Konstantin
> > > > > <konstantin.ananyev@intel.com>
> > > > > Subject: [PATCH v2 3/5] net/ixgbe: fix bitmask of supported Tx
> > > > > flags
> > > > >
> > > > > Add missed flags to bitmask of all supported packet Tx flags.
> > > > >
> > > > > CC: konstantin.ananyev@intel.com
> > > > > Fixes: 7829b8d52be0 ("net/ixgbe: add Tx preparation")
> > > > > Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> > > > > ---
> > > > > drivers/net/ixgbe/ixgbe_rxtx.c | 17 ++++++++++++++++-
> > > > > 1 file changed, 16 insertions(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c
> > > > > b/drivers/net/ixgbe/ixgbe_rxtx.c index 36f1c02..8454581 100644
> > > > > --- a/drivers/net/ixgbe/ixgbe_rxtx.c
> > > > > +++ b/drivers/net/ixgbe/ixgbe_rxtx.c
> > > > > @@ -81,13 +81,28 @@
> > > > > #include "ixgbe_rxtx.h"
> > > > >
> > > > > /* Bit Mask to indicate what bits required for building TX
> > > > > context */
> > > > > +#ifdef RTE_LIBRTE_IEEE1588
> > > > > #define IXGBE_TX_OFFLOAD_MASK ( \
> > > > > PKT_TX_VLAN_PKT | \
> > > > > PKT_TX_IP_CKSUM | \
> > > > > + PKT_TX_IPV4 | \
> > > > > PKT_TX_L4_MASK | \
> > > > > + PKT_TX_IEEE1588_TMST | \
> > > > > PKT_TX_TCP_SEG | \
> > > > > PKT_TX_MACSEC | \
> > > > > - PKT_TX_OUTER_IP_CKSUM)
> > > > > + PKT_TX_OUTER_IP_CKSUM | \
> > > > > + PKT_TX_OUTER_IPV4)
> > > > > +#else
> > > > > +#define IXGBE_TX_OFFLOAD_MASK ( \
> > > > > + PKT_TX_VLAN_PKT | \
> > > > > + PKT_TX_IP_CKSUM | \
> > > > > + PKT_TX_IPV4 | \
> > > >
> > > > Wonder why ixgbe doesn't have PKT_TX_IPV6?
> > >
> > > Same question for e1000 and fm10k.
> > > Also if you decided to go that way, you'll probably need to update
> > > TX_OFFLOAD_MASK for enic and vmxnet3.
> > > That's why I still think it would be much less hassle not to include
> > > these flags
> > > (PKT_TX_IPV4 and PKT_TX_IPV6) into TX_OFFLOAD_MASK at all.
> > > Konstantin
> > >
> > >
> > Thanks for pointing that. PKT_TX_IPV6 is missed.
> > About whether include these flags (PKT_TX_IPV4 and PKT_TX_IPV6) into
> > TX_OFFLOAD_MASK, I think they should be Included. Think about one NIC
> may support IPV4 L4 checksum offload, but not support IPV6? Even I don't
> know who it is.
> >
>
> I don't think such combination is possible now anyway.
> But ok, if your preference is it to do more work and add (PKT_TX_IPV4 |
> PKT_TX_IPV6) into all required places, I wouldn't argue.
>
> BTW, as a side notice, what will be really good is to have a function that
> would take tx_offload_capabilities as an input and return tx_offload_mask.
> That would remove necessity to update/support TX_OFFLOAD_MASK for
> each PMD, and hopefully will allow to avoid confusion for PMD writers.
> Though that's probably subject of another patch.
>
OK. I think what I did is more than necessary. Let me simplify the change. Thanks!
And about the querying tx offload capabilities, I think it is already been done
In rte_eth_dev_info_get. But it used another set of flags which is not TX flags
Defined in mbuf.
Jingjing
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [dpdk-dev] [PATCH v2 2/5] net/i40e: fix bitmask of supported Tx flags
2017-02-06 10:28 ` Olivier Matz
@ 2017-02-07 2:30 ` Wu, Jingjing
0 siblings, 0 replies; 39+ messages in thread
From: Wu, Jingjing @ 2017-02-07 2:30 UTC (permalink / raw)
To: Olivier Matz; +Cc: Yigit, Ferruh, dev, Zhang, Helin
> -----Original Message-----
> From: Olivier Matz [mailto:olivier.matz@6wind.com]
> Sent: Monday, February 6, 2017 6:29 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>
> Cc: Yigit, Ferruh <ferruh.yigit@intel.com>; dev@dpdk.org; Zhang, Helin
> <helin.zhang@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v2 2/5] net/i40e: fix bitmask of supported Tx
> flags
>
> On Mon, 6 Feb 2017 03:02:12 +0000, "Wu, Jingjing"
> <jingjing.wu@intel.com> wrote:
> > >
> > > Functionally will be same, but what do you think about following, to
> > > make easy to see what define adds:
> > >
> > > +#define I40E_TX_OFFLOAD_MASK ( \
> > > + PKT_TX_IP_CKSUM | \
> > > + PKT_TX_IPV4 | \
> > > + PKT_TX_IPV6 | \
> > > + PKT_TX_L4_MASK | \
> > > + PKT_TX_OUTER_IP_CKSUM | \
> > > + PKT_TX_OUTER_IPV4 | \
> > > + PKT_TX_OUTER_IPV6 | \
> > >
> > > +#ifdef RTE_LIBRTE_IEEE1588
> > > + PKT_TX_IEEE1588_TMST | \
> > > +#endif
> > >
> > > + PKT_TX_TCP_SEG | \
> > > + PKT_TX_QINQ_PKT | \
> > > + PKT_TX_VLAN_PKT | \
> > > + PKT_TX_TUNNEL_MASK)
> > >
> >
> > Hi, Ferruh
> >
> > As I know, the above change is incorrect in C code. We cannot use
> > #ifdef #endif inside #define
> >
> > Thanks
> > Jingjing
>
>
> You can do:
>
> #ifdef RTE_LIBRTE_IEEE1588
> #define I40_TX_IEEE1588_TMST PKT_TX_IEEE1588_TMST #else #define
> I40_TX_IEEE1588_TMST 0 #endif
>
> #define I40E_TX_OFFLOAD_MASK ( \
> I40_TX_IEEE1588_TMST | \
> PKT_TX_IP_CKSUM | \
> ...
>
Thanks for the suggestion.
>
> Regards,
> Olivier
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [dpdk-dev] [PATCH v2 2/5] net/i40e: fix bitmask of supported Tx flags
2017-02-06 10:26 ` Olivier Matz
@ 2017-02-07 2:30 ` Wu, Jingjing
0 siblings, 0 replies; 39+ messages in thread
From: Wu, Jingjing @ 2017-02-07 2:30 UTC (permalink / raw)
To: Olivier Matz; +Cc: dev, Zhang, Helin, Ananyev, Konstantin, Yigit, Ferruh
> -----Original Message-----
> From: Olivier Matz [mailto:olivier.matz@6wind.com]
> Sent: Monday, February 6, 2017 6:27 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>
> Cc: dev@dpdk.org; Zhang, Helin <helin.zhang@intel.com>; Ananyev,
> Konstantin <konstantin.ananyev@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v2 2/5] net/i40e: fix bitmask of supported Tx
> flags
>
> Hi Jingjing,
>
> On Sat, 4 Feb 2017 11:36:12 +0800, Jingjing Wu <jingjing.wu@intel.com>
> wrote:
> > Some Tx offload flags are missed in bitmask of all supported packet Tx
> > flags by i40e.
> > This patch fixes it.
>
> Could you detail which flag was missing?
> Is it PKT_TX_TUNNEL_MASK?
> If yes, shouldn't we have a "Fixes:" line?
>
> I think most of the patchset should be merged in one patch, because
> changing only the mbuf part (PKT_TX_OFFLOAD_MASK) would break the
> drivers that checks the offload bits at init, and this is not suitable, especially if
> we want to be able to do git bisect.
>
>
> My suggestion is to have:
>
> 1- fix i40 (add missing tunnel mask?)
> 2- fix missing MACSET in TX_OFFLOAD_MASK
> 3- change TX_OFFLOAD_MASK to include all flags (this impacts all
> drivers using TX_OFFLOAD_MASK)
>
>
OK. Will change according to your suggestion. It's clearer. Thanks
Jingjing
^ permalink raw reply [flat|nested] 39+ messages in thread
* [dpdk-dev] [PATCH v3 0/4] fix bitmask of supported Tx flags
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 0/5] fix bitmask of supported Tx flags Jingjing Wu
` (4 preceding siblings ...)
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 5/5] net/fm10k: " Jingjing Wu
@ 2017-02-07 3:22 ` Jingjing Wu
2017-02-07 3:22 ` [dpdk-dev] [PATCH v3 1/4] net/i40e: " Jingjing Wu
` (4 more replies)
5 siblings, 5 replies; 39+ messages in thread
From: Jingjing Wu @ 2017-02-07 3:22 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, olivier.matz, helin.zhang, konstantin.ananyev
Some Tx offload flags are missed in bitmask of all supported packet
Tx flags, it will cause rte_eth_tx_prepare fails when Tx burst packets.
v3 changes:
- add PKT_TX_MACSEC to PKT_TX_OFFLOAD_MASK
- refine code of drivers' TX_OFFLOAD_MASK definition
v2 changes:
- redefine the PKT_TX_OFFLOAD_MASK
- fix more drivers
Jingjing Wu (4):
net/i40e: fix bitmask of supported Tx flags
net/ixgbe: fix bitmask of supported Tx flags
net/e1000: fix bitmask of supported Tx flags
mbuf: fix bitmask of Tx offload flags
drivers/net/e1000/igb_rxtx.c | 8 +++++++-
drivers/net/i40e/i40e_rxtx.c | 10 +++++++++-
drivers/net/ixgbe/ixgbe_rxtx.c | 8 +++++++-
lib/librte_mbuf/rte_mbuf.h | 3 ++-
4 files changed, 25 insertions(+), 4 deletions(-)
--
2.4.11
^ permalink raw reply [flat|nested] 39+ messages in thread
* [dpdk-dev] [PATCH v3 1/4] net/i40e: fix bitmask of supported Tx flags
2017-02-07 3:22 ` [dpdk-dev] [PATCH v3 0/4] " Jingjing Wu
@ 2017-02-07 3:22 ` Jingjing Wu
2017-02-07 13:48 ` Ferruh Yigit
2017-02-07 3:22 ` [dpdk-dev] [PATCH v3 2/4] net/ixgbe: " Jingjing Wu
` (3 subsequent siblings)
4 siblings, 1 reply; 39+ messages in thread
From: Jingjing Wu @ 2017-02-07 3:22 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, olivier.matz, helin.zhang, konstantin.ananyev
PKT_TX_TUNNEL_MASK and PKT_TX_IEEE1588_TMST are missed in bitmask
of all supported packet Tx flags by i40e. It will cause packet preparing
fail when sending tunnel packets with Tx offload.
This patch fixes it.
Fixes: 3f33e643e5c6 ("net/i40e: add Tx preparation")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/i40e_rxtx.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 608685f..48429cc 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -75,6 +75,12 @@
#define I40E_TXD_CMD (I40E_TX_DESC_CMD_EOP | I40E_TX_DESC_CMD_RS)
+#ifdef RTE_LIBRTE_IEEE1588
+#define I40E_TX_IEEE1588_TMST PKT_TX_IEEE1588_TMST
+#else
+#define I40E_TX_IEEE1588_TMST 0
+#endif
+
#define I40E_TX_CKSUM_OFFLOAD_MASK ( \
PKT_TX_IP_CKSUM | \
PKT_TX_L4_MASK | \
@@ -87,7 +93,9 @@
PKT_TX_OUTER_IP_CKSUM | \
PKT_TX_TCP_SEG | \
PKT_TX_QINQ_PKT | \
- PKT_TX_VLAN_PKT)
+ PKT_TX_VLAN_PKT | \
+ PKT_TX_TUNNEL_MASK | \
+ I40E_TX_IEEE1588_TMST)
#define I40E_TX_OFFLOAD_NOTSUP_MASK \
(PKT_TX_OFFLOAD_MASK ^ I40E_TX_OFFLOAD_MASK)
--
2.4.11
^ permalink raw reply [flat|nested] 39+ messages in thread
* [dpdk-dev] [PATCH v3 2/4] net/ixgbe: fix bitmask of supported Tx flags
2017-02-07 3:22 ` [dpdk-dev] [PATCH v3 0/4] " Jingjing Wu
2017-02-07 3:22 ` [dpdk-dev] [PATCH v3 1/4] net/i40e: " Jingjing Wu
@ 2017-02-07 3:22 ` Jingjing Wu
2017-02-07 3:22 ` [dpdk-dev] [PATCH v3 3/4] net/e1000: " Jingjing Wu
` (2 subsequent siblings)
4 siblings, 0 replies; 39+ messages in thread
From: Jingjing Wu @ 2017-02-07 3:22 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, olivier.matz, helin.zhang, konstantin.ananyev
Add missed PKT_TX_IEEE1588_TMST to bitmask of all supported
packet Tx flags.
Fixes: 7829b8d52be0 ("net/ixgbe: add Tx preparation")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/ixgbe/ixgbe_rxtx.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 36f1c02..4d71992 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -80,6 +80,11 @@
#include "base/ixgbe_common.h"
#include "ixgbe_rxtx.h"
+#ifdef RTE_LIBRTE_IEEE1588
+#define IXGBE_TX_IEEE1588_TMST PKT_TX_IEEE1588_TMST
+#else
+#define IXGBE_TX_IEEE1588_TMST 0
+#endif
/* Bit Mask to indicate what bits required for building TX context */
#define IXGBE_TX_OFFLOAD_MASK ( \
PKT_TX_VLAN_PKT | \
@@ -87,7 +92,8 @@
PKT_TX_L4_MASK | \
PKT_TX_TCP_SEG | \
PKT_TX_MACSEC | \
- PKT_TX_OUTER_IP_CKSUM)
+ PKT_TX_OUTER_IP_CKSUM | \
+ IXGBE_TX_IEEE1588_TMST)
#define IXGBE_TX_OFFLOAD_NOTSUP_MASK \
(PKT_TX_OFFLOAD_MASK ^ IXGBE_TX_OFFLOAD_MASK)
--
2.4.11
^ permalink raw reply [flat|nested] 39+ messages in thread
* [dpdk-dev] [PATCH v3 3/4] net/e1000: fix bitmask of supported Tx flags
2017-02-07 3:22 ` [dpdk-dev] [PATCH v3 0/4] " Jingjing Wu
2017-02-07 3:22 ` [dpdk-dev] [PATCH v3 1/4] net/i40e: " Jingjing Wu
2017-02-07 3:22 ` [dpdk-dev] [PATCH v3 2/4] net/ixgbe: " Jingjing Wu
@ 2017-02-07 3:22 ` Jingjing Wu
2017-02-07 3:22 ` [dpdk-dev] [PATCH v3 4/4] mbuf: fix bitmask of Tx offload flags Jingjing Wu
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 0/4] fix bitmask of supported Tx flags Jingjing Wu
4 siblings, 0 replies; 39+ messages in thread
From: Jingjing Wu @ 2017-02-07 3:22 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, olivier.matz, helin.zhang, konstantin.ananyev
Add missed PKT_TX_IEEE1588_TMST to bitmask of all supported
packet Tx flags.
Fixes: 2b76648872c9 ("net/e1000: add Tx preparation")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/e1000/igb_rxtx.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 45f3f24..c9cf392 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -72,12 +72,18 @@
#include "base/e1000_api.h"
#include "e1000_ethdev.h"
+#ifdef RTE_LIBRTE_IEEE1588
+#define IGB_TX_IEEE1588_TMST PKT_TX_IEEE1588_TMST
+#else
+#define IGB_TX_IEEE1588_TMST 0
+#endif
/* Bit Mask to indicate what bits required for building TX context */
#define IGB_TX_OFFLOAD_MASK ( \
PKT_TX_VLAN_PKT | \
PKT_TX_IP_CKSUM | \
PKT_TX_L4_MASK | \
- PKT_TX_TCP_SEG)
+ PKT_TX_TCP_SEG | \
+ IGB_TX_IEEE1588_TMST)
#define IGB_TX_OFFLOAD_NOTSUP_MASK \
(PKT_TX_OFFLOAD_MASK ^ IGB_TX_OFFLOAD_MASK)
--
2.4.11
^ permalink raw reply [flat|nested] 39+ messages in thread
* [dpdk-dev] [PATCH v3 4/4] mbuf: fix bitmask of Tx offload flags
2017-02-07 3:22 ` [dpdk-dev] [PATCH v3 0/4] " Jingjing Wu
` (2 preceding siblings ...)
2017-02-07 3:22 ` [dpdk-dev] [PATCH v3 3/4] net/e1000: " Jingjing Wu
@ 2017-02-07 3:22 ` Jingjing Wu
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 0/4] fix bitmask of supported Tx flags Jingjing Wu
4 siblings, 0 replies; 39+ messages in thread
From: Jingjing Wu @ 2017-02-07 3:22 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, olivier.matz, helin.zhang, konstantin.ananyev
Add missed PKT_TX_MACSEC flag to bitmask of all supported packet Tx
offload features flags.
Fixes: 4fb7e803eb1a ("ethdev: add Tx preparation")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
lib/librte_mbuf/rte_mbuf.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 0d01167..2392995 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -300,7 +300,8 @@ extern "C" {
PKT_TX_TCP_SEG | \
PKT_TX_QINQ_PKT | \
PKT_TX_VLAN_PKT | \
- PKT_TX_TUNNEL_MASK)
+ PKT_TX_TUNNEL_MASK | \
+ PKT_TX_MACSEC)
#define __RESERVED (1ULL << 61) /**< reserved for future mbuf use */
--
2.4.11
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [dpdk-dev] [PATCH v3 1/4] net/i40e: fix bitmask of supported Tx flags
2017-02-07 3:22 ` [dpdk-dev] [PATCH v3 1/4] net/i40e: " Jingjing Wu
@ 2017-02-07 13:48 ` Ferruh Yigit
2017-02-07 15:45 ` Wu, Jingjing
0 siblings, 1 reply; 39+ messages in thread
From: Ferruh Yigit @ 2017-02-07 13:48 UTC (permalink / raw)
To: Jingjing Wu, dev; +Cc: olivier.matz, helin.zhang, konstantin.ananyev
On 2/7/2017 3:22 AM, Jingjing Wu wrote:
> PKT_TX_TUNNEL_MASK and PKT_TX_IEEE1588_TMST are missed in bitmask
> of all supported packet Tx flags by i40e. It will cause packet preparing
> fail when sending tunnel packets with Tx offload.
> This patch fixes it.
>
> Fixes: 3f33e643e5c6 ("net/i40e: add Tx preparation")
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> ---
> drivers/net/i40e/i40e_rxtx.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
> index 608685f..48429cc 100644
> --- a/drivers/net/i40e/i40e_rxtx.c
> +++ b/drivers/net/i40e/i40e_rxtx.c
> @@ -75,6 +75,12 @@
>
> #define I40E_TXD_CMD (I40E_TX_DESC_CMD_EOP | I40E_TX_DESC_CMD_RS)
>
> +#ifdef RTE_LIBRTE_IEEE1588
> +#define I40E_TX_IEEE1588_TMST PKT_TX_IEEE1588_TMST
> +#else
> +#define I40E_TX_IEEE1588_TMST 0
> +#endif
> +
> #define I40E_TX_CKSUM_OFFLOAD_MASK ( \
> PKT_TX_IP_CKSUM | \
> PKT_TX_L4_MASK | \
> @@ -87,7 +93,9 @@
> PKT_TX_OUTER_IP_CKSUM | \
> PKT_TX_TCP_SEG | \
> PKT_TX_QINQ_PKT | \
> - PKT_TX_VLAN_PKT)
> + PKT_TX_VLAN_PKT | \
> + PKT_TX_TUNNEL_MASK | \
> + I40E_TX_IEEE1588_TMST)
PKT_TX_IEEE1588_TMST added into I40E_TX_OFFLOAD_MASK, but not into
PKT_TX_OFFLOAD_MASK (patch 4/4)
Shouldn't PKT_TX_OFFLOAD_MASK be a super set of driver ones. Otherwise
PKT_TX_IEEE1588_TMST will be marked as not supported according below XOR
logic.
>
> #define I40E_TX_OFFLOAD_NOTSUP_MASK \
> (PKT_TX_OFFLOAD_MASK ^ I40E_TX_OFFLOAD_MASK)
>
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [dpdk-dev] [PATCH v3 1/4] net/i40e: fix bitmask of supported Tx flags
2017-02-07 13:48 ` Ferruh Yigit
@ 2017-02-07 15:45 ` Wu, Jingjing
2017-02-07 16:01 ` Ferruh Yigit
0 siblings, 1 reply; 39+ messages in thread
From: Wu, Jingjing @ 2017-02-07 15:45 UTC (permalink / raw)
To: Yigit, Ferruh, dev; +Cc: olivier.matz, Zhang, Helin, Ananyev, Konstantin
> > +#ifdef RTE_LIBRTE_IEEE1588
> > +#define I40E_TX_IEEE1588_TMST PKT_TX_IEEE1588_TMST #else #define
> > +I40E_TX_IEEE1588_TMST 0 #endif
> > +
> > #define I40E_TX_CKSUM_OFFLOAD_MASK ( \
> > PKT_TX_IP_CKSUM | \
> > PKT_TX_L4_MASK | \
> > @@ -87,7 +93,9 @@
> > PKT_TX_OUTER_IP_CKSUM | \
> > PKT_TX_TCP_SEG | \
> > PKT_TX_QINQ_PKT | \
> > - PKT_TX_VLAN_PKT)
> > + PKT_TX_VLAN_PKT | \
> > + PKT_TX_TUNNEL_MASK | \
> > + I40E_TX_IEEE1588_TMST)
>
> PKT_TX_IEEE1588_TMST added into I40E_TX_OFFLOAD_MASK, but not into
> PKT_TX_OFFLOAD_MASK (patch 4/4)
>
> Shouldn't PKT_TX_OFFLOAD_MASK be a super set of driver ones. Otherwise
> PKT_TX_IEEE1588_TMST will be marked as not supported according below
> XOR logic.
>
Yes, you are right. Should I send a new version patch set? Or just update the [4/4]?
Thanks
Jingjing
> >
> > #define I40E_TX_OFFLOAD_NOTSUP_MASK \
> > (PKT_TX_OFFLOAD_MASK ^ I40E_TX_OFFLOAD_MASK)
> >
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [dpdk-dev] [PATCH v3 1/4] net/i40e: fix bitmask of supported Tx flags
2017-02-07 15:45 ` Wu, Jingjing
@ 2017-02-07 16:01 ` Ferruh Yigit
0 siblings, 0 replies; 39+ messages in thread
From: Ferruh Yigit @ 2017-02-07 16:01 UTC (permalink / raw)
To: Wu, Jingjing, dev; +Cc: olivier.matz, Zhang, Helin, Ananyev, Konstantin
On 2/7/2017 3:45 PM, Wu, Jingjing wrote:
>>> +#ifdef RTE_LIBRTE_IEEE1588
>>> +#define I40E_TX_IEEE1588_TMST PKT_TX_IEEE1588_TMST #else #define
>>> +I40E_TX_IEEE1588_TMST 0 #endif
>>> +
>>> #define I40E_TX_CKSUM_OFFLOAD_MASK ( \
>>> PKT_TX_IP_CKSUM | \
>>> PKT_TX_L4_MASK | \
>>> @@ -87,7 +93,9 @@
>>> PKT_TX_OUTER_IP_CKSUM | \
>>> PKT_TX_TCP_SEG | \
>>> PKT_TX_QINQ_PKT | \
>>> - PKT_TX_VLAN_PKT)
>>> + PKT_TX_VLAN_PKT | \
>>> + PKT_TX_TUNNEL_MASK | \
>>> + I40E_TX_IEEE1588_TMST)
>>
>> PKT_TX_IEEE1588_TMST added into I40E_TX_OFFLOAD_MASK, but not into
>> PKT_TX_OFFLOAD_MASK (patch 4/4)
>>
>> Shouldn't PKT_TX_OFFLOAD_MASK be a super set of driver ones. Otherwise
>> PKT_TX_IEEE1588_TMST will be marked as not supported according below
>> XOR logic.
>>
>
> Yes, you are right. Should I send a new version patch set? Or just update the [4/4]?
Please send a new version of the set.
Thanks,
ferruh
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of supported Tx flags
2017-02-07 2:29 ` Wu, Jingjing
@ 2017-02-08 0:34 ` Ananyev, Konstantin
0 siblings, 0 replies; 39+ messages in thread
From: Ananyev, Konstantin @ 2017-02-08 0:34 UTC (permalink / raw)
To: Wu, Jingjing, dev
> -----Original Message-----
> From: Wu, Jingjing
> Sent: Tuesday, February 7, 2017 2:30 AM
> To: Ananyev, Konstantin <konstantin.ananyev@intel.com>; dev@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of supported Tx flags
>
>
>
> > -----Original Message-----
> > From: Ananyev, Konstantin
> > Sent: Monday, February 6, 2017 8:11 PM
> > To: Wu, Jingjing <jingjing.wu@intel.com>; dev@dpdk.org
> > Subject: RE: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of supported
> > Tx flags
> >
> >
> >
> > > -----Original Message-----
> > > From: Wu, Jingjing
> > > Sent: Monday, February 6, 2017 8:54 AM
> > > To: Ananyev, Konstantin <konstantin.ananyev@intel.com>; dev@dpdk.org
> > > Subject: RE: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of
> > > supported Tx flags
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: Ananyev, Konstantin
> > > > Sent: Sunday, February 5, 2017 8:11 PM
> > > > To: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Wu, Jingjing
> > > > <jingjing.wu@intel.com>; dev@dpdk.org
> > > > Subject: RE: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of
> > > > supported Tx flags
> > > >
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ananyev,
> > > > > Konstantin
> > > > > Sent: Sunday, February 5, 2017 11:59 AM
> > > > > To: Wu, Jingjing <jingjing.wu@intel.com>; dev@dpdk.org
> > > > > Subject: Re: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of
> > > > > supported Tx flags
> > > > >
> > > > > Hi Jingjing,
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Wu, Jingjing
> > > > > > Sent: Saturday, February 4, 2017 3:36 AM
> > > > > > To: dev@dpdk.org
> > > > > > Cc: Wu, Jingjing <jingjing.wu@intel.com>; Ananyev, Konstantin
> > > > > > <konstantin.ananyev@intel.com>
> > > > > > Subject: [PATCH v2 3/5] net/ixgbe: fix bitmask of supported Tx
> > > > > > flags
> > > > > >
> > > > > > Add missed flags to bitmask of all supported packet Tx flags.
> > > > > >
> > > > > > CC: konstantin.ananyev@intel.com
> > > > > > Fixes: 7829b8d52be0 ("net/ixgbe: add Tx preparation")
> > > > > > Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> > > > > > ---
> > > > > > drivers/net/ixgbe/ixgbe_rxtx.c | 17 ++++++++++++++++-
> > > > > > 1 file changed, 16 insertions(+), 1 deletion(-)
> > > > > >
> > > > > > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c
> > > > > > b/drivers/net/ixgbe/ixgbe_rxtx.c index 36f1c02..8454581 100644
> > > > > > --- a/drivers/net/ixgbe/ixgbe_rxtx.c
> > > > > > +++ b/drivers/net/ixgbe/ixgbe_rxtx.c
> > > > > > @@ -81,13 +81,28 @@
> > > > > > #include "ixgbe_rxtx.h"
> > > > > >
> > > > > > /* Bit Mask to indicate what bits required for building TX
> > > > > > context */
> > > > > > +#ifdef RTE_LIBRTE_IEEE1588
> > > > > > #define IXGBE_TX_OFFLOAD_MASK ( \
> > > > > > PKT_TX_VLAN_PKT | \
> > > > > > PKT_TX_IP_CKSUM | \
> > > > > > + PKT_TX_IPV4 | \
> > > > > > PKT_TX_L4_MASK | \
> > > > > > + PKT_TX_IEEE1588_TMST | \
> > > > > > PKT_TX_TCP_SEG | \
> > > > > > PKT_TX_MACSEC | \
> > > > > > - PKT_TX_OUTER_IP_CKSUM)
> > > > > > + PKT_TX_OUTER_IP_CKSUM | \
> > > > > > + PKT_TX_OUTER_IPV4)
> > > > > > +#else
> > > > > > +#define IXGBE_TX_OFFLOAD_MASK ( \
> > > > > > + PKT_TX_VLAN_PKT | \
> > > > > > + PKT_TX_IP_CKSUM | \
> > > > > > + PKT_TX_IPV4 | \
> > > > >
> > > > > Wonder why ixgbe doesn't have PKT_TX_IPV6?
> > > >
> > > > Same question for e1000 and fm10k.
> > > > Also if you decided to go that way, you'll probably need to update
> > > > TX_OFFLOAD_MASK for enic and vmxnet3.
> > > > That's why I still think it would be much less hassle not to include
> > > > these flags
> > > > (PKT_TX_IPV4 and PKT_TX_IPV6) into TX_OFFLOAD_MASK at all.
> > > > Konstantin
> > > >
> > > >
> > > Thanks for pointing that. PKT_TX_IPV6 is missed.
> > > About whether include these flags (PKT_TX_IPV4 and PKT_TX_IPV6) into
> > > TX_OFFLOAD_MASK, I think they should be Included. Think about one NIC
> > may support IPV4 L4 checksum offload, but not support IPV6? Even I don't
> > know who it is.
> > >
> >
> > I don't think such combination is possible now anyway.
> > But ok, if your preference is it to do more work and add (PKT_TX_IPV4 |
> > PKT_TX_IPV6) into all required places, I wouldn't argue.
> >
> > BTW, as a side notice, what will be really good is to have a function that
> > would take tx_offload_capabilities as an input and return tx_offload_mask.
> > That would remove necessity to update/support TX_OFFLOAD_MASK for
> > each PMD, and hopefully will allow to avoid confusion for PMD writers.
> > Though that's probably subject of another patch.
> >
>
> OK. I think what I did is more than necessary. Let me simplify the change. Thanks!
>
> And about the querying tx offload capabilities, I think it is already been done
> In rte_eth_dev_info_get. But it used another set of flags which is not TX flags
> Defined in mbuf.
I am not talking about querying device offload capabilities.
I am talking about a function that would take these capabilities reported by the
device and convert them into a set of tx offload flags, that are suitable for these capabilities.
Something like that:
uint64_t
tx_capa_to flags(uint32_t tx_capa)
{
uint64_t ol_flags;
ol_flags = 0;
if (tx_capa & DEV_TX_OFFLOAD_TCP_TSO)
ol_flags |= PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_IP_CKSUM | PKT_TX_IPV6;
if (tx_capa & DEV_TX_OFFLOAD_TCP_CKSUM)
ol_flags |= PKT_TX_TCP_CKSUM;
...
return ol_flags;
}
Then PMD writer wouldn't need to define TX_OFFLOAD_MASK for his PMD manually.
Instead he can just do at startup/configure phase:
txq->tx_offload_mask = tx_capa_to flags(supported_and_configured_capabilties);
Though, as I said, this is probably subject of another patch/discussion.
Konstantin
^ permalink raw reply [flat|nested] 39+ messages in thread
* [dpdk-dev] [PATCH v4 0/4] fix bitmask of supported Tx flags
2017-02-07 3:22 ` [dpdk-dev] [PATCH v3 0/4] " Jingjing Wu
` (3 preceding siblings ...)
2017-02-07 3:22 ` [dpdk-dev] [PATCH v3 4/4] mbuf: fix bitmask of Tx offload flags Jingjing Wu
@ 2017-02-08 5:05 ` Jingjing Wu
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 1/4] net/i40e: " Jingjing Wu
` (5 more replies)
4 siblings, 6 replies; 39+ messages in thread
From: Jingjing Wu @ 2017-02-08 5:05 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, olivier.matz, helin.zhang, konstantin.ananyev
Some Tx offload flags are missed in bitmask of all supported packet
Tx flags, it will cause rte_eth_tx_prepare fails when Tx burst packets.
v4 change:
- add PKT_TX_IEEE1588_TMST to PKT_TX_OFFLOAD_MASK
v3 changes:
- add PKT_TX_MACSEC to PKT_TX_OFFLOAD_MASK
- refine code of drivers' TX_OFFLOAD_MASK definition
v2 changes:
- redefine the PKT_TX_OFFLOAD_MASK
- fix more drivers
Jingjing Wu (4):
net/i40e: fix bitmask of supported Tx flags
net/ixgbe: fix bitmask of supported Tx flags
net/e1000: fix bitmask of supported Tx flags
mbuf: fix bitmask of Tx offload flags
drivers/net/e1000/igb_rxtx.c | 8 +++++++-
drivers/net/i40e/i40e_rxtx.c | 10 +++++++++-
drivers/net/ixgbe/ixgbe_rxtx.c | 8 +++++++-
lib/librte_mbuf/rte_mbuf.h | 4 +++-
4 files changed, 26 insertions(+), 4 deletions(-)
--
2.4.11
^ permalink raw reply [flat|nested] 39+ messages in thread
* [dpdk-dev] [PATCH v4 1/4] net/i40e: fix bitmask of supported Tx flags
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 0/4] fix bitmask of supported Tx flags Jingjing Wu
@ 2017-02-08 5:05 ` Jingjing Wu
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 2/4] net/ixgbe: " Jingjing Wu
` (4 subsequent siblings)
5 siblings, 0 replies; 39+ messages in thread
From: Jingjing Wu @ 2017-02-08 5:05 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, olivier.matz, helin.zhang, konstantin.ananyev
PKT_TX_TUNNEL_MASK and PKT_TX_IEEE1588_TMST are missed in bitmask
of all supported packet Tx flags by i40e. It will cause packet preparing
fail when sending tunnel packets with Tx offload.
This patch fixes it.
Fixes: 3f33e643e5c6 ("net/i40e: add Tx preparation")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/i40e_rxtx.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 608685f..48429cc 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -75,6 +75,12 @@
#define I40E_TXD_CMD (I40E_TX_DESC_CMD_EOP | I40E_TX_DESC_CMD_RS)
+#ifdef RTE_LIBRTE_IEEE1588
+#define I40E_TX_IEEE1588_TMST PKT_TX_IEEE1588_TMST
+#else
+#define I40E_TX_IEEE1588_TMST 0
+#endif
+
#define I40E_TX_CKSUM_OFFLOAD_MASK ( \
PKT_TX_IP_CKSUM | \
PKT_TX_L4_MASK | \
@@ -87,7 +93,9 @@
PKT_TX_OUTER_IP_CKSUM | \
PKT_TX_TCP_SEG | \
PKT_TX_QINQ_PKT | \
- PKT_TX_VLAN_PKT)
+ PKT_TX_VLAN_PKT | \
+ PKT_TX_TUNNEL_MASK | \
+ I40E_TX_IEEE1588_TMST)
#define I40E_TX_OFFLOAD_NOTSUP_MASK \
(PKT_TX_OFFLOAD_MASK ^ I40E_TX_OFFLOAD_MASK)
--
2.4.11
^ permalink raw reply [flat|nested] 39+ messages in thread
* [dpdk-dev] [PATCH v4 2/4] net/ixgbe: fix bitmask of supported Tx flags
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 0/4] fix bitmask of supported Tx flags Jingjing Wu
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 1/4] net/i40e: " Jingjing Wu
@ 2017-02-08 5:05 ` Jingjing Wu
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 3/4] net/e1000: " Jingjing Wu
` (3 subsequent siblings)
5 siblings, 0 replies; 39+ messages in thread
From: Jingjing Wu @ 2017-02-08 5:05 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, olivier.matz, helin.zhang, konstantin.ananyev
Add missed PKT_TX_IEEE1588_TMST to bitmask of all supported
packet Tx flags.
Fixes: 7829b8d52be0 ("net/ixgbe: add Tx preparation")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/ixgbe/ixgbe_rxtx.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 36f1c02..4d71992 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -80,6 +80,11 @@
#include "base/ixgbe_common.h"
#include "ixgbe_rxtx.h"
+#ifdef RTE_LIBRTE_IEEE1588
+#define IXGBE_TX_IEEE1588_TMST PKT_TX_IEEE1588_TMST
+#else
+#define IXGBE_TX_IEEE1588_TMST 0
+#endif
/* Bit Mask to indicate what bits required for building TX context */
#define IXGBE_TX_OFFLOAD_MASK ( \
PKT_TX_VLAN_PKT | \
@@ -87,7 +92,8 @@
PKT_TX_L4_MASK | \
PKT_TX_TCP_SEG | \
PKT_TX_MACSEC | \
- PKT_TX_OUTER_IP_CKSUM)
+ PKT_TX_OUTER_IP_CKSUM | \
+ IXGBE_TX_IEEE1588_TMST)
#define IXGBE_TX_OFFLOAD_NOTSUP_MASK \
(PKT_TX_OFFLOAD_MASK ^ IXGBE_TX_OFFLOAD_MASK)
--
2.4.11
^ permalink raw reply [flat|nested] 39+ messages in thread
* [dpdk-dev] [PATCH v4 3/4] net/e1000: fix bitmask of supported Tx flags
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 0/4] fix bitmask of supported Tx flags Jingjing Wu
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 1/4] net/i40e: " Jingjing Wu
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 2/4] net/ixgbe: " Jingjing Wu
@ 2017-02-08 5:05 ` Jingjing Wu
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 4/4] mbuf: fix bitmask of Tx offload flags Jingjing Wu
` (2 subsequent siblings)
5 siblings, 0 replies; 39+ messages in thread
From: Jingjing Wu @ 2017-02-08 5:05 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, olivier.matz, helin.zhang, konstantin.ananyev
Add missed PKT_TX_IEEE1588_TMST to bitmask of all supported
packet Tx flags.
Fixes: 2b76648872c9 ("net/e1000: add Tx preparation")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/e1000/igb_rxtx.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 45f3f24..c9cf392 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -72,12 +72,18 @@
#include "base/e1000_api.h"
#include "e1000_ethdev.h"
+#ifdef RTE_LIBRTE_IEEE1588
+#define IGB_TX_IEEE1588_TMST PKT_TX_IEEE1588_TMST
+#else
+#define IGB_TX_IEEE1588_TMST 0
+#endif
/* Bit Mask to indicate what bits required for building TX context */
#define IGB_TX_OFFLOAD_MASK ( \
PKT_TX_VLAN_PKT | \
PKT_TX_IP_CKSUM | \
PKT_TX_L4_MASK | \
- PKT_TX_TCP_SEG)
+ PKT_TX_TCP_SEG | \
+ IGB_TX_IEEE1588_TMST)
#define IGB_TX_OFFLOAD_NOTSUP_MASK \
(PKT_TX_OFFLOAD_MASK ^ IGB_TX_OFFLOAD_MASK)
--
2.4.11
^ permalink raw reply [flat|nested] 39+ messages in thread
* [dpdk-dev] [PATCH v4 4/4] mbuf: fix bitmask of Tx offload flags
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 0/4] fix bitmask of supported Tx flags Jingjing Wu
` (2 preceding siblings ...)
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 3/4] net/e1000: " Jingjing Wu
@ 2017-02-08 5:05 ` Jingjing Wu
2017-02-08 16:27 ` Olivier MATZ
2017-02-08 16:32 ` [dpdk-dev] [PATCH v4 0/4] fix bitmask of supported Tx flags Ferruh Yigit
2017-02-08 16:46 ` Ananyev, Konstantin
5 siblings, 1 reply; 39+ messages in thread
From: Jingjing Wu @ 2017-02-08 5:05 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, olivier.matz, helin.zhang, konstantin.ananyev
Add missed PKT_TX_MACSEC and PKT_TX_IEEE1588_TMST flags to bitmask of
all supported packet Tx offload features flags.
Fixes: 4fb7e803eb1a ("ethdev: add Tx preparation")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
lib/librte_mbuf/rte_mbuf.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 0d01167..ce57d47 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -298,9 +298,11 @@ extern "C" {
PKT_TX_L4_MASK | \
PKT_TX_OUTER_IP_CKSUM | \
PKT_TX_TCP_SEG | \
+ PKT_TX_IEEE1588_TMST | \
PKT_TX_QINQ_PKT | \
PKT_TX_VLAN_PKT | \
- PKT_TX_TUNNEL_MASK)
+ PKT_TX_TUNNEL_MASK | \
+ PKT_TX_MACSEC)
#define __RESERVED (1ULL << 61) /**< reserved for future mbuf use */
--
2.4.11
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [dpdk-dev] [PATCH v4 4/4] mbuf: fix bitmask of Tx offload flags
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 4/4] mbuf: fix bitmask of Tx offload flags Jingjing Wu
@ 2017-02-08 16:27 ` Olivier MATZ
0 siblings, 0 replies; 39+ messages in thread
From: Olivier MATZ @ 2017-02-08 16:27 UTC (permalink / raw)
To: Jingjing Wu; +Cc: dev, olivier.matz, helin.zhang, konstantin.ananyev
On Wed, 8 Feb 2017 13:05:53 +0800, Jingjing Wu <jingjing.wu@intel.com>
wrote:
> Add missed PKT_TX_MACSEC and PKT_TX_IEEE1588_TMST flags to bitmask of
> all supported packet Tx offload features flags.
>
> Fixes: 4fb7e803eb1a ("ethdev: add Tx preparation")
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> ---
> lib/librte_mbuf/rte_mbuf.h | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
> index 0d01167..ce57d47 100644
> --- a/lib/librte_mbuf/rte_mbuf.h
> +++ b/lib/librte_mbuf/rte_mbuf.h
> @@ -298,9 +298,11 @@ extern "C" {
> PKT_TX_L4_MASK | \
> PKT_TX_OUTER_IP_CKSUM | \
> PKT_TX_TCP_SEG | \
> + PKT_TX_IEEE1588_TMST | \
> PKT_TX_QINQ_PKT | \
> PKT_TX_VLAN_PKT | \
> - PKT_TX_TUNNEL_MASK)
> + PKT_TX_TUNNEL_MASK | \
> + PKT_TX_MACSEC)
>
> #define __RESERVED (1ULL << 61) /**< reserved for future
> mbuf use */
Acked-by: Olivier Matz <olivier.matz@6wind.com>
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [dpdk-dev] [PATCH v4 0/4] fix bitmask of supported Tx flags
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 0/4] fix bitmask of supported Tx flags Jingjing Wu
` (3 preceding siblings ...)
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 4/4] mbuf: fix bitmask of Tx offload flags Jingjing Wu
@ 2017-02-08 16:32 ` Ferruh Yigit
2017-02-09 1:13 ` Wu, Jingjing
2017-02-08 16:46 ` Ananyev, Konstantin
5 siblings, 1 reply; 39+ messages in thread
From: Ferruh Yigit @ 2017-02-08 16:32 UTC (permalink / raw)
To: Jingjing Wu, dev; +Cc: olivier.matz, helin.zhang, konstantin.ananyev
On 2/8/2017 5:05 AM, Jingjing Wu wrote:
> Some Tx offload flags are missed in bitmask of all supported packet
> Tx flags, it will cause rte_eth_tx_prepare fails when Tx burst packets.
>
> v4 change:
> - add PKT_TX_IEEE1588_TMST to PKT_TX_OFFLOAD_MASK
>
> v3 changes:
> - add PKT_TX_MACSEC to PKT_TX_OFFLOAD_MASK
> - refine code of drivers' TX_OFFLOAD_MASK definition
>
> v2 changes:
> - redefine the PKT_TX_OFFLOAD_MASK
> - fix more drivers
>
> Jingjing Wu (4):
> net/i40e: fix bitmask of supported Tx flags
> net/ixgbe: fix bitmask of supported Tx flags
> net/e1000: fix bitmask of supported Tx flags
Hi Jingjing,
Just to confirm, other drivers that use PKT_TX_OFFLOAD_MASK not updated
because they don't support newly added flags, right?
> mbuf: fix bitmask of Tx offload flags
>
> drivers/net/e1000/igb_rxtx.c | 8 +++++++-
> drivers/net/i40e/i40e_rxtx.c | 10 +++++++++-
> drivers/net/ixgbe/ixgbe_rxtx.c | 8 +++++++-
> lib/librte_mbuf/rte_mbuf.h | 4 +++-
> 4 files changed, 26 insertions(+), 4 deletions(-)
>
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [dpdk-dev] [PATCH v4 0/4] fix bitmask of supported Tx flags
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 0/4] fix bitmask of supported Tx flags Jingjing Wu
` (4 preceding siblings ...)
2017-02-08 16:32 ` [dpdk-dev] [PATCH v4 0/4] fix bitmask of supported Tx flags Ferruh Yigit
@ 2017-02-08 16:46 ` Ananyev, Konstantin
2017-02-09 14:37 ` Ferruh Yigit
5 siblings, 1 reply; 39+ messages in thread
From: Ananyev, Konstantin @ 2017-02-08 16:46 UTC (permalink / raw)
To: Wu, Jingjing, dev; +Cc: olivier.matz, Zhang, Helin
> -----Original Message-----
> From: Wu, Jingjing
> Sent: Wednesday, February 8, 2017 5:06 AM
> To: dev@dpdk.org
> Cc: Wu, Jingjing <jingjing.wu@intel.com>; olivier.matz@6wind.com; Zhang, Helin <helin.zhang@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>
> Subject: [PATCH v4 0/4] fix bitmask of supported Tx flags
>
> Some Tx offload flags are missed in bitmask of all supported packet
> Tx flags, it will cause rte_eth_tx_prepare fails when Tx burst packets.
>
> v4 change:
> - add PKT_TX_IEEE1588_TMST to PKT_TX_OFFLOAD_MASK
>
> v3 changes:
> - add PKT_TX_MACSEC to PKT_TX_OFFLOAD_MASK
> - refine code of drivers' TX_OFFLOAD_MASK definition
>
> v2 changes:
> - redefine the PKT_TX_OFFLOAD_MASK
> - fix more drivers
>
> Jingjing Wu (4):
> net/i40e: fix bitmask of supported Tx flags
> net/ixgbe: fix bitmask of supported Tx flags
> net/e1000: fix bitmask of supported Tx flags
> mbuf: fix bitmask of Tx offload flags
>
> drivers/net/e1000/igb_rxtx.c | 8 +++++++-
> drivers/net/i40e/i40e_rxtx.c | 10 +++++++++-
> drivers/net/ixgbe/ixgbe_rxtx.c | 8 +++++++-
> lib/librte_mbuf/rte_mbuf.h | 4 +++-
> 4 files changed, 26 insertions(+), 4 deletions(-)
>
> --
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> 2.4.11
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [dpdk-dev] [PATCH v4 0/4] fix bitmask of supported Tx flags
2017-02-08 16:32 ` [dpdk-dev] [PATCH v4 0/4] fix bitmask of supported Tx flags Ferruh Yigit
@ 2017-02-09 1:13 ` Wu, Jingjing
0 siblings, 0 replies; 39+ messages in thread
From: Wu, Jingjing @ 2017-02-09 1:13 UTC (permalink / raw)
To: Yigit, Ferruh, dev; +Cc: olivier.matz, Zhang, Helin, Ananyev, Konstantin
> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Thursday, February 9, 2017 12:33 AM
> To: Wu, Jingjing <jingjing.wu@intel.com>; dev@dpdk.org
> Cc: olivier.matz@6wind.com; Zhang, Helin <helin.zhang@intel.com>;
> Ananyev, Konstantin <konstantin.ananyev@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v4 0/4] fix bitmask of supported Tx flags
>
> On 2/8/2017 5:05 AM, Jingjing Wu wrote:
> > Some Tx offload flags are missed in bitmask of all supported packet Tx
> > flags, it will cause rte_eth_tx_prepare fails when Tx burst packets.
> >
> > v4 change:
> > - add PKT_TX_IEEE1588_TMST to PKT_TX_OFFLOAD_MASK
> >
> > v3 changes:
> > - add PKT_TX_MACSEC to PKT_TX_OFFLOAD_MASK
> > - refine code of drivers' TX_OFFLOAD_MASK definition
> >
> > v2 changes:
> > - redefine the PKT_TX_OFFLOAD_MASK
> > - fix more drivers
> >
> > Jingjing Wu (4):
> > net/i40e: fix bitmask of supported Tx flags
> > net/ixgbe: fix bitmask of supported Tx flags
> > net/e1000: fix bitmask of supported Tx flags
>
> Hi Jingjing,
>
> Just to confirm, other drivers that use PKT_TX_OFFLOAD_MASK not updated
> because they don't support newly added flags, right?
>
Yes, exactly!
Thanks
Jingjing
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [dpdk-dev] [PATCH v4 0/4] fix bitmask of supported Tx flags
2017-02-08 16:46 ` Ananyev, Konstantin
@ 2017-02-09 14:37 ` Ferruh Yigit
0 siblings, 0 replies; 39+ messages in thread
From: Ferruh Yigit @ 2017-02-09 14:37 UTC (permalink / raw)
To: Ananyev, Konstantin, Wu, Jingjing, dev; +Cc: olivier.matz, Zhang, Helin
On 2/8/2017 4:46 PM, Ananyev, Konstantin wrote:
>
>
>> -----Original Message-----
>> From: Wu, Jingjing
>> Sent: Wednesday, February 8, 2017 5:06 AM
>> To: dev@dpdk.org
>> Cc: Wu, Jingjing <jingjing.wu@intel.com>; olivier.matz@6wind.com; Zhang, Helin <helin.zhang@intel.com>; Ananyev, Konstantin
>> <konstantin.ananyev@intel.com>
>> Subject: [PATCH v4 0/4] fix bitmask of supported Tx flags
>>
>> Some Tx offload flags are missed in bitmask of all supported packet
>> Tx flags, it will cause rte_eth_tx_prepare fails when Tx burst packets.
>>
>> v4 change:
>> - add PKT_TX_IEEE1588_TMST to PKT_TX_OFFLOAD_MASK
>>
>> v3 changes:
>> - add PKT_TX_MACSEC to PKT_TX_OFFLOAD_MASK
>> - refine code of drivers' TX_OFFLOAD_MASK definition
>>
>> v2 changes:
>> - redefine the PKT_TX_OFFLOAD_MASK
>> - fix more drivers
>>
>> Jingjing Wu (4):
>> net/i40e: fix bitmask of supported Tx flags
>> net/ixgbe: fix bitmask of supported Tx flags
>> net/e1000: fix bitmask of supported Tx flags
>> mbuf: fix bitmask of Tx offload flags
>>
>> drivers/net/e1000/igb_rxtx.c | 8 +++++++-
>> drivers/net/i40e/i40e_rxtx.c | 10 +++++++++-
>> drivers/net/ixgbe/ixgbe_rxtx.c | 8 +++++++-
>> lib/librte_mbuf/rte_mbuf.h | 4 +++-
>> 4 files changed, 26 insertions(+), 4 deletions(-)
>>
>> --
>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Series applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 39+ messages in thread
end of thread, other threads:[~2017-02-09 14:37 UTC | newest]
Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-24 11:50 [dpdk-dev] [PATCH 1/2] mbuf: fix bitmask of Tx offload flags Jingjing Wu
2017-01-24 11:50 ` [dpdk-dev] [PATCH 2/2] net/i40e: fix bitmask of supported Tx flags Jingjing Wu
2017-01-26 14:19 ` [dpdk-dev] [PATCH 1/2] mbuf: fix bitmask of Tx offload flags Ferruh Yigit
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 0/5] fix bitmask of supported Tx flags Jingjing Wu
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 1/5] mbuf: fix bitmask of Tx offload flags Jingjing Wu
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 2/5] net/i40e: fix bitmask of supported Tx flags Jingjing Wu
2017-02-05 10:28 ` Ferruh Yigit
2017-02-06 3:02 ` Wu, Jingjing
2017-02-06 10:28 ` Olivier Matz
2017-02-07 2:30 ` Wu, Jingjing
2017-02-06 10:26 ` Olivier Matz
2017-02-07 2:30 ` Wu, Jingjing
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 3/5] net/ixgbe: " Jingjing Wu
2017-02-05 11:59 ` Ananyev, Konstantin
2017-02-05 12:10 ` Ananyev, Konstantin
2017-02-06 8:53 ` Wu, Jingjing
2017-02-06 12:11 ` Ananyev, Konstantin
2017-02-07 2:29 ` Wu, Jingjing
2017-02-08 0:34 ` Ananyev, Konstantin
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 4/5] net/e1000: " Jingjing Wu
2017-02-04 3:36 ` [dpdk-dev] [PATCH v2 5/5] net/fm10k: " Jingjing Wu
2017-02-07 3:22 ` [dpdk-dev] [PATCH v3 0/4] " Jingjing Wu
2017-02-07 3:22 ` [dpdk-dev] [PATCH v3 1/4] net/i40e: " Jingjing Wu
2017-02-07 13:48 ` Ferruh Yigit
2017-02-07 15:45 ` Wu, Jingjing
2017-02-07 16:01 ` Ferruh Yigit
2017-02-07 3:22 ` [dpdk-dev] [PATCH v3 2/4] net/ixgbe: " Jingjing Wu
2017-02-07 3:22 ` [dpdk-dev] [PATCH v3 3/4] net/e1000: " Jingjing Wu
2017-02-07 3:22 ` [dpdk-dev] [PATCH v3 4/4] mbuf: fix bitmask of Tx offload flags Jingjing Wu
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 0/4] fix bitmask of supported Tx flags Jingjing Wu
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 1/4] net/i40e: " Jingjing Wu
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 2/4] net/ixgbe: " Jingjing Wu
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 3/4] net/e1000: " Jingjing Wu
2017-02-08 5:05 ` [dpdk-dev] [PATCH v4 4/4] mbuf: fix bitmask of Tx offload flags Jingjing Wu
2017-02-08 16:27 ` Olivier MATZ
2017-02-08 16:32 ` [dpdk-dev] [PATCH v4 0/4] fix bitmask of supported Tx flags Ferruh Yigit
2017-02-09 1:13 ` Wu, Jingjing
2017-02-08 16:46 ` Ananyev, Konstantin
2017-02-09 14:37 ` Ferruh Yigit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).