diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2013-05-31 11:18:36 +0200 |
---|---|---|
committer | Daniel Borkmann <dborkman@redhat.com> | 2013-05-31 11:20:01 +0200 |
commit | 2f39b007d5382d01fc424e22b8e1a3681c2bc8cf (patch) | |
tree | b2d7b6bec9932c6bbfec6af8aa016cbd372adf72 /ring_rx.h | |
parent | ed4e3c64dc80bb775f9ecfdd2165297e34e2fb0c (diff) |
ring: implement setup of tpacket v3 ring
Implement ring setup routines and structures for TPACKET_V3.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Diffstat (limited to 'ring_rx.h')
-rw-r--r-- | ring_rx.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -23,6 +23,11 @@ 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) +{ + return ((pbd->h1.block_status & TP_STATUS_USER) == TP_STATUS_USER); +} + static inline void kernel_may_pull_from_rx(struct tpacket2_hdr *hdr) { hdr->tp_status = TP_STATUS_KERNEL; |