X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fnet%2Fmemif%2Frte_eth_memif.h;h=2038bda742b4c051283f4d805ae439f6daa89161;hb=ea823b2c511d6e4a4e51fa5e4aabc30e5a30cdb7;hp=6f45b7072c69d6ae6c4648544e00538c9398807e;hpb=cbbbbd3365d299f55233b8f9a09ce0d9e43ec3ad;p=dpdk.git diff --git a/drivers/net/memif/rte_eth_memif.h b/drivers/net/memif/rte_eth_memif.h index 6f45b7072c..2038bda742 100644 --- a/drivers/net/memif/rte_eth_memif.h +++ b/drivers/net/memif/rte_eth_memif.h @@ -5,13 +5,9 @@ #ifndef _RTE_ETH_MEMIF_H_ #define _RTE_ETH_MEMIF_H_ -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif /* GNU_SOURCE */ - #include -#include +#include #include #include @@ -36,8 +32,8 @@ extern int memif_logtype; "%s(): " fmt "\n", __func__, ##args) enum memif_role_t { - MEMIF_ROLE_MASTER, - MEMIF_ROLE_SLAVE, + MEMIF_ROLE_SERVER, + MEMIF_ROLE_CLIENT, }; struct memif_region { @@ -64,8 +60,8 @@ struct memif_queue { uint16_t last_tail; /**< last ring tail */ struct rte_mbuf **buffers; - /**< Stored mbufs. Used in zero-copy tx. Slave stores transmitted - * mbufs to free them once master has received them. + /**< Stored mbufs. Used in zero-copy tx. Client stores transmitted + * mbufs to free them once server has received them. */ /* rx/tx info */ @@ -81,14 +77,16 @@ struct pmd_internals { memif_interface_id_t id; /**< unique id */ enum memif_role_t role; /**< device role */ uint32_t flags; /**< device status flags */ -#define ETH_MEMIF_FLAG_CONNECTING (1 << 0) +#define ETH_MEMIF_FLAG_CONNECTING (1 << 0) /**< device is connecting */ -#define ETH_MEMIF_FLAG_CONNECTED (1 << 1) +#define ETH_MEMIF_FLAG_CONNECTED (1 << 1) /**< device is connected */ -#define ETH_MEMIF_FLAG_ZERO_COPY (1 << 2) +#define ETH_MEMIF_FLAG_ZERO_COPY (1 << 2) /**< device is zero-copy enabled */ -#define ETH_MEMIF_FLAG_DISABLED (1 << 3) +#define ETH_MEMIF_FLAG_DISABLED (1 << 3) /**< device has not been configured and can not accept connection requests */ +#define ETH_MEMIF_FLAG_SOCKET_ABSTRACT (1 << 4) +/**< use abstract socket address */ char *socket_filename; /**< pointer to socket filename */ char secret[ETH_MEMIF_SECRET_SIZE]; /**< secret (optional security parameter) */ @@ -102,15 +100,15 @@ struct pmd_internals { struct { memif_log2_ring_size_t log2_ring_size; /**< log2 of ring size */ - uint8_t num_s2m_rings; /**< number of slave to master rings */ - uint8_t num_m2s_rings; /**< number of master to slave rings */ + uint8_t num_c2s_rings; /**< number of client to server rings */ + uint8_t num_s2c_rings; /**< number of server to client rings */ uint16_t pkt_buffer_size; /**< buffer size */ } cfg; /**< Configured parameters (max values) */ struct { memif_log2_ring_size_t log2_ring_size; /**< log2 of ring size */ - uint8_t num_s2m_rings; /**< number of slave to master rings */ - uint8_t num_m2s_rings; /**< number of master to slave rings */ + uint8_t num_c2s_rings; /**< number of client to server rings */ + uint8_t num_s2c_rings; /**< number of server to client rings */ uint16_t pkt_buffer_size; /**< buffer size */ } run; /**< Parameters used in active connection */ @@ -137,7 +135,7 @@ void memif_free_regions(struct rte_eth_dev *dev); /** * Finalize connection establishment process. Map shared memory file - * (master role), initialize ring queue, set link status up. + * (server role), initialize ring queue, set link status up. * * @param dev * memif device @@ -149,7 +147,7 @@ int memif_connect(struct rte_eth_dev *dev); /** * Create shared memory file and initialize ring queue. - * Only called by slave when establishing connection + * Only called by client when establishing connection * * @param dev * memif device