1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2023 Marvell.
*/
#ifndef APP_GRAPH_ETHDEV_PRIV_H
#define APP_GRAPH_ETHDEV_PRIV_H
#include "ethdev.h"
#define NS_PER_SEC 1E9
#define ETHDEV_RXQ_RSS_MAX 16
#define ETHDEV_RX_DESC_DEFAULT 1024
#define ETHDEV_TX_DESC_DEFAULT 1024
struct ethdev_rss_config {
uint32_t queue_id[ETHDEV_RXQ_RSS_MAX];
uint32_t n_queues;
};
struct ethdev_config {
char dev_name[RTE_ETH_NAME_MAX_LEN];
uint16_t port_id;
struct {
uint32_t n_queues;
uint32_t queue_size;
char mempool_name[RTE_MEMPOOL_NAMESIZE];
struct rte_mempool *mp;
struct ethdev_rss_config *rss;
} rx;
struct {
uint32_t n_queues;
uint32_t queue_size;
} tx;
int promiscuous;
uint32_t mtu;
};
struct ethdev {
TAILQ_ENTRY(ethdev) next;
uint16_t tx_port_id;
struct ethdev_config config;
struct ipv4_addr_config ip4_addr;
struct ipv6_addr_config ip6_addr;
};
TAILQ_HEAD(ethdev_head, ethdev);
#endif
|