summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-05-30 15:08:22 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-05-30 15:08:22 +0200
commit29517820a0d65345fe906c9ce8780e86e1059198 (patch)
tree1dbb6722b327e5d207f7ac8e47c7f7bfc537879b
parente146460e755773534ac13a9fa88e1d963fcee4cc (diff)
ring: remove fanout related bits
We currently do not support it, so do not keep it here. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
-rw-r--r--ring.h20
1 files changed, 0 insertions, 20 deletions
diff --git a/ring.h b/ring.h
index dea1b6c..44738d7 100644
--- a/ring.h
+++ b/ring.h
@@ -26,13 +26,6 @@
#include "built_in.h"
#include "die.h"
-#ifndef PACKET_FANOUT
-# define PACKET_FANOUT 18
-# define PACKET_FANOUT_POLICY_HASH 0
-# define PACKET_FANOUT_POLICY_LB 1
-# define PACKET_FANOUT_POLICY_DEFAULT PACKET_FANOUT_HASH
-#endif
-
struct frame_map {
struct tpacket2_hdr tp_h __aligned_tpacket;
struct sockaddr_ll s_ll __align_tpacket(sizeof(struct tpacket2_hdr));
@@ -101,9 +94,6 @@ static inline void tpacket_hdr_clone(struct tpacket2_hdr *thdrd,
# define POLLRDHUP 0x2000
#endif
-#define POLL_NEXT_PKT 0
-#define POLL_MOVE_OUT 1
-
static inline void prepare_polling(int sock, struct pollfd *pfd)
{
memset(pfd, 0, sizeof(*pfd));
@@ -112,16 +102,6 @@ static inline void prepare_polling(int sock, struct pollfd *pfd)
pfd->events = POLLIN | POLLRDNORM | POLLERR;
}
-static inline void set_sockopt_fanout(int sock, unsigned int fanout_id,
- unsigned int fanout_type)
-{
- unsigned int fanout_arg = (fanout_id | (fanout_type << 16));
- int ret = setsockopt(sock, SOL_PACKET, PACKET_FANOUT, &fanout_arg,
- sizeof(fanout_arg));
- if (ret)
- panic("No packet fanout support!\n");
-}
-
static inline void set_sockopt_tpacket(int sock)
{
int ret, val = TPACKET_V2;