aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-10-29 03:17:09 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-30 00:33:55 -0400
commit5b252f0c2f98df21fadf0f6cf189b87a0b938228 (patch)
treed3003625d8c5fd6d54466f81cffab1b5459bb98f /net/core
parent0519d83d83ed485b5a1f9222ff69d7d6c9bb8a01 (diff)
gro: Name the GRO result enumeration type
This clarifies which return and parameter types are GRO result codes and not RX result codes. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 68a1bb68b5a8..1dc13744684c 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2476,7 +2476,7 @@ void napi_gro_flush(struct napi_struct *napi)
2476} 2476}
2477EXPORT_SYMBOL(napi_gro_flush); 2477EXPORT_SYMBOL(napi_gro_flush);
2478 2478
2479int dev_gro_receive(struct napi_struct *napi, struct sk_buff *skb) 2479enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
2480{ 2480{
2481 struct sk_buff **pp = NULL; 2481 struct sk_buff **pp = NULL;
2482 struct packet_type *ptype; 2482 struct packet_type *ptype;
@@ -2484,7 +2484,7 @@ int dev_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
2484 struct list_head *head = &ptype_base[ntohs(type) & PTYPE_HASH_MASK]; 2484 struct list_head *head = &ptype_base[ntohs(type) & PTYPE_HASH_MASK];
2485 int same_flow; 2485 int same_flow;
2486 int mac_len; 2486 int mac_len;
2487 int ret; 2487 enum gro_result ret;
2488 2488
2489 if (!(skb->dev->features & NETIF_F_GRO)) 2489 if (!(skb->dev->features & NETIF_F_GRO))
2490 goto normal; 2490 goto normal;
@@ -2568,7 +2568,8 @@ normal:
2568} 2568}
2569EXPORT_SYMBOL(dev_gro_receive); 2569EXPORT_SYMBOL(dev_gro_receive);
2570 2570
2571static int __napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb) 2571static gro_result_t
2572__napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
2572{ 2573{
2573 struct sk_buff *p; 2574 struct sk_buff *p;
2574 2575
@@ -2585,7 +2586,7 @@ static int __napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
2585 return dev_gro_receive(napi, skb); 2586 return dev_gro_receive(napi, skb);
2586} 2587}
2587 2588
2588int napi_skb_finish(int ret, struct sk_buff *skb) 2589int napi_skb_finish(gro_result_t ret, struct sk_buff *skb)
2589{ 2590{
2590 int err = NET_RX_SUCCESS; 2591 int err = NET_RX_SUCCESS;
2591 2592
@@ -2600,6 +2601,10 @@ int napi_skb_finish(int ret, struct sk_buff *skb)
2600 case GRO_MERGED_FREE: 2601 case GRO_MERGED_FREE:
2601 kfree_skb(skb); 2602 kfree_skb(skb);
2602 break; 2603 break;
2604
2605 case GRO_HELD:
2606 case GRO_MERGED:
2607 break;
2603 } 2608 }
2604 2609
2605 return err; 2610 return err;
@@ -2652,7 +2657,8 @@ struct sk_buff *napi_get_frags(struct napi_struct *napi)
2652} 2657}
2653EXPORT_SYMBOL(napi_get_frags); 2658EXPORT_SYMBOL(napi_get_frags);
2654 2659
2655int napi_frags_finish(struct napi_struct *napi, struct sk_buff *skb, int ret) 2660int napi_frags_finish(struct napi_struct *napi, struct sk_buff *skb,
2661 gro_result_t ret)
2656{ 2662{
2657 int err = NET_RX_SUCCESS; 2663 int err = NET_RX_SUCCESS;
2658 2664
@@ -2674,6 +2680,9 @@ int napi_frags_finish(struct napi_struct *napi, struct sk_buff *skb, int ret)
2674 case GRO_MERGED_FREE: 2680 case GRO_MERGED_FREE:
2675 napi_reuse_skb(napi, skb); 2681 napi_reuse_skb(napi, skb);
2676 break; 2682 break;
2683
2684 case GRO_MERGED:
2685 break;
2677 } 2686 }
2678 2687
2679 return err; 2688 return err;