diff options
author | Carl Wallen <carl.wallen@linaro.org> | 2013-12-16 13:30:22 +0200 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2013-12-17 01:18:17 +0400 |
commit | d14083ebedb0811cf52349ab3bcbd72178340a32 (patch) | |
tree | ed569f5787199a26ce58fadece1367a2a410991e /.gitignore | |
parent | 04f20eb2d58b92058b9b7192b3f56ac3bc0ce2ee (diff) |
Initial ODP packet IO functionality
Added new ODP APIs for setting up basic packet IO:
odp_pktio_t odp_pktio_open(char *dev, odp_buffer_pool_t pool)
int odp_pktio_close(odp_pktio_t id)
int odp_pktio_recv(odp_pktio_t id, odp_packet_t pkt_table[], unsigned len)
int odp_pktio_send(odp_pktio_t id, odp_packet_t pkt_table[], unsigned len)
An example using the API is located in odp/test/packet/odp_example_pktio.c
Compile with the provided packet/Makefile and run with root privileges:
$> sudo ./odp_packet -i eth0,eth1,eth2,eth3
The underlying implementation of ODP packet IO for linux-generic is based on
linux raw packet sockets. The user can choose the socket 'mode' from one
of the following (odp_packet_socket.c):
#define ODP_PACKET_SOCKET_BASIC 0 /** use recv()/send() */
#define ODP_PACKET_SOCKET_MMSG 1 /** use recvmmsg()/sendmmsg() */
#define ODP_PACKET_SOCKET_MMAP 2 /** use PACKET_MMAP */
/** Choose one from the alternatives above */
#define ODP_PACKET_SOCKET_MODE (ODP_PACKET_SOCKET_MMAP)
Signed-off-by: Carl Wallen <carl.wallen@linaro.org>
Diffstat (limited to '.gitignore')
-rw-r--r-- | .gitignore | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..24a9392b7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +*.o +*.d +*~ +lib/ +test/odp_app + |