File: ethdev_priv.h

package info (click to toggle)
dpdk 25.11-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 127,892 kB
  • sloc: ansic: 2,358,479; python: 16,426; sh: 4,474; makefile: 1,713; awk: 70
file content (50 lines) | stat: -rw-r--r-- 932 bytes parent folder | download | duplicates (2)
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