DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: <dev@dpdk.org>
Cc: Ivan Malov <ivan.malov@oktetlabs.ru>
Subject: [dpdk-dev] [PATCH 1/7] net/sfc: make flow RSS details VNIC-specific
Date: Thu, 5 Mar 2020 10:47:47 +0000	[thread overview]
Message-ID: <1583405273-14176-2-git-send-email-arybchenko@solarflare.com> (raw)
In-Reply-To: <1583405273-14176-1-git-send-email-arybchenko@solarflare.com>

From: Ivan Malov <ivan.malov@oktetlabs.ru>

The flow specification structure will be transformed to a generic one, and
its current contents will be fenced off to form a VNIC-specific parameters.
Flow RSS details do not belong to the said specification currently, albeit
being VNIC-specific. This patch addresses this issue as a preparation step.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_flow.c | 12 ++++++------
 drivers/net/sfc/sfc_flow.h |  6 ++++--
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c
index 8d636f692..f285ba552 100644
--- a/drivers/net/sfc/sfc_flow.c
+++ b/drivers/net/sfc/sfc_flow.c
@@ -1262,7 +1262,7 @@ sfc_flow_parse_rss(struct sfc_adapter *sa,
 	unsigned int rxq_hw_index_max;
 	efx_rx_hash_type_t efx_hash_types;
 	const uint8_t *rss_key;
-	struct sfc_flow_rss *sfc_rss_conf = &flow->rss_conf;
+	struct sfc_flow_rss *sfc_rss_conf = &flow->spec.rss_conf;
 	unsigned int i;
 
 	if (action_rss->queue_num == 0)
@@ -1334,7 +1334,7 @@ sfc_flow_parse_rss(struct sfc_adapter *sa,
 		rss_key = rss->key;
 	}
 
-	flow->rss = B_TRUE;
+	flow->spec.rss = B_TRUE;
 
 	sfc_rss_conf->rxq_hw_index_min = rxq_hw_index_min;
 	sfc_rss_conf->rxq_hw_index_max = rxq_hw_index_max;
@@ -1402,12 +1402,12 @@ sfc_flow_filter_insert(struct sfc_adapter *sa,
 {
 	struct sfc_adapter_shared * const sas = sfc_sa2shared(sa);
 	struct sfc_rss *rss = &sas->rss;
-	struct sfc_flow_rss *flow_rss = &flow->rss_conf;
+	struct sfc_flow_rss *flow_rss = &flow->spec.rss_conf;
 	uint32_t efs_rss_context = EFX_RSS_CONTEXT_DEFAULT;
 	unsigned int i;
 	int rc = 0;
 
-	if (flow->rss) {
+	if (flow->spec.rss) {
 		unsigned int rss_spread = MIN(flow_rss->rxq_hw_index_max -
 					      flow_rss->rxq_hw_index_min + 1,
 					      EFX_MAXRSS);
@@ -1450,7 +1450,7 @@ sfc_flow_filter_insert(struct sfc_adapter *sa,
 	if (rc != 0)
 		goto fail_filter_insert;
 
-	if (flow->rss) {
+	if (flow->spec.rss) {
 		/*
 		 * Scale table is set after filter insertion because
 		 * the table entries are relative to the base RxQ ID
@@ -1491,7 +1491,7 @@ sfc_flow_filter_remove(struct sfc_adapter *sa,
 	if (rc != 0)
 		return rc;
 
-	if (flow->rss) {
+	if (flow->spec.rss) {
 		/*
 		 * All specifications for a given flow rule have the same RSS
 		 * context, so that RSS context value is taken from the first
diff --git a/drivers/net/sfc/sfc_flow.h b/drivers/net/sfc/sfc_flow.h
index 71ec18cb9..14a6b5d14 100644
--- a/drivers/net/sfc/sfc_flow.h
+++ b/drivers/net/sfc/sfc_flow.h
@@ -43,13 +43,15 @@ struct sfc_flow_spec {
 	efx_filter_spec_t filters[SF_FLOW_SPEC_NB_FILTERS_MAX];
 	/* number of complete specifications */
 	unsigned int count;
+	/* RSS toggle */
+	boolean_t rss;
+	/* RSS configuration */
+	struct sfc_flow_rss rss_conf;
 };
 
 /* PMD-specific definition of the opaque type from rte_flow.h */
 struct rte_flow {
 	struct sfc_flow_spec spec;	/* flow spec for hardware filter(s) */
-	boolean_t rss;			/* RSS toggle */
-	struct sfc_flow_rss rss_conf;	/* RSS configuration */
 	TAILQ_ENTRY(rte_flow) entries;	/* flow list entries */
 };
 
-- 
2.17.1


  reply	other threads:[~2020-03-05 10:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05 10:47 [dpdk-dev] [PATCH 0/7] net/sfc: prepare rte_flow to have one more backend Andrew Rybchenko
2020-03-05 10:47 ` Andrew Rybchenko [this message]
2020-03-05 10:47 ` [dpdk-dev] [PATCH 2/7] net/sfc: make the flow list engine-agnostic Andrew Rybchenko
2020-03-05 10:47 ` [dpdk-dev] [PATCH 3/7] net/sfc: generalise the flow specification structure Andrew Rybchenko
2020-03-05 10:47 ` [dpdk-dev] [PATCH 4/7] net/sfc: introduce flow allocation and free path Andrew Rybchenko
2020-03-05 10:47 ` [dpdk-dev] [PATCH 5/7] net/sfc: generalise flow parsing Andrew Rybchenko
2020-03-05 10:47 ` [dpdk-dev] [PATCH 6/7] net/sfc: generalise flow start and stop path Andrew Rybchenko
2020-03-05 10:47 ` [dpdk-dev] [PATCH 7/7] net/sfc: generalise flow pattern item processing Andrew Rybchenko
2020-03-06 16:51 ` [dpdk-dev] [PATCH 0/7] net/sfc: prepare rte_flow to have one more backend 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=1583405273-14176-2-git-send-email-arybchenko@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ivan.malov@oktetlabs.ru \
    /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).