From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Peng Zhang <peng.zhang@corigine.com>, <dev@dpdk.org>,
<niklas.soderlund@corigine.com>
Cc: <stable@dpdk.org>, Yong Xu <yong.xu@corigine.com>,
Chaoyong He <chaoyong.he@corigine.com>
Subject: Re: [PATCH] net/nfp: fix the issue about set the vlan strip offload off
Date: Fri, 20 May 2022 16:20:28 +0100 [thread overview]
Message-ID: <56b75a79-386d-40d6-c55c-b6d4f26ef963@amd.com> (raw)
In-Reply-To: <20220419083857.409261-1-peng.zhang@corigine.com>
On 4/19/2022 9:38 AM, Peng Zhang wrote:
> When set the vlan_strip_offload off, it doesn't work.
> Because we can't update the msg in the nic.
>
> This patch will fix this error.
>
> Fixes: d4a27a3b092a ("nfp: add basic features")
> Cc: stable@dpdk.org
>
> Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
> Signed-off-by: Yong Xu <yong.xu@corigine.com>
> Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Hi Niklas, Reminder of this patch waiting for your review.
> ---
> drivers/net/nfp/nfp_common.c | 21 ++++++++++-----------
> 1 file changed, 10 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c
> index b26770dbfb..ab4cfda389 100644
> --- a/drivers/net/nfp/nfp_common.c
> +++ b/drivers/net/nfp/nfp_common.c
> @@ -968,19 +968,18 @@ nfp_net_vlan_offload_set(struct rte_eth_dev *dev, int mask)
> int ret;
>
> hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
> - new_ctrl = 0;
> + new_ctrl = hw->ctrl;
>
> - /* Enable vlan strip if it is not configured yet */
> - if ((mask & RTE_ETH_VLAN_STRIP_OFFLOAD) &&
> - !(hw->ctrl & NFP_NET_CFG_CTRL_RXVLAN))
> - new_ctrl = hw->ctrl | NFP_NET_CFG_CTRL_RXVLAN;
> -
> - /* Disable vlan strip just if it is configured */
> - if (!(mask & RTE_ETH_VLAN_STRIP_OFFLOAD) &&
> - (hw->ctrl & NFP_NET_CFG_CTRL_RXVLAN))
> - new_ctrl = hw->ctrl & ~NFP_NET_CFG_CTRL_RXVLAN;
> + if (mask & RTE_ETH_VLAN_STRIP_OFFLOAD) {
> + /* Disable vlan strip just if it is configured */
> + if (hw->ctrl & NFP_NET_CFG_CTRL_RXVLAN)
> + new_ctrl = new_ctrl & ~NFP_NET_CFG_CTRL_RXVLAN;
> + /* Enable vlan strip if it is not configured yet */
> + else
> + new_ctrl = new_ctrl | NFP_NET_CFG_CTRL_RXVLAN;
> + }
>
> - if (new_ctrl == 0)
> + if (new_ctrl == hw->ctrl)
> return 0;
>
> update = NFP_NET_CFG_UPDATE_GEN;
next prev parent reply other threads:[~2022-05-20 15:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-19 8:38 Peng Zhang
2022-05-20 15:20 ` Ferruh Yigit [this message]
2022-05-23 21:16 ` Niklas Söderlund
2022-05-24 12:57 ` Ferruh Yigit
2022-05-26 14:34 ` [PATCH v2] net/nfp: fix bug of disable VLAN strip Peng Zhang
2022-05-31 13:27 ` 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=56b75a79-386d-40d6-c55c-b6d4f26ef963@amd.com \
--to=ferruh.yigit@amd.com \
--cc=chaoyong.he@corigine.com \
--cc=dev@dpdk.org \
--cc=niklas.soderlund@corigine.com \
--cc=peng.zhang@corigine.com \
--cc=stable@dpdk.org \
--cc=yong.xu@corigine.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
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).