Rename ndo_ll_poll to ndo_busy_poll. Rename sk_mark_ll to sk_mark_napi_id. Rename skb_mark_ll to skb_mark_napi_id. Correct all useres of these functions. Update comments and defines in include/net/busy_poll.h
Unified · Split
| @@ -990,7 +990,7 @@ reuse_rx: · 989 unmodified lines | ||
| 990 | 990 | __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), |
| 991 | 991 | le16_to_cpu(cqe_fp->vlan_tag)); |
| 992 | 992 | |
| 993 | − skb_mark_ll(skb, &fp->napi); | |
| 993 | + skb_mark_napi_id(skb, &fp->napi); | |
| 994 | 994 | |
| 995 | 995 | if (bnx2x_fp_ll_polling(fp)) |
| 996 | 996 | netif_receive_skb(skb); |
| @@ -12027,7 +12027,7 @@ static const struct net_device_ops bnx2x_netdev_ops = { · 12026 unmodified lines | ||
| 12027 | 12027 | #endif |
| 12028 | 12028 | |
| 12029 | 12029 | #ifdef CONFIG_NET_LL_RX_POLL |
| 12030 | − .ndo_ll_poll = bnx2x_low_latency_recv, | |
| 12030 | + .ndo_busy_poll = bnx2x_low_latency_recv, | |
| 12031 | 12031 | #endif |
| 12032 | 12032 | }; |
| 12033 | 12033 | |
| @@ -1978,7 +1978,7 @@ static int ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector, · 1977 unmodified lines | ||
| 1978 | 1978 | } |
| 1979 | 1979 | |
| 1980 | 1980 | #endif /* IXGBE_FCOE */ |
| 1981 | − skb_mark_ll(skb, &q_vector->napi); | |
| 1981 | + skb_mark_napi_id(skb, &q_vector->napi); | |
| 1982 | 1982 | ixgbe_rx_skb(q_vector, skb); |
| 1983 | 1983 | |
| 1984 | 1984 | /* update budget accounting */ |
| @@ -7228,7 +7228,7 @@ static const struct net_device_ops ixgbe_netdev_ops = { · 5243 unmodified lines | ||
| 7228 | 7228 | .ndo_poll_controller = ixgbe_netpoll, |
| 7229 | 7229 | #endif |
| 7230 | 7230 | #ifdef CONFIG_NET_LL_RX_POLL |
| 7231 | − .ndo_ll_poll = ixgbe_low_latency_recv, | |
| 7231 | + .ndo_busy_poll = ixgbe_low_latency_recv, | |
| 7232 | 7232 | #endif |
| 7233 | 7233 | #ifdef IXGBE_FCOE |
| 7234 | 7234 | .ndo_fcoe_ddp_setup = ixgbe_fcoe_ddp_get, |
| @@ -2141,7 +2141,7 @@ static const struct net_device_ops mlx4_netdev_ops = { · 2140 unmodified lines | ||
| 2141 | 2141 | .ndo_rx_flow_steer = mlx4_en_filter_rfs, |
| 2142 | 2142 | #endif |
| 2143 | 2143 | #ifdef CONFIG_NET_LL_RX_POLL |
| 2144 | − .ndo_ll_poll = mlx4_en_low_latency_recv, | |
| 2144 | + .ndo_busy_poll = mlx4_en_low_latency_recv, | |
| 2145 | 2145 | #endif |
| 2146 | 2146 | }; |
| 2147 | 2147 | |
| @@ -767,7 +767,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud · 766 unmodified lines | ||
| 767 | 767 | timestamp); |
| 768 | 768 | } |
| 769 | 769 | |
| 770 | − skb_mark_ll(skb, &cq->napi); | |
| 770 | + skb_mark_napi_id(skb, &cq->napi); | |
| 771 | 771 | |
| 772 | 772 | /* Push it up the stack */ |
| 773 | 773 | netif_receive_skb(skb); |
| @@ -974,7 +974,7 @@ struct net_device_ops { · 973 unmodified lines | ||
| 974 | 974 | void (*ndo_netpoll_cleanup)(struct net_device *dev); |
| 975 | 975 | #endif |
| 976 | 976 | #ifdef CONFIG_NET_LL_RX_POLL |
| 977 | − int (*ndo_ll_poll)(struct napi_struct *dev); | |
| 977 | + int (*ndo_busy_poll)(struct napi_struct *dev); | |
| 978 | 978 | #endif |
| 979 | 979 | int (*ndo_set_vf_mac)(struct net_device *dev, |
| 980 | 980 | int queue, u8 *mac); |
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | /* |
| 2 | − * Low Latency Sockets | |
| 2 | + * net busy poll support | |
| 3 | 3 | * Copyright(c) 2013 Intel Corporation. |
| 4 | 4 | * |
| 5 | 5 | * This program is free software; you can redistribute it and/or modify it |
| @@ -21,8 +21,8 @@ · 15 unmodified lines | ||
| 21 | 21 | * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> |
| 22 | 22 | */ |
| 23 | 23 | |
| 24 | −#ifndef _LINUX_NET_LL_POLL_H | |
| 25 | −#define _LINUX_NET_LL_POLL_H | |
| 24 | +#ifndef _LINUX_NET_BUSY_POLL_H | |
| 25 | +#define _LINUX_NET_BUSY_POLL_H | |
| 26 | 26 | |
| 27 | 27 | #include <linux/netdevice.h> |
| 28 | 28 | #include <net/ip.h> |
| @@ -110,11 +110,11 @@ static inline bool sk_busy_loop(struct sock *sk, int nonblock) · 81 unmodified lines | ||
| 110 | 110 | goto out; |
| 111 | 111 | |
| 112 | 112 | ops = napi->dev->netdev_ops; |
| 113 | − if (!ops->ndo_ll_poll) | |
| 113 | + if (!ops->ndo_busy_poll) | |
| 114 | 114 | goto out; |
| 115 | 115 | |
| 116 | 116 | do { |
| 117 | − rc = ops->ndo_ll_poll(napi); | |
| 117 | + rc = ops->ndo_busy_poll(napi); | |
| 118 | 118 | |
| 119 | 119 | if (rc == LL_FLUSH_FAILED) |
| 120 | 120 | break; /* permanent failure */ |
| @@ -134,13 +134,14 @@ out: · 13 unmodified lines | ||
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | /* used in the NIC receive handler to mark the skb */ |
| 137 | −static inline void skb_mark_ll(struct sk_buff *skb, struct napi_struct *napi) | |
| 137 | +static inline void skb_mark_napi_id(struct sk_buff *skb, | |
| 138 | + struct napi_struct *napi) | |
| 138 | 139 | { |
| 139 | 140 | skb->napi_id = napi->napi_id; |
| 140 | 141 | } |
| 141 | 142 | |
| 142 | 143 | /* used in the protocol hanlder to propagate the napi_id to the socket */ |
| 143 | −static inline void sk_mark_ll(struct sock *sk, struct sk_buff *skb) | |
| 144 | +static inline void sk_mark_napi_id(struct sock *sk, struct sk_buff *skb) | |
| 144 | 145 | { |
| 145 | 146 | sk->sk_napi_id = skb->napi_id; |
| 146 | 147 | } |
| @@ -166,11 +167,12 @@ static inline bool sk_busy_poll(struct sock *sk, int nonblock) · 19 unmodified lines | ||
| 166 | 167 | return false; |
| 167 | 168 | } |
| 168 | 169 | |
| 169 | −static inline void skb_mark_ll(struct sk_buff *skb, struct napi_struct *napi) | |
| 170 | +static inline void skb_mark_napi_id(struct sk_buff *skb, | |
| 171 | + struct napi_struct *napi) | |
| 170 | 172 | { |
| 171 | 173 | } |
| 172 | 174 | |
| 173 | −static inline void sk_mark_ll(struct sock *sk, struct sk_buff *skb) | |
| 175 | +static inline void sk_mark_napi_id(struct sock *sk, struct sk_buff *skb) | |
| 174 | 176 | { |
| 175 | 177 | } |
| 176 | 178 | |
| @@ -180,4 +182,4 @@ static inline bool busy_loop_timeout(unsigned long end_time) · 3 unmodified lines | ||
| 180 | 182 | } |
| 181 | 183 | |
| 182 | 184 | #endif /* CONFIG_NET_LL_RX_POLL */ |
| 183 | −#endif /* _LINUX_NET_LL_POLL_H */ | |
| 185 | +#endif /* _LINUX_NET_BUSY_POLL_H */ | |
| @@ -1994,7 +1994,7 @@ process: · 1993 unmodified lines | ||
| 1994 | 1994 | if (sk_filter(sk, skb)) |
| 1995 | 1995 | goto discard_and_relse; |
| 1996 | 1996 | |
| 1997 | − sk_mark_ll(sk, skb); | |
| 1997 | + sk_mark_napi_id(sk, skb); | |
| 1998 | 1998 | skb->dev = NULL; |
| 1999 | 1999 | |
| 2000 | 2000 | bh_lock_sock_nested(sk); |
| @@ -1713,7 +1713,7 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, · 1712 unmodified lines | ||
| 1713 | 1713 | if (sk != NULL) { |
| 1714 | 1714 | int ret; |
| 1715 | 1715 | |
| 1716 | − sk_mark_ll(sk, skb); | |
| 1716 | + sk_mark_napi_id(sk, skb); | |
| 1717 | 1717 | ret = udp_queue_rcv_skb(sk, skb); |
| 1718 | 1718 | sock_put(sk); |
| 1719 | 1719 | |
| @@ -1499,7 +1499,7 @@ process: · 1498 unmodified lines | ||
| 1499 | 1499 | if (sk_filter(sk, skb)) |
| 1500 | 1500 | goto discard_and_relse; |
| 1501 | 1501 | |
| 1502 | − sk_mark_ll(sk, skb); | |
| 1502 | + sk_mark_napi_id(sk, skb); | |
| 1503 | 1503 | skb->dev = NULL; |
| 1504 | 1504 | |
| 1505 | 1505 | bh_lock_sock_nested(sk); |
| @@ -844,7 +844,7 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, · 843 unmodified lines | ||
| 844 | 844 | if (sk != NULL) { |
| 845 | 845 | int ret; |
| 846 | 846 | |
| 847 | − sk_mark_ll(sk, skb); | |
| 847 | + sk_mark_napi_id(sk, skb); | |
| 848 | 848 | ret = udpv6_queue_rcv_skb(sk, skb); |
| 849 | 849 | sock_put(sk); |
| 850 | 850 | |