DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/3] net/enic: minor bug fixes
@ 2018-10-20  8:32 Hyong Youb Kim
  2018-10-20  8:32 ` [dpdk-dev] [PATCH 1/3] net/enic: fix supported packet types Hyong Youb Kim
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Hyong Youb Kim @ 2018-10-20  8:32 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, John Daley, Hyong Youb Kim

Fix a couple bugs found during internal testing, and update the
release notes, which was missing in previous patches.

The second patch ("net/enic: add missing Tx offload flags") addresses
a side effect from the following commit, which adds several previously
existing flags (e.g. PKT_TX_IPV4) to PKT_TX_OFFLOAD_MASK. The enic
driver, like a few other drivers, uses 'not-supported offload mask'
derived from PKT_TX_OFFLOAD_MASK to detect bad mbufs in
tx_pkt_prepare. And this mask needs an update to account for the added
flags. At least i40e is also affected.

commit ef28cfa73822 ("mbuf: fix Tx offload mask")

Hyong Youb Kim (3):
  net/enic: fix supported packet types
  net/enic: add missing Tx offload flags
  doc: update release notes for the enic driver

 doc/guides/rel_notes/release_18_11.rst |  7 +++++++
 drivers/net/enic/enic_ethdev.c         | 30 +++++++++++++++++++++++++++---
 drivers/net/enic/enic_main.c           |  6 ++----
 drivers/net/enic/enic_res.c            |  2 ++
 4 files changed, 38 insertions(+), 7 deletions(-)

-- 
2.16.2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [dpdk-dev] [PATCH 1/3] net/enic: fix supported packet types
  2018-10-20  8:32 [dpdk-dev] [PATCH 0/3] net/enic: minor bug fixes Hyong Youb Kim
@ 2018-10-20  8:32 ` Hyong Youb Kim
  2018-10-22 14:20   ` Ferruh Yigit
  2018-10-20  8:32 ` [dpdk-dev] [PATCH 2/3] net/enic: add missing Tx offload flags Hyong Youb Kim
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Hyong Youb Kim @ 2018-10-20  8:32 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, John Daley, Hyong Youb Kim

The handler for dev_supported_ptypes_get currently returns null when
the vectorized Rx handler is used. It is also missing tunnel packet
types. Add the missing packet types to the supported list, and return
the right list for the vectorized Rx handler.

Fixes: 8a6ff33d6d36 ("net/enic: add AVX2 based vectorized Rx handler")
Fixes: 93fb21fdbe23 ("net/enic: enable overlay offload for VXLAN and GENEVE")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic_ethdev.c | 30 +++++++++++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)

diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 4d450fe0c..1a129f414 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -522,10 +522,34 @@ static const uint32_t *enicpmd_dev_supported_ptypes_get(struct rte_eth_dev *dev)
 		RTE_PTYPE_L4_NONFRAG,
 		RTE_PTYPE_UNKNOWN
 	};
+	static const uint32_t ptypes_overlay[] = {
+		RTE_PTYPE_L2_ETHER,
+		RTE_PTYPE_L2_ETHER_VLAN,
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN,
+		RTE_PTYPE_L3_IPV6_EXT_UNKNOWN,
+		RTE_PTYPE_L4_TCP,
+		RTE_PTYPE_L4_UDP,
+		RTE_PTYPE_L4_FRAG,
+		RTE_PTYPE_L4_NONFRAG,
+		RTE_PTYPE_TUNNEL_GRENAT,
+		RTE_PTYPE_INNER_L2_ETHER,
+		RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN,
+		RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN,
+		RTE_PTYPE_INNER_L4_TCP,
+		RTE_PTYPE_INNER_L4_UDP,
+		RTE_PTYPE_INNER_L4_FRAG,
+		RTE_PTYPE_INNER_L4_NONFRAG,
+		RTE_PTYPE_UNKNOWN
+	};
 
-	if (dev->rx_pkt_burst == enic_recv_pkts ||
-	    dev->rx_pkt_burst == enic_noscatter_recv_pkts)
-		return ptypes;
+	if (dev->rx_pkt_burst != enic_dummy_recv_pkts &&
+	    dev->rx_pkt_burst != NULL) {
+		struct enic *enic = pmd_priv(dev);
+		if (enic->overlay_offload)
+			return ptypes_overlay;
+		else
+			return ptypes;
+	}
 	return NULL;
 }
 
-- 
2.16.2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [dpdk-dev] [PATCH 2/3] net/enic: add missing Tx offload flags
  2018-10-20  8:32 [dpdk-dev] [PATCH 0/3] net/enic: minor bug fixes Hyong Youb Kim
  2018-10-20  8:32 ` [dpdk-dev] [PATCH 1/3] net/enic: fix supported packet types Hyong Youb Kim
@ 2018-10-20  8:32 ` Hyong Youb Kim
  2018-10-20  8:32 ` [dpdk-dev] [PATCH 3/3] doc: update release notes for the enic driver Hyong Youb Kim
  2018-10-22 14:27 ` [dpdk-dev] [PATCH 0/3] net/enic: minor bug fixes Ferruh Yigit
  3 siblings, 0 replies; 6+ messages in thread
From: Hyong Youb Kim @ 2018-10-20  8:32 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, John Daley, Hyong Youb Kim

The following commit has added a number of existing offload flags such
as PKT_TX_IPV4 and PKT_TX_IPV6 to PKT_TX_OFFLOAD_MASK defined in
rte_mbuf.h. That change breaks the enic driver's Tx prepare handler.

commit ef28cfa73822 ("mbuf: fix Tx offload mask")

The enic driver keeps the supported offload flags in a local variable
(tx_offload_mask), which is strictly a subset of
PKT_TX_OFFLOAD_MASK. This variable is then used to compute the
unsupported flags (tx_offload_notsup_mask), and the Tx prepare handler
(tx_pkt_prepare) uses it to reject packets with unsupported offload
flags.

As is, tx_offload_notsup_mask ends up containing flags like
PKT_TX_IPV4 that are actually supported by the driver, which then
breaks any application that uses checksum offloads and calls the Tx
prepare handler. So add the flags to tx_offload_mask that the driver
supports but were missing in PKT_TX_OFFLOAD_MASK.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic_main.c | 6 ++----
 drivers/net/enic/enic_res.c  | 2 ++
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index b2581322d..e81c3f3b7 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1710,11 +1710,9 @@ static int enic_dev_init(struct enic *enic)
 			DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
 			DEV_TX_OFFLOAD_GENEVE_TNL_TSO |
 			DEV_TX_OFFLOAD_VXLAN_TNL_TSO;
-		/*
-		 * Do not add PKT_TX_OUTER_{IPV4,IPV6} as they are not
-		 * 'offload' flags (i.e. not part of PKT_TX_OFFLOAD_MASK).
-		 */
 		enic->tx_offload_mask |=
+			PKT_TX_OUTER_IPV6 |
+			PKT_TX_OUTER_IPV4 |
 			PKT_TX_OUTER_IP_CKSUM |
 			PKT_TX_TUNNEL_MASK;
 		enic->overlay_offload = true;
diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c
index 28ae823f4..24b2844f3 100644
--- a/drivers/net/enic/enic_res.c
+++ b/drivers/net/enic/enic_res.c
@@ -202,6 +202,8 @@ int enic_get_vnic_config(struct enic *enic)
 		DEV_RX_OFFLOAD_UDP_CKSUM |
 		DEV_RX_OFFLOAD_TCP_CKSUM;
 	enic->tx_offload_mask =
+		PKT_TX_IPV6 |
+		PKT_TX_IPV4 |
 		PKT_TX_VLAN |
 		PKT_TX_IP_CKSUM |
 		PKT_TX_L4_MASK |
-- 
2.16.2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [dpdk-dev] [PATCH 3/3] doc: update release notes for the enic driver
  2018-10-20  8:32 [dpdk-dev] [PATCH 0/3] net/enic: minor bug fixes Hyong Youb Kim
  2018-10-20  8:32 ` [dpdk-dev] [PATCH 1/3] net/enic: fix supported packet types Hyong Youb Kim
  2018-10-20  8:32 ` [dpdk-dev] [PATCH 2/3] net/enic: add missing Tx offload flags Hyong Youb Kim
@ 2018-10-20  8:32 ` Hyong Youb Kim
  2018-10-22 14:27 ` [dpdk-dev] [PATCH 0/3] net/enic: minor bug fixes Ferruh Yigit
  3 siblings, 0 replies; 6+ messages in thread
From: Hyong Youb Kim @ 2018-10-20  8:32 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, John Daley, Hyong Youb Kim

Fixes: 8a6ff33d6d36 ("net/enic: add AVX2 based vectorized Rx handler")
Fixes: 86df6c4e2fce ("net/enic: support flow counter action")
Fixes: 70401fd7784d ("net/enic: add VLAN and csum offloads to simple Tx handler")
Fixes: c0aae00d7da0 ("net/enic: enable IOVA mode")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 doc/guides/rel_notes/release_18_11.rst | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/doc/guides/rel_notes/release_18_11.rst b/doc/guides/rel_notes/release_18_11.rst
index a6cfce4fd..ea55736a2 100644
--- a/doc/guides/rel_notes/release_18_11.rst
+++ b/doc/guides/rel_notes/release_18_11.rst
@@ -142,6 +142,13 @@ New Features
   * Support for runtime Rx and Tx queues setup.
   * Support multicast MAC address set.
 
+* **Updated the enic driver.**
+
+  * Added AVX2-based vectorized Rx handler.
+  * Added VLAN and checksum offloads to the simple Tx handler.
+  * Added the count flow action.
+  * Enabled the virtual address IOVA mode.
+
 * **Added a devarg to use PCAP interface physical MAC address.**
   A new devarg ``phy_mac`` was introduced to allow users to use physical
   MAC address of the selected PCAP interface.
-- 
2.16.2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH 1/3] net/enic: fix supported packet types
  2018-10-20  8:32 ` [dpdk-dev] [PATCH 1/3] net/enic: fix supported packet types Hyong Youb Kim
@ 2018-10-22 14:20   ` Ferruh Yigit
  0 siblings, 0 replies; 6+ messages in thread
From: Ferruh Yigit @ 2018-10-22 14:20 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: dev, John Daley

On 10/20/2018 9:32 AM, Hyong Youb Kim wrote:
> The handler for dev_supported_ptypes_get currently returns null when
> the vectorized Rx handler is used. It is also missing tunnel packet
> types. Add the missing packet types to the supported list, and return
> the right list for the vectorized Rx handler.
> 
> Fixes: 8a6ff33d6d36 ("net/enic: add AVX2 based vectorized Rx handler")
> Fixes: 93fb21fdbe23 ("net/enic: enable overlay offload for VXLAN and GENEVE")
> 
> Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
> Reviewed-by: John Daley <johndale@cisco.com>

    Cc: stable@dpdk.org

To request patch to be backported.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH 0/3] net/enic: minor bug fixes
  2018-10-20  8:32 [dpdk-dev] [PATCH 0/3] net/enic: minor bug fixes Hyong Youb Kim
                   ` (2 preceding siblings ...)
  2018-10-20  8:32 ` [dpdk-dev] [PATCH 3/3] doc: update release notes for the enic driver Hyong Youb Kim
@ 2018-10-22 14:27 ` Ferruh Yigit
  3 siblings, 0 replies; 6+ messages in thread
From: Ferruh Yigit @ 2018-10-22 14:27 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: dev, John Daley

On 10/20/2018 9:32 AM, Hyong Youb Kim wrote:
> Fix a couple bugs found during internal testing, and update the
> release notes, which was missing in previous patches.
> 
> The second patch ("net/enic: add missing Tx offload flags") addresses
> a side effect from the following commit, which adds several previously
> existing flags (e.g. PKT_TX_IPV4) to PKT_TX_OFFLOAD_MASK. The enic
> driver, like a few other drivers, uses 'not-supported offload mask'
> derived from PKT_TX_OFFLOAD_MASK to detect bad mbufs in
> tx_pkt_prepare. And this mask needs an update to account for the added
> flags. At least i40e is also affected.

Thanks for hint, we will check it.

> 
> commit ef28cfa73822 ("mbuf: fix Tx offload mask")
> 
> Hyong Youb Kim (3):
>   net/enic: fix supported packet types
>   net/enic: add missing Tx offload flags
>   doc: update release notes for the enic driver

Series applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-10-22 14:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-20  8:32 [dpdk-dev] [PATCH 0/3] net/enic: minor bug fixes Hyong Youb Kim
2018-10-20  8:32 ` [dpdk-dev] [PATCH 1/3] net/enic: fix supported packet types Hyong Youb Kim
2018-10-22 14:20   ` Ferruh Yigit
2018-10-20  8:32 ` [dpdk-dev] [PATCH 2/3] net/enic: add missing Tx offload flags Hyong Youb Kim
2018-10-20  8:32 ` [dpdk-dev] [PATCH 3/3] doc: update release notes for the enic driver Hyong Youb Kim
2018-10-22 14:27 ` [dpdk-dev] [PATCH 0/3] net/enic: minor bug fixes 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).