diff options
Diffstat (limited to 'ring_rx.h')
-rw-r--r-- | ring_rx.h | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -22,19 +22,21 @@ static inline int user_may_pull_from_rx(struct tpacket2_hdr *hdr) return ((hdr->tp_status & TP_STATUS_USER) == TP_STATUS_USER); } -static inline int user_may_pull_from_rx_block(struct block_desc *pbd) +static inline void kernel_may_pull_from_rx(struct tpacket2_hdr *hdr) { - return ((pbd->h1.block_status & TP_STATUS_USER) == TP_STATUS_USER); + hdr->tp_status = TP_STATUS_KERNEL; } -static inline void kernel_may_pull_from_rx(struct tpacket2_hdr *hdr) +#ifdef HAVE_TPACKET3 +static inline int user_may_pull_from_rx_block(struct block_desc *pbd) { - hdr->tp_status = TP_STATUS_KERNEL; + return ((pbd->h1.block_status & TP_STATUS_USER) == TP_STATUS_USER); } static inline void kernel_may_pull_from_rx_block(struct block_desc *pbd) { pbd->h1.block_status = TP_STATUS_KERNEL; } +#endif /* HAVE_TPACKETV3 */ #endif /* RX_RING_H */ |