From: Shannon Nelson <snelson@pensando.io>
To: Guangbin Huang <huangguangbin2@huawei.com>,
davem@davemloft.net, kuba@kernel.org, edumazet@google.com,
pabeni@redhat.com, brett@pensando.io, drivers@pensando.io,
anthony.l.nguyen@intel.com, jesse.brandeburg@intel.com
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, lipeng321@huawei.com
Subject: Re: [PATCH net 2/2] net: ionic: fix error check for vlan flags in ionic_set_nic_features()
Date: Fri, 29 Jul 2022 09:32:00 -0700 [thread overview]
Message-ID: <4f3764f1-1faa-c28d-21b1-3356ddb3cede@pensando.io> (raw)
In-Reply-To: <20220729101755.4798-3-huangguangbin2@huawei.com>
On 7/29/22 3:17 AM, Guangbin Huang wrote:
> From: Jian Shen <shenjian15@huawei.com>
>
> The prototype of input features of ionic_set_nic_features() is
> netdev_features_t, but the vlan_flags is using the private
> definition of ionic drivers. It should use the variable
> ctx.cmd.lif_setattr.features, rather than features to check
> the vlan flags. So fixes it.
>
> Fixes: beead698b173 ("ionic: Add the basic NDO callbacks for netdev support")
>
> Signed-off-by: Jian Shen <shenjian15@huawei.com>
> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Good catch - thanks!
Acked-by: Shannon Nelson <snelson@pensando.io>
> ---
> drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> index f3568901eb91..1443f788ee37 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> @@ -1437,7 +1437,7 @@ static int ionic_set_nic_features(struct ionic_lif *lif,
> if ((old_hw_features ^ lif->hw_features) & IONIC_ETH_HW_RX_HASH)
> ionic_lif_rss_config(lif, lif->rss_types, NULL, NULL);
>
> - if ((vlan_flags & features) &&
> + if ((vlan_flags & le64_to_cpu(ctx.cmd.lif_setattr.features)) &&
> !(vlan_flags & le64_to_cpu(ctx.comp.lif_setattr.features)))
> dev_info_once(lif->ionic->dev, "NIC is not supporting vlan offload, likely in SmartNIC mode\n");
>
next prev parent reply other threads:[~2022-07-29 16:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-29 10:17 [PATCH net 0/2] net: fix using wrong flags to check features Guangbin Huang
2022-07-29 10:17 ` [PATCH net 1/2] net: ice: fix error NETIF_F_HW_VLAN_CTAG_FILTER check in ice_vsi_sync_fltr() Guangbin Huang
2022-07-29 17:15 ` Nguyen, Anthony L
2022-07-29 10:17 ` [PATCH net 2/2] net: ionic: fix error check for vlan flags in ionic_set_nic_features() Guangbin Huang
2022-07-29 16:32 ` Shannon Nelson [this message]
2022-08-01 19:50 ` [PATCH net 0/2] net: fix using wrong flags to check features patchwork-bot+netdevbpf
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=4f3764f1-1faa-c28d-21b1-3356ddb3cede@pensando.io \
--to=snelson@pensando.io \
--cc=anthony.l.nguyen@intel.com \
--cc=brett@pensando.io \
--cc=davem@davemloft.net \
--cc=drivers@pensando.io \
--cc=edumazet@google.com \
--cc=huangguangbin2@huawei.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lipeng321@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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
all inboxes | Powered by JetHome®