Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171077
b: refs/heads/master
c: 5b252f0
h: refs/heads/master
i:
  171075: 82e8a93
v: v3
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Oct 30, 2009
1 parent b2c2cc8 commit d3f82cd
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0519d83d83ed485b5a1f9222ff69d7d6c9bb8a01
refs/heads/master: 5b252f0c2f98df21fadf0f6cf189b87a0b938228
10 changes: 6 additions & 4 deletions trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,14 @@ enum
NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */
};

enum {
enum gro_result {
GRO_MERGED,
GRO_MERGED_FREE,
GRO_HELD,
GRO_NORMAL,
GRO_DROP,
};
typedef enum gro_result gro_result_t;

extern void __napi_schedule(struct napi_struct *n);

Expand Down Expand Up @@ -1480,16 +1481,17 @@ extern int netif_rx_ni(struct sk_buff *skb);
#define HAVE_NETIF_RECEIVE_SKB 1
extern int netif_receive_skb(struct sk_buff *skb);
extern void napi_gro_flush(struct napi_struct *napi);
extern int dev_gro_receive(struct napi_struct *napi,
extern gro_result_t dev_gro_receive(struct napi_struct *napi,
struct sk_buff *skb);
extern int napi_skb_finish(int ret, struct sk_buff *skb);
extern int napi_skb_finish(gro_result_t ret, struct sk_buff *skb);
extern int napi_gro_receive(struct napi_struct *napi,
struct sk_buff *skb);
extern void napi_reuse_skb(struct napi_struct *napi,
struct sk_buff *skb);
extern struct sk_buff * napi_get_frags(struct napi_struct *napi);
extern int napi_frags_finish(struct napi_struct *napi,
struct sk_buff *skb, int ret);
struct sk_buff *skb,
gro_result_t ret);
extern struct sk_buff * napi_frags_skb(struct napi_struct *napi);
extern int napi_gro_frags(struct napi_struct *napi);

Expand Down
5 changes: 3 additions & 2 deletions trunk/net/8021q/vlan_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ u16 vlan_dev_vlan_id(const struct net_device *dev)
}
EXPORT_SYMBOL(vlan_dev_vlan_id);

static int vlan_gro_common(struct napi_struct *napi, struct vlan_group *grp,
unsigned int vlan_tci, struct sk_buff *skb)
static gro_result_t
vlan_gro_common(struct napi_struct *napi, struct vlan_group *grp,
unsigned int vlan_tci, struct sk_buff *skb)
{
struct sk_buff *p;

Expand Down
19 changes: 14 additions & 5 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2476,15 +2476,15 @@ void napi_gro_flush(struct napi_struct *napi)
}
EXPORT_SYMBOL(napi_gro_flush);

int dev_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
{
struct sk_buff **pp = NULL;
struct packet_type *ptype;
__be16 type = skb->protocol;
struct list_head *head = &ptype_base[ntohs(type) & PTYPE_HASH_MASK];
int same_flow;
int mac_len;
int ret;
enum gro_result ret;

if (!(skb->dev->features & NETIF_F_GRO))
goto normal;
Expand Down Expand Up @@ -2568,7 +2568,8 @@ int dev_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
}
EXPORT_SYMBOL(dev_gro_receive);

static int __napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
static gro_result_t
__napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
{
struct sk_buff *p;

Expand All @@ -2585,7 +2586,7 @@ static int __napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
return dev_gro_receive(napi, skb);
}

int napi_skb_finish(int ret, struct sk_buff *skb)
int napi_skb_finish(gro_result_t ret, struct sk_buff *skb)
{
int err = NET_RX_SUCCESS;

Expand All @@ -2600,6 +2601,10 @@ int napi_skb_finish(int ret, struct sk_buff *skb)
case GRO_MERGED_FREE:
kfree_skb(skb);
break;

case GRO_HELD:
case GRO_MERGED:
break;
}

return err;
Expand Down Expand Up @@ -2652,7 +2657,8 @@ struct sk_buff *napi_get_frags(struct napi_struct *napi)
}
EXPORT_SYMBOL(napi_get_frags);

int napi_frags_finish(struct napi_struct *napi, struct sk_buff *skb, int ret)
int napi_frags_finish(struct napi_struct *napi, struct sk_buff *skb,
gro_result_t ret)
{
int err = NET_RX_SUCCESS;

Expand All @@ -2674,6 +2680,9 @@ int napi_frags_finish(struct napi_struct *napi, struct sk_buff *skb, int ret)
case GRO_MERGED_FREE:
napi_reuse_skb(napi, skb);
break;

case GRO_MERGED:
break;
}

return err;
Expand Down

0 comments on commit d3f82cd

Please sign in to comment.