From: Ye Xiaolong <xiaolong.ye@intel.com>
To: alvinx.zhang@intel.com
Cc: qi.z.zhang@intel.com, beilei.xing@intel.com, dev@dpdk.org,
stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3] net/i40e: fix exception with multi-driver
Date: Thu, 24 Oct 2019 14:27:09 +0800 [thread overview]
Message-ID: <20191024062709.GJ72825@intel.com> (raw)
In-Reply-To: <20191008104145.6330-1-alvinx.zhang@intel.com>
On 10/08, alvinx.zhang@intel.com wrote:
>From: Alvin Zhang <alvinx.zhang@intel.com>
>
>If support-multi-driver is enabled, the global registers should not
>be configured. But with the current code base, if creating a flow
>with rte_flow API, the global register GLQF_FD_MSK may be changed.
>
>Fixes: cfdfca493cae ("net/i40e: fix multiple driver support")
>Cc: stable@dpdk.org
>
>Signed-off-by: root <alvinx.zhang@intel.com>
The signature should be Alvin Zhang <alvinx.zhang@intel.com>, fixed it while
merging.
>--
>
>v3: modify codes according to the comments.
>v2: modify codes according to the comments.
Better to be specific about the changes you made for each version.
>---
> drivers/net/i40e/i40e_flow.c | 38 +++++++++++++++++++++++++++++++-------
> 1 file changed, 31 insertions(+), 7 deletions(-)
>
>diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
>index e902a35..f9c3183 100644
>--- a/drivers/net/i40e/i40e_flow.c
>+++ b/drivers/net/i40e/i40e_flow.c
>@@ -2349,6 +2349,37 @@ static int i40e_flow_destroy_tunnel_filter(struct i40e_pf *pf,
> if (num < 0)
> return -EINVAL;
>
>+ if (pf->support_multi_driver) {
>+ for (i = 0; i < num; i++)
>+ if (i40e_read_rx_ctl(hw,
>+ I40E_GLQF_FD_MSK(i, pctype)) !=
>+ mask_reg[i]) {
>+ PMD_DRV_LOG(ERR, "Input set setting is not"
>+ " supported with"
>+ " `support-multi-driver`"
>+ " enabled!");
>+ return -EPERM;
>+ }
>+ for (i = num; i < I40E_INSET_MASK_NUM_REG; i++)
>+ if (i40e_read_rx_ctl(hw,
>+ I40E_GLQF_FD_MSK(i, pctype)) != 0) {
>+ PMD_DRV_LOG(ERR, "Input set setting is not"
>+ " supported with"
>+ " `support-multi-driver`"
>+ " enabled!");
>+ return -EPERM;
>+ }
>+
>+ } else {
>+ for (i = 0; i < num; i++)
>+ i40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype),
>+ mask_reg[i]);
>+ /*clear unused mask registers of the pctype */
>+ for (i = num; i < I40E_INSET_MASK_NUM_REG; i++)
>+ i40e_check_write_reg(hw,
>+ I40E_GLQF_FD_MSK(i, pctype), 0);
>+ }
>+
> inset_reg |= i40e_translate_input_set_reg(hw->mac.type, input_set);
>
> i40e_check_write_reg(hw, I40E_PRTQF_FD_INSET(pctype, 0),
>@@ -2357,13 +2388,6 @@ static int i40e_flow_destroy_tunnel_filter(struct i40e_pf *pf,
> (uint32_t)((inset_reg >>
> I40E_32_BIT_WIDTH) & UINT32_MAX));
>
>- for (i = 0; i < num; i++)
>- i40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype),
>- mask_reg[i]);
>-
>- /*clear unused mask registers of the pctype */
>- for (i = num; i < I40E_INSET_MASK_NUM_REG; i++)
>- i40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype), 0);
> I40E_WRITE_FLUSH(hw);
>
> pf->fdir.input_set[pctype] = input_set;
>--
>1.8.3.1
>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Applied to dpdk-next-net-intel. Thanks.
prev parent reply other threads:[~2019-10-24 6:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-20 10:57 [dpdk-dev] [PATCH] net/i40e: fix conflict with multi-driver alvinx.zhang
2019-09-25 9:16 ` Xing, Beilei
2019-09-26 10:57 ` [dpdk-dev] [PATCH v2] net/i40e: fix exception " alvinx.zhang
2019-09-30 10:07 ` Ye Xiaolong
2019-10-08 10:41 ` [dpdk-dev] [PATCH v3] " alvinx.zhang
2019-10-08 10:52 ` alvinx.zhang
2019-10-24 6:27 ` Ye Xiaolong [this message]
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=20191024062709.GJ72825@intel.com \
--to=xiaolong.ye@intel.com \
--cc=alvinx.zhang@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.