Skip to content

Commit 3b33583

Browse files
klassertdavem330
authored andcommitted
net: Add fraglist GRO/GSO feature flags
This adds new Fraglist GRO/GSO feature flags. They will be used to configure fraglist GRO/GSO what will be implemented with some followup paches. Signed-off-by: Steffen Klassert <[email protected]> Reviewed-by: Willem de Bruijn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 79572c9 commit 3b33583

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

include/linux/netdev_features.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ enum {
5353
NETIF_F_GSO_ESP_BIT, /* ... ESP with TSO */
5454
NETIF_F_GSO_UDP_BIT, /* ... UFO, deprecated except tuntap */
5555
NETIF_F_GSO_UDP_L4_BIT, /* ... UDP payload GSO (not UFO) */
56+
NETIF_F_GSO_FRAGLIST_BIT, /* ... Fraglist GSO */
5657
/**/NETIF_F_GSO_LAST = /* last bit, see GSO_MASK */
57-
NETIF_F_GSO_UDP_L4_BIT,
58+
NETIF_F_GSO_FRAGLIST_BIT,
5859

5960
NETIF_F_FCOE_CRC_BIT, /* FCoE CRC32 */
6061
NETIF_F_SCTP_CRC_BIT, /* SCTP checksum offload */
@@ -80,6 +81,7 @@ enum {
8081

8182
NETIF_F_GRO_HW_BIT, /* Hardware Generic receive offload */
8283
NETIF_F_HW_TLS_RECORD_BIT, /* Offload TLS record */
84+
NETIF_F_GRO_FRAGLIST_BIT, /* Fraglist GRO */
8385

8486
/*
8587
* Add your fresh new feature above and remember to update
@@ -150,6 +152,8 @@ enum {
150152
#define NETIF_F_GSO_UDP_L4 __NETIF_F(GSO_UDP_L4)
151153
#define NETIF_F_HW_TLS_TX __NETIF_F(HW_TLS_TX)
152154
#define NETIF_F_HW_TLS_RX __NETIF_F(HW_TLS_RX)
155+
#define NETIF_F_GRO_FRAGLIST __NETIF_F(GRO_FRAGLIST)
156+
#define NETIF_F_GSO_FRAGLIST __NETIF_F(GSO_FRAGLIST)
153157

154158
/* Finds the next feature with the highest number of the range of start till 0.
155159
*/

include/linux/netdevice.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4570,6 +4570,7 @@ static inline bool net_gso_ok(netdev_features_t features, int gso_type)
45704570
BUILD_BUG_ON(SKB_GSO_ESP != (NETIF_F_GSO_ESP >> NETIF_F_GSO_SHIFT));
45714571
BUILD_BUG_ON(SKB_GSO_UDP != (NETIF_F_GSO_UDP >> NETIF_F_GSO_SHIFT));
45724572
BUILD_BUG_ON(SKB_GSO_UDP_L4 != (NETIF_F_GSO_UDP_L4 >> NETIF_F_GSO_SHIFT));
4573+
BUILD_BUG_ON(SKB_GSO_FRAGLIST != (NETIF_F_GSO_FRAGLIST >> NETIF_F_GSO_SHIFT));
45734574

45744575
return (features & feature) == feature;
45754576
}

include/linux/skbuff.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,8 @@ enum {
592592
SKB_GSO_UDP = 1 << 16,
593593

594594
SKB_GSO_UDP_L4 = 1 << 17,
595+
596+
SKB_GSO_FRAGLIST = 1 << 18,
595597
};
596598

597599
#if BITS_PER_LONG > 32

net/ethtool/common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ const char netdev_features_strings[NETDEV_FEATURE_COUNT][ETH_GSTRING_LEN] = {
5959
[NETIF_F_HW_TLS_RECORD_BIT] = "tls-hw-record",
6060
[NETIF_F_HW_TLS_TX_BIT] = "tls-hw-tx-offload",
6161
[NETIF_F_HW_TLS_RX_BIT] = "tls-hw-rx-offload",
62+
[NETIF_F_GRO_FRAGLIST_BIT] = "rx-gro-list",
6263
};
6364

6465
const char

0 commit comments

Comments
 (0)