diff options
Diffstat (limited to 'platform/linux-generic/include/odp_packet_netmap.h')
-rw-r--r-- | platform/linux-generic/include/odp_packet_netmap.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/platform/linux-generic/include/odp_packet_netmap.h b/platform/linux-generic/include/odp_packet_netmap.h new file mode 100644 index 0000000..23aea5b --- /dev/null +++ b/platform/linux-generic/include/odp_packet_netmap.h @@ -0,0 +1,24 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef ODP_PACKET_NETMAP_H +#define ODP_PACKET_NETMAP_H + +#include <odp/pool.h> + +#include <linux/if_ether.h> + +/** Packet socket using netmap mmaped rings for both Rx and Tx */ +typedef struct { + odp_pool_t pool; /**< pool to alloc packets from */ + size_t max_frame_len; /**< buf_size - sizeof(pkt_hdr) */ + struct nm_desc *desc; /**< netmap meta-data for the device */ + uint32_t if_flags; /**< interface flags */ + int sockfd; /**< control socket */ + unsigned char if_mac[ETH_ALEN]; /**< eth mac address */ +} pkt_netmap_t; + +#endif |