tapcli: Receive vector of packets and memory leak fix
tapcli interfaces were creating single-packet frames. It now calls readv until the frame is full, or readv returns error EAGAIN. This is usefull when a significant amount of traffic flows through tap interfaces. This patch also fixes a memory leak by correctly initializing b->clone_count to zero. Change-Id: I15e435ba76d542be2f263274e76297425cd10243 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
This commit is contained in:

committed by
Gerrit Code Review

parent
d56209695a
commit
3a8f32be9f
File diff suppressed because it is too large
Load Diff
@ -18,6 +18,18 @@
|
||||
#ifndef __included_tapcli_h__
|
||||
#define __included_tapcli_h__
|
||||
|
||||
#define foreach_tapcli_error \
|
||||
/* Must be first. */ \
|
||||
_(NONE, "no error") \
|
||||
_(READ, "read error") \
|
||||
_(UNKNOWN, "unknown error")
|
||||
|
||||
typedef enum {
|
||||
#define _(sym,str) TAPCLI_ERROR_##sym,
|
||||
foreach_tapcli_error
|
||||
#undef _
|
||||
TAPCLI_N_ERROR,
|
||||
} tapcli_error_t;
|
||||
|
||||
typedef struct {
|
||||
u32 sw_if_index;
|
||||
|
Reference in New Issue
Block a user