From: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
To: dev@dpdk.org
Cc: kirill.rybalchenko@intel.com, andrey.chilikin@intel.com,
beilei.xing@intel.com
Subject: [dpdk-dev] [PATCH 4/5] net/i40e: change list of parameters for functions mapping flow type to pctype and back
Date: Thu, 24 Aug 2017 11:20:43 +0100 [thread overview]
Message-ID: <1503570044-104133-5-git-send-email-kirill.rybalchenko@intel.com> (raw)
In-Reply-To: <1503570044-104133-1-git-send-email-kirill.rybalchenko@intel.com>
Functions i40e_pctype_to_flowtype and i40e_flowtype_to_pctype are
changed to work with dynamic mapping pctype to flowtype table.
This table is located in private data area of adapter structure.
Therefore those functions need one extra parameter pointing to
the adapter data structure.
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
---
drivers/net/i40e/i40e_fdir.c | 10 +++++-----
drivers/net/i40e/i40e_flow.c | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 8013add..7515941 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -665,10 +665,10 @@ i40e_fdir_configure(struct rte_eth_dev *dev)
pctype = (enum i40e_filter_pctype)i40e_read_rx_ctl(
hw, I40E_GLQF_FD_PCTYPES(
(int)i40e_flowtype_to_pctype(
- conf->flex_mask[i].flow_type)));
+ conf->flex_mask[i].flow_type, pf->adapter)));
} else
pctype = i40e_flowtype_to_pctype(
- conf->flex_mask[i].flow_type);
+ conf->flex_mask[i].flow_type, pf->adapter);
i40e_set_flex_mask_on_pctype(pf, pctype, &conf->flex_mask[i]);
}
@@ -1143,9 +1143,9 @@ i40e_add_del_fdir_filter(struct rte_eth_dev *dev,
pctype = (enum i40e_filter_pctype)i40e_read_rx_ctl(
hw, I40E_GLQF_FD_PCTYPES(
(int)i40e_flowtype_to_pctype(
- filter->input.flow_type)));
+ filter->input.flow_type, pf->adapter)));
} else
- pctype = i40e_flowtype_to_pctype(filter->input.flow_type);
+ pctype = i40e_flowtype_to_pctype(filter->input.flow_type, pf->adapter);
ret = i40e_fdir_filter_programming(pf, pctype, filter, add);
if (ret < 0) {
@@ -1400,7 +1400,7 @@ i40e_fdir_info_get_flex_mask(struct i40e_pf *pf,
if (!I40E_VALID_PCTYPE((enum i40e_filter_pctype)i))
continue;
}
- flow_type = i40e_pctype_to_flowtype((enum i40e_filter_pctype)i);
+ flow_type = i40e_pctype_to_flowtype(i, pf->adapter);
for (j = 0; j < I40E_FDIR_MAX_FLEXWORD_NUM; j++) {
if (mask->word_mask & I40E_FLEX_WORD_MASK(j)) {
ptr->mask[j * sizeof(uint16_t)] = UINT8_MAX;
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index b92719a..4db771c 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2776,7 +2776,7 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
}
}
- pctype = i40e_flowtype_to_pctype(flow_type);
+ pctype = i40e_flowtype_to_pctype(flow_type, pf->adapter);
if (pctype == 0 || pctype > I40E_FILTER_PCTYPE_L2_PAYLOAD) {
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM, item,
--
2.5.5
next prev parent reply other threads:[~2017-08-24 10:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-24 10:20 [dpdk-dev] [PATCH 0/5] net/i40e: implement dynamic mapping of flow types to pctypes Kirill Rybalchenko
2017-08-24 10:20 ` [dpdk-dev] [PATCH 1/5] app/testpmd: add new commands to manipulate with pctype mapping Kirill Rybalchenko
2017-08-24 10:20 ` [dpdk-dev] [PATCH 2/5] net/i40e: add function to initialize pctype mapping table Kirill Rybalchenko
2017-08-24 10:20 ` [dpdk-dev] [PATCH 3/5] net/i40e: add new functions to manipulate with " Kirill Rybalchenko
2017-08-24 10:20 ` Kirill Rybalchenko [this message]
2017-08-24 10:20 ` [dpdk-dev] [PATCH 5/5] net/i40e: implement dynamic mapping of sw flow types to hw pctypes Kirill Rybalchenko
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=1503570044-104133-5-git-send-email-kirill.rybalchenko@intel.com \
--to=kirill.rybalchenko@intel.com \
--cc=andrey.chilikin@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@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).