| .. | .. | 
|---|
|  | 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ | 
|---|
| 1 | 2 | /* | 
|---|
| 2 | 3 | * Network device features. | 
|---|
| 3 |  | - * | 
|---|
| 4 |  | - * | 
|---|
| 5 |  | - * This program is free software; you can redistribute it and/or | 
|---|
| 6 |  | - * modify it under the terms of the GNU General Public License | 
|---|
| 7 |  | - * as published by the Free Software Foundation; either version | 
|---|
| 8 |  | - * 2 of the License, or (at your option) any later version. | 
|---|
| 9 | 4 | */ | 
|---|
| 10 | 5 | #ifndef _LINUX_NETDEV_FEATURES_H | 
|---|
| 11 | 6 | #define _LINUX_NETDEV_FEATURES_H | 
|---|
| .. | .. | 
|---|
| 58 | 53 | NETIF_F_GSO_ESP_BIT,		/* ... ESP with TSO */ | 
|---|
| 59 | 54 | NETIF_F_GSO_UDP_BIT,		/* ... UFO, deprecated except tuntap */ | 
|---|
| 60 | 55 | NETIF_F_GSO_UDP_L4_BIT,		/* ... UDP payload GSO (not UFO) */ | 
|---|
|  | 56 | +	NETIF_F_GSO_FRAGLIST_BIT,		/* ... Fraglist GSO */ | 
|---|
| 61 | 57 | /**/NETIF_F_GSO_LAST =		/* last bit, see GSO_MASK */ | 
|---|
| 62 |  | -		NETIF_F_GSO_UDP_L4_BIT, | 
|---|
|  | 58 | +		NETIF_F_GSO_FRAGLIST_BIT, | 
|---|
| 63 | 59 |  | 
|---|
| 64 | 60 | NETIF_F_FCOE_CRC_BIT,		/* FCoE CRC32 */ | 
|---|
| 65 | 61 | NETIF_F_SCTP_CRC_BIT,		/* SCTP checksum offload */ | 
|---|
| .. | .. | 
|---|
| 85 | 81 |  | 
|---|
| 86 | 82 | NETIF_F_GRO_HW_BIT,		/* Hardware Generic receive offload */ | 
|---|
| 87 | 83 | NETIF_F_HW_TLS_RECORD_BIT,	/* Offload TLS record */ | 
|---|
|  | 84 | +	NETIF_F_GRO_FRAGLIST_BIT,	/* Fraglist GRO */ | 
|---|
|  | 85 | + | 
|---|
|  | 86 | +	NETIF_F_HW_MACSEC_BIT,		/* Offload MACsec operations */ | 
|---|
| 88 | 87 |  | 
|---|
| 89 | 88 | /* | 
|---|
| 90 | 89 | * Add your fresh new feature above and remember to update | 
|---|
| 91 | 90 | * netdev_features_strings[] in net/ethtool/common.c and maybe | 
|---|
| 92 | 91 | * some feature mask #defines below. Please also describe it | 
|---|
| 93 |  | -	 * in Documentation/networking/netdev-features.txt. | 
|---|
|  | 92 | +	 * in Documentation/networking/netdev-features.rst. | 
|---|
| 94 | 93 | */ | 
|---|
| 95 | 94 |  | 
|---|
| 96 | 95 | /**/NETDEV_FEATURE_COUNT | 
|---|
| .. | .. | 
|---|
| 155 | 154 | #define NETIF_F_GSO_UDP_L4	__NETIF_F(GSO_UDP_L4) | 
|---|
| 156 | 155 | #define NETIF_F_HW_TLS_TX	__NETIF_F(HW_TLS_TX) | 
|---|
| 157 | 156 | #define NETIF_F_HW_TLS_RX	__NETIF_F(HW_TLS_RX) | 
|---|
|  | 157 | +#define NETIF_F_GRO_FRAGLIST	__NETIF_F(GRO_FRAGLIST) | 
|---|
|  | 158 | +#define NETIF_F_GSO_FRAGLIST	__NETIF_F(GSO_FRAGLIST) | 
|---|
|  | 159 | +#define NETIF_F_HW_MACSEC	__NETIF_F(HW_MACSEC) | 
|---|
| 158 | 160 |  | 
|---|
| 159 |  | -/* Finds the next feature with the highest number of the range of start till 0. | 
|---|
|  | 161 | +/* Finds the next feature with the highest number of the range of start-1 till 0. | 
|---|
| 160 | 162 | */ | 
|---|
| 161 | 163 | static inline int find_next_netdev_feature(u64 feature, unsigned long start) | 
|---|
| 162 | 164 | { | 
|---|
| .. | .. | 
|---|
| 175 | 177 | for ((bit) = find_next_netdev_feature((mask_addr),		\ | 
|---|
| 176 | 178 | NETDEV_FEATURE_COUNT);	\ | 
|---|
| 177 | 179 | (bit) >= 0;						\ | 
|---|
| 178 |  | -	     (bit) = find_next_netdev_feature((mask_addr), (bit) - 1)) | 
|---|
|  | 180 | +	     (bit) = find_next_netdev_feature((mask_addr), (bit))) | 
|---|
| 179 | 181 |  | 
|---|
| 180 | 182 | /* Features valid for ethtool to change */ | 
|---|
| 181 | 183 | /* = all defined minus driver/device-class-related */ | 
|---|
| .. | .. | 
|---|
| 191 | 193 | #define NETIF_F_GSO_MASK	(__NETIF_F_BIT(NETIF_F_GSO_LAST + 1) - \ | 
|---|
| 192 | 194 | __NETIF_F_BIT(NETIF_F_GSO_SHIFT)) | 
|---|
| 193 | 195 |  | 
|---|
| 194 |  | -/* List of IP checksum features. Note that NETIF_F_ HW_CSUM should not be | 
|---|
|  | 196 | +/* List of IP checksum features. Note that NETIF_F_HW_CSUM should not be | 
|---|
| 195 | 197 | * set in features when NETIF_F_IP_CSUM or NETIF_F_IPV6_CSUM are set-- | 
|---|
| 196 | 198 | * this would be contradictory | 
|---|
| 197 | 199 | */ | 
|---|
| .. | .. | 
|---|
| 231 | 233 | /* changeable features with no special hardware requirements */ | 
|---|
| 232 | 234 | #define NETIF_F_SOFT_FEATURES	(NETIF_F_GSO | NETIF_F_GRO) | 
|---|
| 233 | 235 |  | 
|---|
|  | 236 | +/* Changeable features with no special hardware requirements that defaults to off. */ | 
|---|
|  | 237 | +#define NETIF_F_SOFT_FEATURES_OFF	NETIF_F_GRO_FRAGLIST | 
|---|
|  | 238 | + | 
|---|
| 234 | 239 | #define NETIF_F_VLAN_FEATURES	(NETIF_F_HW_VLAN_CTAG_FILTER | \ | 
|---|
| 235 | 240 | NETIF_F_HW_VLAN_CTAG_RX | \ | 
|---|
| 236 | 241 | NETIF_F_HW_VLAN_CTAG_TX | \ | 
|---|