DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
To: dev@dpdk.org
Cc: indranil@chelsio.com, nirranjan@chelsio.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH 5/6] net/cxgbe: fix wrong ingress port value set in filter spec
Date: Fri,  9 Nov 2018 13:26:27 +0530	[thread overview]
Message-ID: <042dd76c10f5dab0f04fd63062f470cc60f704ae.1541747960.git.rahul.lakkireddy@chelsio.com> (raw)
In-Reply-To: <cover.1541747960.git.rahul.lakkireddy@chelsio.com>
In-Reply-To: <cover.1541747960.git.rahul.lakkireddy@chelsio.com>

Set the "value" in the filter spec and not the "mask". Also, remove
duplicate comparison for hardware supported match items already done
earlier.

Fixes: af44a577988b ("net/cxgbe: support to offload flows to HASH region")
Cc: stable@dpdk.org

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/cxgbe_filter.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/net/cxgbe/cxgbe_filter.c b/drivers/net/cxgbe/cxgbe_filter.c
index ef1102be3..3a7912e48 100644
--- a/drivers/net/cxgbe/cxgbe_filter.c
+++ b/drivers/net/cxgbe/cxgbe_filter.c
@@ -263,8 +263,8 @@ static u64 hash_filter_ntuple(const struct filter_entry *f)
 	u64 ntuple = 0;
 	u16 tcp_proto = IPPROTO_TCP; /* TCP Protocol Number */
 
-	if (tp->port_shift >= 0)
-		ntuple |= (u64)f->fs.mask.iport << tp->port_shift;
+	if (tp->port_shift >= 0 && f->fs.mask.iport)
+		ntuple |= (u64)f->fs.val.iport << tp->port_shift;
 
 	if (tp->protocol_shift >= 0) {
 		if (!f->fs.val.proto)
@@ -278,9 +278,6 @@ static u64 hash_filter_ntuple(const struct filter_entry *f)
 	if (tp->macmatch_shift >= 0 && f->fs.mask.macidx)
 		ntuple |= (u64)(f->fs.val.macidx) << tp->macmatch_shift;
 
-	if (ntuple != tp->hash_filter_mask)
-		return 0;
-
 	return ntuple;
 }
 
-- 
2.18.0

  parent reply	other threads:[~2018-11-09  7:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-09  7:56 [dpdk-dev] [PATCH 0/6] net/cxgbe: bug fixes Rahul Lakkireddy
2018-11-09  7:56 ` [dpdk-dev] [PATCH 1/6] net/cxgbevf: add missing PCI uninitialization function for VF Rahul Lakkireddy
2018-11-09  7:56 ` [dpdk-dev] [PATCH 2/6] net/cxgbe: check Rx offload flags before doing VLAN strip offload Rahul Lakkireddy
2018-11-09  7:56 ` [dpdk-dev] [PATCH 3/6] net/cxgbe: fix check for redefined match items Rahul Lakkireddy
2018-11-09  7:56 ` [dpdk-dev] [PATCH 4/6] net/cxgbe: increase completion wait time for flow operations Rahul Lakkireddy
2018-11-09  7:56 ` Rahul Lakkireddy [this message]
2018-11-09  7:56 ` [dpdk-dev] [PATCH 6/6] net/cxgbevf: fix illegal memory access when freeing MPS TCAM Rahul Lakkireddy
2018-11-09 20:19 ` [dpdk-dev] [PATCH 0/6] net/cxgbe: bug fixes Ferruh Yigit

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=042dd76c10f5dab0f04fd63062f470cc60f704ae.1541747960.git.rahul.lakkireddy@chelsio.com \
    --to=rahul.lakkireddy@chelsio.com \
    --cc=dev@dpdk.org \
    --cc=indranil@chelsio.com \
    --cc=nirranjan@chelsio.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).