diff options
author | Damjan Marion <damarion@cisco.com> | 2016-02-29 13:09:30 +0100 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2016-03-16 20:27:52 +0100 |
commit | 83243a0ff59f90eeed9da2da85b5bb5b3e0d5881 (patch) | |
tree | a8f2cf13bfd128a941d0dbadbb802c8eecc66aec /vlib | |
parent | b8abf877ba27098ca706281182cac67e15d7dd1e (diff) |
Add vpp native linux kernel AF_PACKET interface support
This is 1st drop of VPP native driver for linux AF_PACKET.
New CLI:
create host-interface name <host-if-name> [hw-addr <mac-address>]
References:
- Documentation/networking/packet_mmap.txt in the Linux kernel tree
- man 7 packet
Known issues:
- attaching to linux bridge doesn't work
- it is not expected to work in multicore setup
Change-Id: I1cb1c3d305f349759e90e76e25696718b73bd73d
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'vlib')
-rw-r--r-- | vlib/vlib/unix/input.c | 2 | ||||
-rw-r--r-- | vlib/vlib/unix/unix.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/vlib/vlib/unix/input.c b/vlib/vlib/unix/input.c index f9d7feceeb5..62b32544b94 100644 --- a/vlib/vlib/unix/input.c +++ b/vlib/vlib/unix/input.c @@ -72,6 +72,8 @@ linux_epoll_file_update (unix_file_t * f, e.events = EPOLLIN; if (f->flags & UNIX_FILE_DATA_AVAILABLE_TO_WRITE) e.events |= EPOLLOUT; + if (f->flags & UNIX_FILE_EVENT_EDGE_TRIGGERED) + e.events |= EPOLLET; e.data.u32 = f - um->file_pool; if (epoll_ctl (em->epoll_fd, diff --git a/vlib/vlib/unix/unix.h b/vlib/vlib/unix/unix.h index 0802a93baa3..e3e6aa14176 100644 --- a/vlib/vlib/unix/unix.h +++ b/vlib/vlib/unix/unix.h @@ -51,6 +51,7 @@ typedef struct unix_file { u32 flags; #define UNIX_FILE_DATA_AVAILABLE_TO_WRITE (1 << 0) +#define UNIX_FILE_EVENT_EDGE_TRIGGERED (1 << 1) /* Data available for function's use. */ uword private_data; |