diff mbox series

[RFC,net-next,1/7] netdev_features: remove unused __UNUSED_NETIF_F_1

Message ID 20240405133731.1010128-2-aleksander.lobakin@intel.com (mailing list archive)
State RFC
Delegated to: Netdev Maintainers
Headers show
Series netdev_features: start cleaning netdev_features_t up | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next, async
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 5766 this patch: 5766
netdev/build_tools success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 1 of 1 maintainers
netdev/build_clang success Errors and warnings before: 1075 this patch: 1075
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 6048 this patch: 6048
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Alexander Lobakin April 5, 2024, 1:37 p.m. UTC
NETIF_F_NO_CSUM was removed in 3.2-rc2 by commit 34324dc2bf27
("net: remove NETIF_F_NO_CSUM feature bit") and became
__UNUSED_NETIF_F_1. It's not used anywhere in the code.
Remove this bit waste.

Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
---
 include/linux/netdev_features.h | 1 -
 1 file changed, 1 deletion(-)

Comments

Andrew Lunn April 5, 2024, 2:12 p.m. UTC | #1
On Fri, Apr 05, 2024 at 03:37:25PM +0200, Alexander Lobakin wrote:
> NETIF_F_NO_CSUM was removed in 3.2-rc2 by commit 34324dc2bf27
> ("net: remove NETIF_F_NO_CSUM feature bit") and became
> __UNUSED_NETIF_F_1. It's not used anywhere in the code.
> Remove this bit waste.
> 
> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> ---
>  include/linux/netdev_features.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
> index 7c2d77d75a88..44c428d62db4 100644
> --- a/include/linux/netdev_features.h
> +++ b/include/linux/netdev_features.h
> @@ -14,7 +14,6 @@ typedef u64 netdev_features_t;
>  enum {
>  	NETIF_F_SG_BIT,			/* Scatter/gather IO. */
>  	NETIF_F_IP_CSUM_BIT,		/* Can checksum TCP/UDP over IPv4. */
> -	__UNUSED_NETIF_F_1,
>  	NETIF_F_HW_CSUM_BIT,		/* Can checksum all the packets. */
>  	NETIF_F_IPV6_CSUM_BIT,		/* Can checksum TCP/UDP over IPV6 */
>  	NETIF_F_HIGHDMA_BIT,		/* Can DMA to high memory. */

Are you sure this enum is not ABI?

It would be good to add an explanation why it is not ABI to the cover
letter.

	Andrew
Alexander Lobakin April 5, 2024, 3:15 p.m. UTC | #2
From: Andrew Lunn <andrew@lunn.ch>
Date: Fri, 5 Apr 2024 16:12:50 +0200

> On Fri, Apr 05, 2024 at 03:37:25PM +0200, Alexander Lobakin wrote:
>> NETIF_F_NO_CSUM was removed in 3.2-rc2 by commit 34324dc2bf27
>> ("net: remove NETIF_F_NO_CSUM feature bit") and became
>> __UNUSED_NETIF_F_1. It's not used anywhere in the code.
>> Remove this bit waste.
>>
>> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
>> ---
>>  include/linux/netdev_features.h | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
>> index 7c2d77d75a88..44c428d62db4 100644
>> --- a/include/linux/netdev_features.h
>> +++ b/include/linux/netdev_features.h
>> @@ -14,7 +14,6 @@ typedef u64 netdev_features_t;
>>  enum {
>>  	NETIF_F_SG_BIT,			/* Scatter/gather IO. */
>>  	NETIF_F_IP_CSUM_BIT,		/* Can checksum TCP/UDP over IPv4. */
>> -	__UNUSED_NETIF_F_1,
>>  	NETIF_F_HW_CSUM_BIT,		/* Can checksum all the packets. */
>>  	NETIF_F_IPV6_CSUM_BIT,		/* Can checksum TCP/UDP over IPV6 */
>>  	NETIF_F_HIGHDMA_BIT,		/* Can DMA to high memory. */
> 
> Are you sure this enum is not ABI?

Why should this be ABI? It's not a part of UAPI and Ethtool receives
these bits together with string names.

> 
> It would be good to add an explanation why it is not ABI to the cover
> letter.
> 
> 	Andrew

Thanks,
Olek
Andrew Lunn April 5, 2024, 3:41 p.m. UTC | #3
On Fri, Apr 05, 2024 at 05:15:58PM +0200, Alexander Lobakin wrote:
> From: Andrew Lunn <andrew@lunn.ch>
> Date: Fri, 5 Apr 2024 16:12:50 +0200
> 
> > On Fri, Apr 05, 2024 at 03:37:25PM +0200, Alexander Lobakin wrote:
> >> NETIF_F_NO_CSUM was removed in 3.2-rc2 by commit 34324dc2bf27
> >> ("net: remove NETIF_F_NO_CSUM feature bit") and became
> >> __UNUSED_NETIF_F_1. It's not used anywhere in the code.
> >> Remove this bit waste.
> >>
> >> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> >> ---
> >>  include/linux/netdev_features.h | 1 -
> >>  1 file changed, 1 deletion(-)
> >>
> >> diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
> >> index 7c2d77d75a88..44c428d62db4 100644
> >> --- a/include/linux/netdev_features.h
> >> +++ b/include/linux/netdev_features.h
> >> @@ -14,7 +14,6 @@ typedef u64 netdev_features_t;
> >>  enum {
> >>  	NETIF_F_SG_BIT,			/* Scatter/gather IO. */
> >>  	NETIF_F_IP_CSUM_BIT,		/* Can checksum TCP/UDP over IPv4. */
> >> -	__UNUSED_NETIF_F_1,
> >>  	NETIF_F_HW_CSUM_BIT,		/* Can checksum all the packets. */
> >>  	NETIF_F_IPV6_CSUM_BIT,		/* Can checksum TCP/UDP over IPV6 */
> >>  	NETIF_F_HIGHDMA_BIT,		/* Can DMA to high memory. */
> > 
> > Are you sure this enum is not ABI?
> 
> Why should this be ABI? It's not a part of UAPI and Ethtool receives
> these bits together with string names.

As a reviewer, i think about ABI. When looking at a change like this,
it is the first thing i think of. Our code is not always clean, there
could well be things outside of include/uapi which influence the
ABI. For some reason ("net: remove NETIF_F_NO_CSUM feature bit")
renamed rather than removed it? Why?

I assume you have looked into the code in this respect, you have
tested both and ioctl and netlink code, and concluded it does not
cause an ABI change. It could of been removed in 3.2-rc2. But i don't
see anything in the cover letter or commit message which indicates you
have done that. That is partially what the cover letter and the commit
message is about. Explaining things you have done, but cannot be seen
in the code change.

	Andrew
diff mbox series

Patch

diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
index 7c2d77d75a88..44c428d62db4 100644
--- a/include/linux/netdev_features.h
+++ b/include/linux/netdev_features.h
@@ -14,7 +14,6 @@  typedef u64 netdev_features_t;
 enum {
 	NETIF_F_SG_BIT,			/* Scatter/gather IO. */
 	NETIF_F_IP_CSUM_BIT,		/* Can checksum TCP/UDP over IPv4. */
-	__UNUSED_NETIF_F_1,
 	NETIF_F_HW_CSUM_BIT,		/* Can checksum all the packets. */
 	NETIF_F_IPV6_CSUM_BIT,		/* Can checksum TCP/UDP over IPV6 */
 	NETIF_F_HIGHDMA_BIT,		/* Can DMA to high memory. */