busy_poll.h (c95baf12f5077419db01313ab61c2aac007d40cd) busy_poll.h (78e57f152c001eed0321ba4413a07c9e33e753e6)
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * net busy poll support
4 * Copyright(c) 2013 Intel Corporation.
5 *
6 * Author: Eliezer Tamir
7 *
8 * Contact Information:

--- 100 unchanged lines hidden (view full) ---

109#endif
110}
111
112/* used in the NIC receive handler to mark the skb */
113static inline void skb_mark_napi_id(struct sk_buff *skb,
114 struct napi_struct *napi)
115{
116#ifdef CONFIG_NET_RX_BUSY_POLL
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * net busy poll support
4 * Copyright(c) 2013 Intel Corporation.
5 *
6 * Author: Eliezer Tamir
7 *
8 * Contact Information:

--- 100 unchanged lines hidden (view full) ---

109#endif
110}
111
112/* used in the NIC receive handler to mark the skb */
113static inline void skb_mark_napi_id(struct sk_buff *skb,
114 struct napi_struct *napi)
115{
116#ifdef CONFIG_NET_RX_BUSY_POLL
117 skb->napi_id = napi->napi_id;
117 /* If the skb was already marked with a valid NAPI ID, avoid overwriting
118 * it.
119 */
120 if (skb->napi_id < MIN_NAPI_ID)
121 skb->napi_id = napi->napi_id;
118#endif
119}
120
121/* used in the protocol hanlder to propagate the napi_id to the socket */
122static inline void sk_mark_napi_id(struct sock *sk, const struct sk_buff *skb)
123{
124#ifdef CONFIG_NET_RX_BUSY_POLL
125 WRITE_ONCE(sk->sk_napi_id, skb->napi_id);

--- 15 unchanged lines hidden ---
122#endif
123}
124
125/* used in the protocol hanlder to propagate the napi_id to the socket */
126static inline void sk_mark_napi_id(struct sock *sk, const struct sk_buff *skb)
127{
128#ifdef CONFIG_NET_RX_BUSY_POLL
129 WRITE_ONCE(sk->sk_napi_id, skb->napi_id);

--- 15 unchanged lines hidden ---