X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=docs%2FAPI%2Fethernet_8h.html;fp=docs%2FAPI%2Fethernet_8h.html;h=6300d1536350fb17e977e633ce179f0b55f37a21;hb=870e1b86b0c74169b215c166dee787c7c1a20d06;hp=0000000000000000000000000000000000000000;hpb=298022ce50fa8133cc880507170c4b7120d227b5;p=o-du%2Fphy.git diff --git a/docs/API/ethernet_8h.html b/docs/API/ethernet_8h.html new file mode 100644 index 0000000..6300d15 --- /dev/null +++ b/docs/API/ethernet_8h.html @@ -0,0 +1,894 @@ + + + + + + + +o-du/phy: ethernet.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
o-du/phy +
+
Intel O-RAN/X-RAN Generated Doxygen Documentation
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+Data Structures | +Macros | +Enumerations | +Functions | +Variables
+
+
ethernet.h File Reference
+
+
+ +

This file has all definitions for the Ethernet Data Interface Layer. +More...

+
#include <rte_config.h>
+#include <rte_ether.h>
+#include <rte_mbuf.h>
+
+Include dependency graph for ethernet.h:
+
+
+ + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + + + + + + + + + + + + +
+
+

Go to the source code of this file.

+ + + + + + +

+Data Structures

struct  burst_hdr
 
struct  ethdi_hdr
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Macros

#define BURST_SIZE   4096
 
#define FLEXRAN_UP_VLAN_TAG   2
 
#define ETHER_TYPE_ETHDI   ETHER_TYPE_IPv4 /* hack needed for jumbo frames */
 
#define ETHER_TYPE_ECPRI   0xAEFE
 
#define ETHER_TYPE_SYNC   0xBEFE
 
#define ETHER_TYPE_START_TX   0xCEFE
 
#define NUM_MBUFS   65536
 
#define MBUF_CACHE   256
 
#define MBUF_POOL_ELM_SMALL   1500 /* regular ethernet MTU, most compatible */
 
#define MBUF_POOL_ELEMENT   MAX_RX_LEN
 
#define MAX_RX_LEN   9600
 
#define MAX_TX_LEN   (MAX_RX_LEN - 14) /* headroom for rx driver */
 
#define MAX_DATA_SIZE
 
#define MBUF_POOL_ELM_BIG   USHRT_MAX
 
#define NUM_MBUFS_BIG   64
 
#define DEFAULT_DUMP_LENGTH   96
 
#define nlog(m, ...)   __xran_delayed_msg("%s(): " m "\n", __FUNCTION__, ##__VA_ARGS__)
 
#define delayed_message   nlog /* this is the old alias for this function */
 
#define wlog(m, ...)   nlog("WARNING: " m, ##__VA_ARGS__)
 
#define elog(m, ...)   nlog("ERROR: " m, ##__VA_ARGS__)
 
#define dlog(m, ...)
 
#define PANIC_ON(x, m, ...)
 
+ + + +

+Enumerations

enum  pkt_type {
+  PKT_ZERO, +PKT_EMPTY, +PKT_DISCOVER_REQUEST, +PKT_PING, +
+  PKT_PONG, +PKT_DISCOVER_REPLY, +PKT_LTE_DATA, +PKT_LTE_CONTROL, +
+  PKT_BURST, +PKT_DATATEST, +PKT_ADD_ETHDEV, +PKT_SYNC_START, +
+  PKT_LAST +
+ }
 
+ + + + + + + + + +

+Functions

void xran_init_mbuf_pool (void)
 
void xran_init_port (int port, struct ether_addr *p_lls_cu_addr)
 
void xran_add_eth_hdr_vlan (struct ether_addr *dst, uint16_t ethertype, struct rte_mbuf *mb, uint16_t vlan_tci)
 
int __xran_delayed_msg (const char *fmt,...)
 
+ + + + + + + + + + + +

+Variables

struct rte_mempool * _eth_mbuf_pool
 
struct rte_mempool * _eth_mbuf_pool_small
 
struct rte_mempool * _eth_mbuf_pool_big
 
struct rte_mempool * socket_direct_pool
 
struct rte_mempool * socket_indirect_pool
 
+

Detailed Description

+

This file has all definitions for the Ethernet Data Interface Layer.

+
Author
Intel Corporation
+ +

Definition in file ethernet.h.

+

Macro Definition Documentation

+ +

◆ BURST_SIZE

+ +
+
+ + + + +
#define BURST_SIZE   4096
+
+ +

Definition at line 37 of file ethernet.h.

+ +
+
+ +

◆ DEFAULT_DUMP_LENGTH

+ +
+
+ + + + +
#define DEFAULT_DUMP_LENGTH   96
+
+ +

Definition at line 61 of file ethernet.h.

+ +
+
+ +

◆ delayed_message

+ +
+
+ + + + +
#define delayed_message   nlog /* this is the old alias for this function */
+
+ +

Definition at line 139 of file ethernet.h.

+ +
+
+ +

◆ dlog

+ +
+
+ + + + + + + + + + + + + + + + + + +
#define dlog( m,
 ... 
)
+
+ +

Definition at line 145 of file ethernet.h.

+ +
+
+ +

◆ elog

+ +
+
+ + + + + + + + + + + + + + + + + + +
#define elog( m,
 ... 
)   nlog("ERROR: " m, ##__VA_ARGS__)
+
+ +

Definition at line 141 of file ethernet.h.

+ +
+
+ +

◆ ETHER_TYPE_ECPRI

+ +
+
+ + + + +
#define ETHER_TYPE_ECPRI   0xAEFE
+
+ +

Definition at line 42 of file ethernet.h.

+ +
+
+ +

◆ ETHER_TYPE_ETHDI

+ +
+
+ + + + +
#define ETHER_TYPE_ETHDI   ETHER_TYPE_IPv4 /* hack needed for jumbo frames */
+
+ +

Definition at line 41 of file ethernet.h.

+ +
+
+ +

◆ ETHER_TYPE_START_TX

+ +
+
+ + + + +
#define ETHER_TYPE_START_TX   0xCEFE
+
+ +

Definition at line 44 of file ethernet.h.

+ +
+
+ +

◆ ETHER_TYPE_SYNC

+ +
+
+ + + + +
#define ETHER_TYPE_SYNC   0xBEFE
+
+ +

Definition at line 43 of file ethernet.h.

+ +
+
+ +

◆ FLEXRAN_UP_VLAN_TAG

+ +
+
+ + + + +
#define FLEXRAN_UP_VLAN_TAG   2
+
+ +

Definition at line 40 of file ethernet.h.

+ +
+
+ +

◆ MAX_DATA_SIZE

+ +
+
+ + + + +
#define MAX_DATA_SIZE
+
+Value:
(MAX_TX_LEN - sizeof(struct ether_hdr) - \
sizeof(struct ethdi_hdr) - sizeof(struct burst_hdr))
+ +
#define MAX_TX_LEN
Definition: ethernet.h:53
+
+

Definition at line 54 of file ethernet.h.

+ +
+
+ +

◆ MAX_RX_LEN

+ +
+
+ + + + +
#define MAX_RX_LEN   9600
+
+ +

Definition at line 52 of file ethernet.h.

+ +
+
+ +

◆ MAX_TX_LEN

+ +
+
+ + + + +
#define MAX_TX_LEN   (MAX_RX_LEN - 14) /* headroom for rx driver */
+
+ +

Definition at line 53 of file ethernet.h.

+ +
+
+ +

◆ MBUF_CACHE

+ +
+
+ + + + +
#define MBUF_CACHE   256
+
+ +

Definition at line 47 of file ethernet.h.

+ +
+
+ +

◆ MBUF_POOL_ELEMENT

+ +
+
+ + + + +
#define MBUF_POOL_ELEMENT   MAX_RX_LEN
+
+ +

Definition at line 50 of file ethernet.h.

+ +
+
+ +

◆ MBUF_POOL_ELM_BIG

+ +
+
+ + + + +
#define MBUF_POOL_ELM_BIG   USHRT_MAX
+
+ +

Definition at line 58 of file ethernet.h.

+ +
+
+ +

◆ MBUF_POOL_ELM_SMALL

+ +
+
+ + + + +
#define MBUF_POOL_ELM_SMALL   1500 /* regular ethernet MTU, most compatible */
+
+ +

Definition at line 49 of file ethernet.h.

+ +
+
+ +

◆ nlog

+ +
+
+ + + + + + + + + + + + + + + + + + +
#define nlog( m,
 ... 
)   __xran_delayed_msg("%s(): " m "\n", __FUNCTION__, ##__VA_ARGS__)
+
+ +

Definition at line 138 of file ethernet.h.

+ +
+
+ +

◆ NUM_MBUFS

+ +
+
+ + + + +
#define NUM_MBUFS   65536
+
+ +

Definition at line 46 of file ethernet.h.

+ +
+
+ +

◆ NUM_MBUFS_BIG

+ +
+
+ + + + +
#define NUM_MBUFS_BIG   64
+
+ +

Definition at line 59 of file ethernet.h.

+ +
+
+ +

◆ PANIC_ON

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
#define PANIC_ON( x,
 m,
 ... 
)
+
+Value:
do { if (unlikely(x)) \
rte_panic("%s: " m "\n", #x, ##__VA_ARGS__); } while (0)
+

Definition at line 148 of file ethernet.h.

+ +
+
+ +

◆ wlog

+ +
+
+ + + + + + + + + + + + + + + + + + +
#define wlog( m,
 ... 
)   nlog("WARNING: " m, ##__VA_ARGS__)
+
+ +

Definition at line 140 of file ethernet.h.

+ +
+
+

Enumeration Type Documentation

+ +

◆ pkt_type

+ +
+
+ + + + +
enum pkt_type
+
+ + + + + + + + + + + + + + +
Enumerator
PKT_ZERO 
PKT_EMPTY 
PKT_DISCOVER_REQUEST 
PKT_PING 
PKT_PONG 
PKT_DISCOVER_REPLY 
PKT_LTE_DATA 
PKT_LTE_CONTROL 
PKT_BURST 
PKT_DATATEST 
PKT_ADD_ETHDEV 
PKT_SYNC_START 
PKT_LAST 
+ +

Definition at line 71 of file ethernet.h.

+ +
+
+

Function Documentation

+ +

◆ __xran_delayed_msg()

+ +
+
+ + + + + + + + + + + + + + + + + + +
int __xran_delayed_msg (const char * fmt,
 ... 
)
+
+ +

Definition at line 97 of file ethernet.c.

+ +
+
+ +

◆ xran_add_eth_hdr_vlan()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void xran_add_eth_hdr_vlan (struct ether_addr * dst,
uint16_t ethertype,
struct rte_mbuf * mb,
uint16_t vlan_tci 
)
+
+ +

Definition at line 434 of file ethernet.c.

+ +
+
+ +

◆ xran_init_mbuf_pool()

+ +
+
+ + + + + + + + +
void xran_init_mbuf_pool (void )
+
+ +

Definition at line 185 of file ethernet.c.

+ +
+
+ +

◆ xran_init_port()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void xran_init_port (int port,
struct ether_addr * p_lls_cu_addr 
)
+
+ +

Definition at line 229 of file ethernet.c.

+ +
+
+

Variable Documentation

+ +

◆ _eth_mbuf_pool

+ +
+
+ + + + +
struct rte_mempool* _eth_mbuf_pool
+
+ +

Definition at line 70 of file ethernet.c.

+ +
+
+ +

◆ _eth_mbuf_pool_big

+ +
+
+ + + + +
struct rte_mempool* _eth_mbuf_pool_big
+
+ +

Definition at line 74 of file ethernet.c.

+ +
+
+ +

◆ _eth_mbuf_pool_small

+ +
+
+ + + + +
struct rte_mempool* _eth_mbuf_pool_small
+
+ +

Definition at line 73 of file ethernet.c.

+ +
+
+ +

◆ socket_direct_pool

+ +
+
+ + + + +
struct rte_mempool* socket_direct_pool
+
+ +

Definition at line 76 of file ethernet.c.

+ +
+
+ +

◆ socket_indirect_pool

+ +
+
+ + + + +
struct rte_mempool* socket_indirect_pool
+
+ +

Definition at line 77 of file ethernet.c.

+ +
+
+
+ + + +