diff options
author | Jani Nikula <jani.nikula@intel.com> | 2024-01-15 09:38:05 +0200 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2024-01-15 09:38:05 +0200 |
commit | 0ea5c948cb64bab5bc7a5516774eb8536f05aa0d (patch) | |
tree | 8437ec451643a0fa3e7e8f3cab5c851dcb5a9c4b /include/net/xdp_sock.h | |
parent | 78d49aaa36bd9b736bbd4b2944935e6714c4bfe6 (diff) | |
parent | 205e18c13545ab43cc4fe4930732b4feef551198 (diff) |
Merge drm/drm-next into drm-intel-next
Backmerge to bring Xe driver to drm-intel-next.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'include/net/xdp_sock.h')
-rw-r--r-- | include/net/xdp_sock.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/net/xdp_sock.h b/include/net/xdp_sock.h index 1617af380162..f83128007fb0 100644 --- a/include/net/xdp_sock.h +++ b/include/net/xdp_sock.h @@ -14,6 +14,8 @@ #include <linux/mm.h> #include <net/sock.h> +#define XDP_UMEM_SG_FLAG (1 << 1) + struct net_device; struct xsk_queue; struct xdp_buff; @@ -61,6 +63,13 @@ struct xdp_sock { struct xsk_queue *tx ____cacheline_aligned_in_smp; struct list_head tx_list; + /* record the number of tx descriptors sent by this xsk and + * when it exceeds MAX_PER_SOCKET_BUDGET, an opportunity needs + * to be given to other xsks for sending tx descriptors, thereby + * preventing other XSKs from being starved. + */ + u32 tx_budget_spent; + /* Protects generic receive. */ spinlock_t rx_lock; @@ -107,4 +116,13 @@ static inline void __xsk_map_flush(void) #endif /* CONFIG_XDP_SOCKETS */ +#if defined(CONFIG_XDP_SOCKETS) && defined(CONFIG_DEBUG_NET) +bool xsk_map_check_flush(void); +#else +static inline bool xsk_map_check_flush(void) +{ + return false; +} +#endif + #endif /* _LINUX_XDP_SOCK_H */ |