net/tap: add netlink back-end for flow API
authorPascal Mazon <pascal.mazon@6wind.com>
Thu, 23 Mar 2017 08:33:56 +0000 (09:33 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 4 Apr 2017 16:59:46 +0000 (18:59 +0200)
commit7c25284e30c2984bea55760897239e5270c0c06c
treef2287c0504b3e4bd6582cb2e7abd5a12d316e3e8
parent268483dc208686373698423e764b77bf53e181a1
net/tap: add netlink back-end for flow API

Each kernel netdevice may have queueing disciplines set for it, which
determine how to handle the packet (mostly on egress). That's part of
the TC (Traffic Control) mechanism.

Through TC, it is possible to set filter rules that match specific
packets, and act according to what is in the rule. This is a perfect
candidate to implement the flow API for the tap PMD, as it has an
associated kernel netdevice automatically.

Each flow API rule will be translated into its TC counterpart.

To leverage TC, it is necessary to communicate with the kernel using
netlink. This patch introduces a library to help that communication.

Inside netlink.c, functions are generic for any netlink messaging.
Inside tcmsgs.c, functions are specific to deal with TC rules.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
drivers/net/tap/Makefile
drivers/net/tap/tap_netlink.c [new file with mode: 0644]
drivers/net/tap/tap_netlink.h [new file with mode: 0644]
drivers/net/tap/tap_tcmsgs.c [new file with mode: 0644]
drivers/net/tap/tap_tcmsgs.h [new file with mode: 0644]