Message ID | 20220729101755.4798-3-huangguangbin2@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | a86e86db5e6d72c82724a63ca1c5293409a21518 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: fix using wrong flags to check features | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Clearly marked for net |
netdev/fixes_present | success | Fixes tag present in non-next series |
netdev/subject_prefix | success | Link |
netdev/cover_letter | success | Series has a cover letter |
netdev/patch_count | success | Link |
netdev/header_inline | success | No static functions without inline keyword in header files |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/cc_maintainers | success | CCed 7 of 7 maintainers |
netdev/build_clang | success | Errors and warnings before: 0 this patch: 0 |
netdev/module_param | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Signed-off-by tag matches author and committer |
netdev/check_selftest | success | No net selftest shell script |
netdev/verify_fixes | fail | Problems with Fixes tag: 1 |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 8 lines checked |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/source_inline | success | Was 0 now: 0 |
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"); >
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");