Skip to content

Commit 8b80cda

Browse files
Eliezer Tamirdavem330
authored andcommitted
net: rename ll methods to busy-poll
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 Signed-off-by: Eliezer Tamir <eliezer.tamir@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 076bb0c commit 8b80cda

11 files changed

Lines changed: 23 additions & 21 deletions

File tree

‎drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
990990
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
991991
le16_to_cpu(cqe_fp->vlan_tag));
992992

993-
skb_mark_ll(skb, &fp->napi);
993+
skb_mark_napi_id(skb, &fp->napi);
994994

995995
if (bnx2x_fp_ll_polling(fp))
996996
netif_receive_skb(skb);

‎drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12027,7 +12027,7 @@ static const struct net_device_ops bnx2x_netdev_ops = {
1202712027
#endif
1202812028

1202912029
#ifdef CONFIG_NET_LL_RX_POLL
12030-
.ndo_ll_poll = bnx2x_low_latency_recv,
12030+
.ndo_busy_poll = bnx2x_low_latency_recv,
1203112031
#endif
1203212032
};
1203312033

‎drivers/net/ethernet/intel/ixgbe/ixgbe_main.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1978,7 +1978,7 @@ static int ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
19781978
}
19791979

19801980
#endif /* IXGBE_FCOE */
1981-
skb_mark_ll(skb, &q_vector->napi);
1981+
skb_mark_napi_id(skb, &q_vector->napi);
19821982
ixgbe_rx_skb(q_vector, skb);
19831983

19841984
/* update budget accounting */
@@ -7228,7 +7228,7 @@ static const struct net_device_ops ixgbe_netdev_ops = {
72287228
.ndo_poll_controller = ixgbe_netpoll,
72297229
#endif
72307230
#ifdef CONFIG_NET_LL_RX_POLL
7231-
.ndo_ll_poll = ixgbe_low_latency_recv,
7231+
.ndo_busy_poll = ixgbe_low_latency_recv,
72327232
#endif
72337233
#ifdef IXGBE_FCOE
72347234
.ndo_fcoe_ddp_setup = ixgbe_fcoe_ddp_get,

‎drivers/net/ethernet/mellanox/mlx4/en_netdev.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2141,7 +2141,7 @@ static const struct net_device_ops mlx4_netdev_ops = {
21412141
.ndo_rx_flow_steer = mlx4_en_filter_rfs,
21422142
#endif
21432143
#ifdef CONFIG_NET_LL_RX_POLL
2144-
.ndo_ll_poll = mlx4_en_low_latency_recv,
2144+
.ndo_busy_poll = mlx4_en_low_latency_recv,
21452145
#endif
21462146
};
21472147

‎drivers/net/ethernet/mellanox/mlx4/en_rx.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
767767
timestamp);
768768
}
769769

770-
skb_mark_ll(skb, &cq->napi);
770+
skb_mark_napi_id(skb, &cq->napi);
771771

772772
/* Push it up the stack */
773773
netif_receive_skb(skb);

‎include/linux/netdevice.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ struct net_device_ops {
974974
void (*ndo_netpoll_cleanup)(struct net_device *dev);
975975
#endif
976976
#ifdef CONFIG_NET_LL_RX_POLL
977-
int (*ndo_ll_poll)(struct napi_struct *dev);
977+
int (*ndo_busy_poll)(struct napi_struct *dev);
978978
#endif
979979
int (*ndo_set_vf_mac)(struct net_device *dev,
980980
int queue, u8 *mac);

‎include/net/busy_poll.h‎

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Low Latency Sockets
2+
* net busy poll support
33
* Copyright(c) 2013 Intel Corporation.
44
*
55
* This program is free software; you can redistribute it and/or modify it
@@ -21,8 +21,8 @@
2121
* e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
2222
*/
2323

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
2626

2727
#include <linux/netdevice.h>
2828
#include <net/ip.h>
@@ -110,11 +110,11 @@ static inline bool sk_busy_loop(struct sock *sk, int nonblock)
110110
goto out;
111111

112112
ops = napi->dev->netdev_ops;
113-
if (!ops->ndo_ll_poll)
113+
if (!ops->ndo_busy_poll)
114114
goto out;
115115

116116
do {
117-
rc = ops->ndo_ll_poll(napi);
117+
rc = ops->ndo_busy_poll(napi);
118118

119119
if (rc == LL_FLUSH_FAILED)
120120
break; /* permanent failure */
@@ -134,13 +134,14 @@ static inline bool sk_busy_loop(struct sock *sk, int nonblock)
134134
}
135135

136136
/* 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)
138139
{
139140
skb->napi_id = napi->napi_id;
140141
}
141142

142143
/* 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)
144145
{
145146
sk->sk_napi_id = skb->napi_id;
146147
}
@@ -166,11 +167,12 @@ static inline bool sk_busy_poll(struct sock *sk, int nonblock)
166167
return false;
167168
}
168169

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)
170172
{
171173
}
172174

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)
174176
{
175177
}
176178

@@ -180,4 +182,4 @@ static inline bool busy_loop_timeout(unsigned long end_time)
180182
}
181183

182184
#endif /* CONFIG_NET_LL_RX_POLL */
183-
#endif /* _LINUX_NET_LL_POLL_H */
185+
#endif /* _LINUX_NET_BUSY_POLL_H */

‎net/ipv4/tcp_ipv4.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1994,7 +1994,7 @@ int tcp_v4_rcv(struct sk_buff *skb)
19941994
if (sk_filter(sk, skb))
19951995
goto discard_and_relse;
19961996

1997-
sk_mark_ll(sk, skb);
1997+
sk_mark_napi_id(sk, skb);
19981998
skb->dev = NULL;
19991999

20002000
bh_lock_sock_nested(sk);

‎net/ipv4/udp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1713,7 +1713,7 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
17131713
if (sk != NULL) {
17141714
int ret;
17151715

1716-
sk_mark_ll(sk, skb);
1716+
sk_mark_napi_id(sk, skb);
17171717
ret = udp_queue_rcv_skb(sk, skb);
17181718
sock_put(sk);
17191719

‎net/ipv6/tcp_ipv6.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1499,7 +1499,7 @@ static int tcp_v6_rcv(struct sk_buff *skb)
14991499
if (sk_filter(sk, skb))
15001500
goto discard_and_relse;
15011501

1502-
sk_mark_ll(sk, skb);
1502+
sk_mark_napi_id(sk, skb);
15031503
skb->dev = NULL;
15041504

15051505
bh_lock_sock_nested(sk);

0 commit comments

Comments
 (0)