NDN-DPDK
High-Speed Named Data Networking Forwarder
Loading...
Searching...
No Matches
locator.h
Go to the documentation of this file.
1#ifndef NDNDPDK_ETHFACE_LOCATOR_H
2#define NDNDPDK_ETHFACE_LOCATOR_H
3
5
6#include "../dpdk/ethdev.h"
7#include "xdp-locator.h"
8
10typedef struct EthLocator {
11 struct rte_ether_addr local;
12 struct rte_ether_addr remote;
13 uint16_t vlan;
14
15 struct rte_ipv6_addr localIP;
16 struct rte_ipv6_addr remoteIP;
17 uint16_t localUDP;
18 uint16_t remoteUDP;
19
20 uint32_t vxlan;
21 struct rte_ether_addr innerLocal;
22 struct rte_ether_addr innerRemote;
23
24 uint32_t ulTEID;
25 uint32_t dlTEID;
26 struct rte_ipv6_addr innerLocalIP;
27 struct rte_ipv6_addr innerRemoteIP;
28 uint8_t ulQFI;
29 uint8_t dlQFI;
30 bool isGtp;
32
34__attribute__((nonnull)) bool
36
37typedef struct EthLocatorClass {
38 uint16_t etherType;
39 bool passthru;
40 bool multicast;
41 bool v4;
42 bool udp;
43 char tunnel;
45
47__attribute__((nonnull)) EthLocatorClass
49
50enum {
53 RTE_ETHER_HDR_LEN + RTE_VLAN_HLEN +
54 RTE_MAX_T(sizeof(struct rte_ipv4_hdr), sizeof(struct rte_ipv6_hdr), size_t) +
55 sizeof(struct rte_udp_hdr) +
56 RTE_MAX_T(sizeof(struct rte_vxlan_hdr) + RTE_ETHER_HDR_LEN,
57 sizeof(EthGtpHdr) + sizeof(struct rte_ipv4_hdr) + sizeof(struct rte_udp_hdr), size_t)
58};
59static_assert(EthLocator_MaxHdrLen <= RTE_PKTMBUF_HEADROOM, "");
60
61#endif // NDNDPDK_ETHFACE_LOCATOR_H
EthLocatorClass EthLocator_Classify(const EthLocator *loc)
Classify EthFace locator.
Definition locator.c:5
@ EthLocator_MaxHdrLen
EthLocator derived header buffer length.
Definition locator.h:52
bool EthLocator_CanCoexist(const EthLocator *a, const EthLocator *b)
Determine whether two locators can coexist on the same port.
Definition locator.c:27
GTP-U header with PDU session container.
Definition xdp-locator.h:46
Definition locator.h:37
bool udp
is UDP?
Definition locator.h:42
bool multicast
is outer Ethernet multicast?
Definition locator.h:40
char tunnel
'V' for VXLAN, 'G' for GTP-U, 0 otherwise
Definition locator.h:43
bool v4
is IPv4?
Definition locator.h:41
bool passthru
is passthru face
Definition locator.h:39
uint16_t etherType
outer EtherType, 0 for memif
Definition locator.h:38
EthFace address information.
Definition locator.h:10
struct rte_ipv6_addr localIP
Definition locator.h:15
struct rte_ether_addr innerLocal
Definition locator.h:21
uint32_t ulTEID
Definition locator.h:24
bool isGtp
Definition locator.h:30
struct rte_ipv6_addr innerRemoteIP
Definition locator.h:27
uint16_t vlan
Definition locator.h:13
struct rte_ipv6_addr innerLocalIP
Definition locator.h:26
uint8_t dlQFI
Definition locator.h:29
struct rte_ether_addr innerRemote
Definition locator.h:22
uint16_t remoteUDP
Definition locator.h:18
uint32_t dlTEID
Definition locator.h:25
uint16_t localUDP
Definition locator.h:17
struct rte_ipv6_addr remoteIP
Definition locator.h:16
uint8_t ulQFI
Definition locator.h:28
struct rte_ether_addr remote
Definition locator.h:12
struct rte_ether_addr local
Definition locator.h:11
uint32_t vxlan
Definition locator.h:20