From 83243a0ff59f90eeed9da2da85b5bb5b3e0d5881 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Mon, 29 Feb 2016 13:09:30 +0100 Subject: 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 [hw-addr ] 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 --- vlib/vlib/unix/input.c | 2 ++ vlib/vlib/unix/unix.h | 1 + 2 files changed, 3 insertions(+) (limited to 'vlib') diff --git a/vlib/vlib/unix/input.c b/vlib/vlib/unix/input.c index f9d7fece..62b32544 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 0802a93b..e3e6aa14 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; -- cgit 1.2.3-korg