netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Jian Shen <shenjian15@huawei.com>
Cc: davem@davemloft.net, kuba@kernel.org, ecree.xilinx@gmail.com,
	hkallweit1@gmail.com, alexandr.lobakin@intel.com,
	saeed@kernel.org, netdev@vger.kernel.org, linuxarm@openeuler.org
Subject: Re: [RFCv4 PATCH net-next] net: extend netdev_features_t
Date: Tue, 9 Nov 2021 23:32:53 +0100	[thread overview]
Message-ID: <YYr3FXJC3eu4AN31@lunn.ch> (raw)
In-Reply-To: <20211107101519.29264-1-shenjian15@huawei.com>

> -	if ((netdev->features & NETIF_F_HW_TC) > (features & NETIF_F_HW_TC) &&
> +	if ((netdev_active_features_test_bit(netdev, NETIF_F_HW_TC_BIT) >
> +	    netdev_features_test_bit(NETIF_F_NTUPLE_BIT, features)) &&

Using > is interesting.

But where did NETIF_F_NTUPLE_BIT come from?

> -	netdev->features |= NETIF_F_HW_VLAN_CTAG_FILTER |
> -		NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX |
> -		NETIF_F_RXCSUM | NETIF_F_SG | NETIF_F_GSO |
> -		NETIF_F_GRO | NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_GSO_GRE |
> -		NETIF_F_GSO_GRE_CSUM | NETIF_F_GSO_UDP_TUNNEL |
> -		NETIF_F_SCTP_CRC | NETIF_F_FRAGLIST;
> +	netdev_features_zero(&features);
> +	netdev_features_set_array(hns3_default_features_array,
> +				  ARRAY_SIZE(hns3_default_features_array),
> +				  &features);

The original code is netdev->features |= so it is appending these
bits. Yet the first thing the new code does is zero features?

      Andrew

  reply	other threads:[~2021-11-09 22:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-07 10:15 [RFCv4 PATCH net-next] net: extend netdev_features_t Jian Shen
2021-11-09 22:32 ` Andrew Lunn [this message]
2021-11-10  1:17   ` shenjian (K)
2021-11-10 13:36     ` Andrew Lunn

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=YYr3FXJC3eu4AN31@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=alexandr.lobakin@intel.com \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linuxarm@openeuler.org \
    --cc=netdev@vger.kernel.org \
    --cc=saeed@kernel.org \
    --cc=shenjian15@huawei.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).