patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Matan Azrad <matan@mellanox.com>
Cc: Xiaoyu Min <jackmin@mellanox.com>, Ori Kam <orika@mellanox.com>,
	dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'ethdev: fix last item detection on RSS flow expand' has been queued to LTS release 18.11.6
Date: Wed, 11 Dec 2019 21:26:08 +0000	[thread overview]
Message-ID: <20191211212702.27851-16-ktraynor@redhat.com> (raw)
In-Reply-To: <20191211212702.27851-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/17/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/97a8a6723d88bdb4ff221f40d7391c7a32625bd3

Thanks.

Kevin.

---
From 97a8a6723d88bdb4ff221f40d7391c7a32625bd3 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Mon, 11 Nov 2019 10:42:05 +0000
Subject: [PATCH] ethdev: fix last item detection on RSS flow expand

[ upstream commit eccc5d3237fc549ba647654a7f74f8b9e9dcaf6d ]

There is a rte_flow API which expands a RSS flow pattern to multiple
patterns according to the RSS hash types in the RSS action
configuration.

As part of the expansion, detection of the last item of the flow uses
the "next proto" field of the last configured item in the pattern list.
Wrongly, the mask of this field was not considered in order to validate
the field.

Ignore "next proto" fields when their corresponded masks invalidate them.

Fixes: fc2dd8dd492f ("ethdev: fix expand RSS flows")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
 lib/librte_ethdev/rte_flow.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c
index 5725aceda..7bfc06db7 100644
--- a/lib/librte_ethdev/rte_flow.c
+++ b/lib/librte_ethdev/rte_flow.c
@@ -163,5 +163,7 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
 	enum rte_flow_item_type ret = RTE_FLOW_ITEM_TYPE_VOID;
 	uint16_t ether_type = 0;
+	uint16_t ether_type_m;
 	uint8_t ip_next_proto = 0;
+	uint8_t ip_next_proto_m;
 
 	if (item == NULL || item->spec == NULL)
@@ -169,4 +171,11 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
 	switch (item->type) {
 	case RTE_FLOW_ITEM_TYPE_ETH:
+		if (item->mask)
+			ether_type_m = ((const struct rte_flow_item_eth *)
+						(item->mask))->type;
+		else
+			ether_type_m = rte_flow_item_eth_mask.type;
+		if (ether_type_m != RTE_BE16(0xFFFF))
+			break;
 		ether_type = ((const struct rte_flow_item_eth *)
 				(item->spec))->type;
@@ -179,4 +188,11 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
 		break;
 	case RTE_FLOW_ITEM_TYPE_VLAN:
+		if (item->mask)
+			ether_type_m = ((const struct rte_flow_item_vlan *)
+						(item->mask))->inner_type;
+		else
+			ether_type_m = rte_flow_item_vlan_mask.inner_type;
+		if (ether_type_m != RTE_BE16(0xFFFF))
+			break;
 		ether_type = ((const struct rte_flow_item_vlan *)
 				(item->spec))->inner_type;
@@ -189,4 +205,12 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
 		break;
 	case RTE_FLOW_ITEM_TYPE_IPV4:
+		if (item->mask)
+			ip_next_proto_m = ((const struct rte_flow_item_ipv4 *)
+					(item->mask))->hdr.next_proto_id;
+		else
+			ip_next_proto_m =
+				rte_flow_item_ipv4_mask.hdr.next_proto_id;
+		if (ip_next_proto_m != 0xFF)
+			break;
 		ip_next_proto = ((const struct rte_flow_item_ipv4 *)
 				(item->spec))->hdr.next_proto_id;
@@ -201,4 +225,12 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
 		break;
 	case RTE_FLOW_ITEM_TYPE_IPV6:
+		if (item->mask)
+			ip_next_proto_m = ((const struct rte_flow_item_ipv6 *)
+						(item->mask))->hdr.proto;
+		else
+			ip_next_proto_m =
+				rte_flow_item_ipv6_mask.hdr.proto;
+		if (ip_next_proto_m != 0xFF)
+			break;
 		ip_next_proto = ((const struct rte_flow_item_ipv6 *)
 				(item->spec))->hdr.proto;
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-11 21:24:14.047572816 +0000
+++ 0016-ethdev-fix-last-item-detection-on-RSS-flow-expand.patch	2019-12-11 21:24:12.599652623 +0000
@@ -1 +1 @@
-From eccc5d3237fc549ba647654a7f74f8b9e9dcaf6d Mon Sep 17 00:00:00 2001
+From 97a8a6723d88bdb4ff221f40d7391c7a32625bd3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit eccc5d3237fc549ba647654a7f74f8b9e9dcaf6d ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 8ec9c90cd..d7f29e532 100644
+index 5725aceda..7bfc06db7 100644
@@ -31 +32 @@
-@@ -219,5 +219,7 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
+@@ -163,5 +163,7 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
@@ -39 +40 @@
-@@ -225,4 +227,11 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
+@@ -169,4 +171,11 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
@@ -51 +52 @@
-@@ -235,4 +244,11 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
+@@ -179,4 +188,11 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
@@ -63 +64 @@
-@@ -245,4 +261,12 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
+@@ -189,4 +205,12 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
@@ -76 +77 @@
-@@ -257,4 +281,12 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
+@@ -201,4 +225,12 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)


  parent reply	other threads:[~2019-12-11 21:28 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-11 21:25 [dpdk-stable] patch 'net/qede: fix setting MTU' " Kevin Traynor
2019-12-11 21:25 ` [dpdk-stable] patch 'net/qede: fix setting VLAN strip mode' " Kevin Traynor
2019-12-11 21:25 ` [dpdk-stable] patch 'net/ixgbe: support packet type with NEON' " Kevin Traynor
2019-12-11 21:25 ` [dpdk-stable] patch 'net/ixgbe: fix MACsec setting' " Kevin Traynor
2019-12-12  2:42   ` Sun, GuinanX
2019-12-12 10:01     ` Kevin Traynor
2019-12-11 21:25 ` [dpdk-stable] patch 'net/ixgbe: fix performance drop caused by MACsec' " Kevin Traynor
2019-12-11 21:25 ` [dpdk-stable] patch 'net/ixgbe: fix link status' " Kevin Traynor
2019-12-11 21:25 ` [dpdk-stable] patch 'net/bnxt: fix debug log level' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/bnxt: fix L4 checksum indication in non-vector Rx' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/bnxt: fix IP checksum error indication' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'vhost: do not limit packed ring size' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'vhost: fix build dependency on hash lib' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/virtio-user: fix setting filters' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/mlx5: allow pattern start from IP' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'ethdev: fix expand RSS flows' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'ethdev: fix item expansion for RSS flow' " Kevin Traynor
2019-12-11 21:26 ` Kevin Traynor [this message]
2019-12-11 21:26 ` [dpdk-stable] patch 'eal: add ack interrupt API' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/qede: use ack in interrupt handlers' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/enic: re-enable link status change interrupt' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/sfc: fix adapter lock usage on rule creation' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'app/testpmd: block xstats for hidden ports' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/dpaa2: fix Rx offload flags on jumbo MTU set' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'examples/vm_power: fix OOB frequency oscillations' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'bus/pci: align next mapping address on page boundary' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'test: optimise fd closing in forks' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'doc: fix internal links for older releases' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'doc: fix link to AESNI mb external library' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'doc/guides: clean repeated words' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'mempool: use actual IOVA addresses when populating' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'build: remove unneeded meson option' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'lib: fix log typos' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'lib: fix doxygen " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'malloc: fix realloc copy size' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'malloc: fix realloc padded element " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix default configuration' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'examples/fips_validation: fix auth verify' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/mlx5: fix check of RSS queue index' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/bnxt: fix crash in xstats get' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/bonding: fix selection logic' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'ethdev: avoid undefined behaviour on configuration copy' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/bnxt: fix resource qcaps with older FW' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'app/testpmd: report invalid command line parameter' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'examples: hide error for missing pkg-config path flag' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'common/octeontx: add missing public symbol' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'app/testpmd: fix invalid port detaching' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'power: handle frequency increase with turbo disabled' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'mk: remove library search path from binary' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'examples/multi_process: check server port validity' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'examples/multi_process: fix client crash with sparse ports' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'app/eventdev: fix divide by zero' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'app/eventdev: check function errors' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'app/crypto-perf: fix input of AEAD decrypt' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'doc: fix l2fwd-crypto usage in CCP guide' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'crypto/ccp: fix maximum queues and burst size' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'crypto/ccp: fix CPU authentication crash' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'crypto/ccp: fix scheduling of burst' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'crypto/ccp: fix digest size capabilities' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'malloc: fix memory element size in case of padding' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'eal: fix header file install with meson' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/virtio-user: drop attribute unused for memory callback' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'doc: fix tap guide' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/e1000: fix link status update' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/ixgbe: fix link status' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/e1000: " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/ifc: check VFIO query error' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'ethdev: limit maximum number of queues' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'event/octeontx: fix partial Rx packet handling' " Kevin Traynor
2019-12-11 21:27 ` [dpdk-stable] patch 'test/service: fix wait for service core' " Kevin Traynor
2019-12-11 21:27 ` [dpdk-stable] patch 'usertools: fix typo in SPDX tag of telemetry script' " Kevin Traynor
2019-12-11 21:27 ` [dpdk-stable] patch 'doc: update arm64 cross build tool version' " Kevin Traynor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191211212702.27851-16-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=jackmin@mellanox.com \
    --cc=matan@mellanox.com \
    --cc=orika@mellanox.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).