Skip to content

Commit 1d11fa6

Browse files
edumazetkuba-moo
authored andcommitted
net-gro: remove GRO_DROP
GRO_DROP can only be returned from napi_gro_frags() if the skb has not been allocated by a prior napi_get_frags() Since drivers must use napi_get_frags() and test its result before populating the skb with metadata, we can safely remove GRO_DROP since it offers no practical use. Signed-off-by: Eric Dumazet <[email protected]> Cc: Jesse Brandeburg <[email protected]> Acked-by: Edward Cree <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent f73fc40 commit 1d11fa6

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

include/linux/netdevice.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,6 @@ enum gro_result {
376376
GRO_MERGED_FREE,
377377
GRO_HELD,
378378
GRO_NORMAL,
379-
GRO_DROP,
380379
GRO_CONSUMED,
381380
};
382381
typedef enum gro_result gro_result_t;

net/core/dev.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6070,10 +6070,6 @@ static gro_result_t napi_skb_finish(struct napi_struct *napi,
60706070
gro_normal_one(napi, skb);
60716071
break;
60726072

6073-
case GRO_DROP:
6074-
kfree_skb(skb);
6075-
break;
6076-
60776073
case GRO_MERGED_FREE:
60786074
if (NAPI_GRO_CB(skb)->free == NAPI_GRO_FREE_STOLEN_HEAD)
60796075
napi_skb_free_stolen_head(skb);
@@ -6158,10 +6154,6 @@ static gro_result_t napi_frags_finish(struct napi_struct *napi,
61586154
gro_normal_one(napi, skb);
61596155
break;
61606156

6161-
case GRO_DROP:
6162-
napi_reuse_skb(napi, skb);
6163-
break;
6164-
61656157
case GRO_MERGED_FREE:
61666158
if (NAPI_GRO_CB(skb)->free == NAPI_GRO_FREE_STOLEN_HEAD)
61676159
napi_skb_free_stolen_head(skb);
@@ -6223,9 +6215,6 @@ gro_result_t napi_gro_frags(struct napi_struct *napi)
62236215
gro_result_t ret;
62246216
struct sk_buff *skb = napi_frags_skb(napi);
62256217

6226-
if (!skb)
6227-
return GRO_DROP;
6228-
62296218
trace_napi_gro_frags_entry(skb);
62306219

62316220
ret = napi_frags_finish(napi, skb, dev_gro_receive(napi, skb));

0 commit comments

Comments
 (0)