diff options
| author | David S. Miller <davem@nuts.ninka.net> | 2002-07-11 06:02:13 -0700 |
|---|---|---|
| committer | David S. Miller <davem@nuts.ninka.net> | 2002-07-11 06:02:13 -0700 |
| commit | 7d7c992ed2fbff809f7d24c9be7636619a9f5a84 (patch) | |
| tree | f34fddb4b2f78ff9660dc046421e155c230662f9 /include/linux/if_vlan.h | |
| parent | 647c8ba38a74b7a6e8494c0b131dcfb271a8e688 (diff) | |
Add netif_receive_skb-like interface for VLAN hw accel.
Diffstat (limited to 'include/linux/if_vlan.h')
| -rw-r--r-- | include/linux/if_vlan.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 99d7f1663f30..3fbf27dcc20e 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h @@ -141,9 +141,10 @@ struct vlan_skb_tx_cookie { (VLAN_TX_SKB_CB(__skb)->magic == VLAN_TX_COOKIE_MAGIC) #define vlan_tx_tag_get(__skb) (VLAN_TX_SKB_CB(__skb)->vlan_tag) -/* VLAN rx hw acceleration helper. This acts like netif_rx(). */ -static inline int vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, - unsigned short vlan_tag) +/* VLAN rx hw acceleration helper. This acts like netif_{rx,receive_skb}(). */ +static inline int __vlan_hwaccel_rx(struct sk_buff *skb, + struct vlan_group *grp, + unsigned short vlan_tag, int polling) { struct net_device_stats *stats; @@ -182,9 +183,22 @@ static inline int vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, break; }; - return netif_rx(skb); + return (polling ? netif_receive_skb(skb) : netif_rx(skb)); } +static inline int vlan_hwaccel_rx(struct sk_buff *skb, + struct vlan_group *grp, + unsigned short vlan_tag) +{ + return __vlan_hwaccel_rx(skb, grp, vlan_tag, 0); +} + +static inline int vlan_hwaccel_receive_skb(struct sk_buff *skb, + struct vlan_group *grp, + unsigned short vlan_tag) +{ + return __vlan_hwaccel_rx(skb, grp, vlan_tag, 1); +} #endif /* __KERNEL__ */ /* VLAN IOCTLs are found in sockios.h */ |
