Fix build on kernel 5.5.x
This commit is contained in:
parent
2047270330
commit
fd93824053
|
@ -5784,22 +5784,6 @@ static inline int _kc_macvlan_release_l2fw_offload(struct net_device *dev)
|
|||
#define HAVE_NDO_XDP_XMIT_BULK_AND_FLAGS
|
||||
#define NO_NDO_XDP_FLUSH
|
||||
#define HAVE_AF_XDP_SUPPORT
|
||||
#ifndef xdp_umem_get_data
|
||||
static inline char *__kc_xdp_umem_get_data(struct xdp_umem *umem, u64 addr)
|
||||
{
|
||||
return umem->pages[addr >> PAGE_SHIFT].addr + (addr & (PAGE_SIZE - 1));
|
||||
}
|
||||
|
||||
#define xdp_umem_get_data __kc_xdp_umem_get_data
|
||||
#endif /* !xdp_umem_get_data */
|
||||
#ifndef xdp_umem_get_dma
|
||||
static inline dma_addr_t __kc_xdp_umem_get_dma(struct xdp_umem *umem, u64 addr)
|
||||
{
|
||||
return umem->pages[addr >> PAGE_SHIFT].dma + (addr & (PAGE_SIZE - 1));
|
||||
}
|
||||
|
||||
#define xdp_umem_get_dma __kc_xdp_umem_get_dma
|
||||
#endif /* !xdp_umem_get_dma */
|
||||
#endif /* 4.18.0 */
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -6125,4 +6109,10 @@ static inline void skb_frag_off_add(skb_frag_t *frag, int delta)
|
|||
#define HAVE_NDO_XSK_WAKEUP
|
||||
#endif /* 5.4.0 */
|
||||
|
||||
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0) )
|
||||
#ifndef FIELD_SIZEOF
|
||||
#define FIELD_SIZEOF(t, f) (sizeof_field(t, f))
|
||||
#endif
|
||||
#endif /* 5.5.0 */
|
||||
|
||||
#endif /* _KCOMPAT_H_ */
|
||||
|
|
Loading…
Reference in a new issue