DPDK 22.11.7
rte_eth_bond_alb.h
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2015 Intel Corporation
3 */
4
5#ifndef RTE_ETH_BOND_ALB_H_
6#define RTE_ETH_BOND_ALB_H_
7
8#include <rte_ether.h>
9#include <rte_arp.h>
10
11#define ALB_HASH_TABLE_SIZE 256
12#define ALB_NULL_INDEX 0xFFFFFFFF
13
14struct client_data {
16 struct rte_ether_addr app_mac;
18 uint32_t app_ip;
20 struct rte_ether_addr cli_mac;
22 uint32_t cli_ip;
25 uint16_t slave_idx;
27 uint8_t in_use;
29 uint8_t ntt;
32 struct rte_vlan_hdr vlan[2];
34 uint8_t vlan_count;
36};
37
38struct mode_alb_private {
39 struct client_data client_table[ALB_HASH_TABLE_SIZE];
41 struct rte_mempool *mempool;
43 uint8_t ntt;
45 uint32_t last_slave;
47 rte_spinlock_t lock;
48};
49
58int
59bond_mode_alb_enable(struct rte_eth_dev *bond_dev);
60
70void
71bond_mode_alb_arp_recv(struct rte_ether_hdr *eth_h, uint16_t offset,
72 struct bond_dev_private *internals);
73
87uint16_t
88bond_mode_alb_arp_xmit(struct rte_ether_hdr *eth_h, uint16_t offset,
89 struct bond_dev_private *internals);
90
101uint16_t
102bond_mode_alb_arp_upd(struct client_data *client_info,
103 struct rte_mbuf *pkt, struct bond_dev_private *internals);
104
110void
111bond_mode_alb_client_list_upd(struct rte_eth_dev *bond_dev);
112
113#endif /* RTE_ETH_BOND_ALB_H_ */