DPDK patches and discussions
 help / color / mirror / Atom feed
From: Junfeng Guo <junfeng.guo@intel.com>
To: qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com
Cc: dev@dpdk.org, junfeng.guo@intel.com
Subject: [dpdk-dev] [PATCH v3 2/2] net/iavf: support RSS for IPv6 prefix 64bit
Date: Tue, 15 Sep 2020 14:26:09 +0800
Message-ID: <20200915062609.3786061-3-junfeng.guo@intel.com> (raw)
In-Reply-To: <20200915062609.3786061-1-junfeng.guo@intel.com>

RSS for IPv6 prefix 64bit fields are supported in this patch, so that
we can use prefix instead of full IPv6 address for RSS. The prefix
here only includes the first 64 bits of both SRC and DST IPv6 address.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
---
 drivers/net/iavf/iavf_hash.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index d8a4dc8bf..c270daf5f 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -580,7 +580,28 @@ iavf_refine_proto_hdrs_l234(struct virtchnl_proto_hdrs *proto_hdrs,
 			}
 			break;
 		case VIRTCHNL_PROTO_HDR_IPV6:
+			if (rss_type & RTE_ETH_RSS_L3_PRE64) {
+				REFINE_PROTO_FLD(DEL, IPV6_SRC);
+				REFINE_PROTO_FLD(DEL, IPV6_DST);
+				REFINE_PROTO_FLD(ADD, IPV6_PREFIX64_SRC);
+				REFINE_PROTO_FLD(ADD, IPV6_PREFIX64_DST);
+			}
 			if (rss_type &
+			    (ETH_RSS_IPV6_PRE64 |
+			     ETH_RSS_IPV6_PRE64_UDP |
+			     ETH_RSS_IPV6_PRE64_TCP |
+			     ETH_RSS_IPV6_PRE64_SCTP)) {
+				if (rss_type & ETH_RSS_L3_SRC_ONLY)
+					REFINE_PROTO_FLD(DEL,
+							 IPV6_PREFIX64_DST);
+				else if (rss_type & ETH_RSS_L3_DST_ONLY)
+					REFINE_PROTO_FLD(DEL,
+							 IPV6_PREFIX64_SRC);
+				else if (rss_type &
+					 (ETH_RSS_L4_SRC_ONLY |
+					  ETH_RSS_L4_DST_ONLY))
+					hdr->field_selector = 0;
+			} else if (rss_type &
 			    (ETH_RSS_IPV6 |
 			     ETH_RSS_NONFRAG_IPV6_UDP |
 			     ETH_RSS_NONFRAG_IPV6_TCP |
-- 
2.25.1


  parent reply	other threads:[~2020-09-15  6:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-03 10:28 [dpdk-dev] [PATCH 0/2] add AVF RSS support for IPv6 prefix Junfeng Guo
2020-08-03 10:28 ` [dpdk-dev] [PATCH 1/2] common/iavf: support virtual channel " Junfeng Guo
2020-08-03 10:28 ` [dpdk-dev] [PATCH 2/2] net/iavf: support RSS for IPv6 prefix 64bit Junfeng Guo
2020-08-04 12:39 ` [dpdk-dev] [PATCH v2 0/3] add AVF RSS support for IPv6 prefix Junfeng Guo
2020-08-04 12:39   ` [dpdk-dev] [PATCH v2 1/3] common/iavf: support virtual channel " Junfeng Guo
2020-08-04 12:39   ` [dpdk-dev] [PATCH v2 2/3] net/iavf: support RSS for IPv6 prefix 64bit Junfeng Guo
2020-08-04 12:39   ` [dpdk-dev] [PATCH v2 3/3] net/iavf: support RSS for GTPU " Junfeng Guo
2020-09-15  6:26   ` [dpdk-dev] [PATCH v3 0/2] add AVF RSS support for IPv6 prefix Junfeng Guo
2020-09-15  6:26     ` [dpdk-dev] [PATCH v3 1/2] net/iavf: replace function name with macro Junfeng Guo
2020-09-15  6:26     ` Junfeng Guo [this message]
2020-09-15  8:17     ` [dpdk-dev] [PATCH v4 0/2] add AVF RSS support for IPv6 prefix Junfeng Guo
2020-09-15  8:17       ` [dpdk-dev] [PATCH v4 1/2] net/iavf: replace function name with macro Junfeng Guo
2020-09-15  8:17       ` [dpdk-dev] [PATCH v4 2/2] net/iavf: support RSS for IPv6 prefix 64bit Junfeng Guo
2020-09-15  8:40       ` [dpdk-dev] [PATCH v4 0/2] add AVF RSS support for IPv6 prefix Zhang, Qi Z

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=20200915062609.3786061-3-junfeng.guo@intel.com \
    --to=junfeng.guo@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=qi.z.zhang@intel.com \
    /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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git