#include "testpmd.h"
static const char *
-arp_op_name(uint16_t arp_op)
+arp_opcode_name(uint16_t arp_opcode)
{
- switch (arp_op ) {
+ switch (arp_opcode ) {
case ARP_OP_REQUEST:
return "ARP Request";
case ARP_OP_REPLY:
struct rte_mbuf *pkt;
struct ether_hdr *eth_h;
struct vlan_hdr *vlan_h;
- struct arp_hdr *arp_h;
+ struct rte_arp_hdr *arp_h;
struct ipv4_hdr *ip_h;
struct icmp_hdr *icmp_h;
struct ether_addr eth_addr;
uint16_t nb_replies;
uint16_t eth_type;
uint16_t vlan_id;
- uint16_t arp_op;
- uint16_t arp_pro;
+ uint16_t arp_opcode;
+ uint16_t arp_protocol;
uint32_t cksum;
uint8_t i;
int l2_len;
/* Reply to ARP requests */
if (eth_type == ETHER_TYPE_ARP) {
- arp_h = (struct arp_hdr *) ((char *)eth_h + l2_len);
- arp_op = RTE_BE_TO_CPU_16(arp_h->arp_op);
- arp_pro = RTE_BE_TO_CPU_16(arp_h->arp_pro);
+ arp_h = (struct rte_arp_hdr *) ((char *)eth_h + l2_len);
+ arp_opcode = RTE_BE_TO_CPU_16(arp_h->arp_opcode);
+ arp_protocol = RTE_BE_TO_CPU_16(arp_h->arp_protocol);
if (verbose_level > 0) {
printf(" ARP: hrd=%d proto=0x%04x hln=%d "
"pln=%d op=%u (%s)\n",
- RTE_BE_TO_CPU_16(arp_h->arp_hrd),
- arp_pro, arp_h->arp_hln,
- arp_h->arp_pln, arp_op,
- arp_op_name(arp_op));
+ RTE_BE_TO_CPU_16(arp_h->arp_hardware),
+ arp_protocol, arp_h->arp_hlen,
+ arp_h->arp_plen, arp_opcode,
+ arp_opcode_name(arp_opcode));
}
- if ((RTE_BE_TO_CPU_16(arp_h->arp_hrd) !=
+ if ((RTE_BE_TO_CPU_16(arp_h->arp_hardware) !=
ARP_HRD_ETHER) ||
- (arp_pro != ETHER_TYPE_IPv4) ||
- (arp_h->arp_hln != 6) ||
- (arp_h->arp_pln != 4)
+ (arp_protocol != ETHER_TYPE_IPv4) ||
+ (arp_h->arp_hlen != 6) ||
+ (arp_h->arp_plen != 4)
) {
rte_pktmbuf_free(pkt);
if (verbose_level > 0)
ipv4_addr_dump(" tip=", ip_addr);
printf("\n");
}
- if (arp_op != ARP_OP_REQUEST) {
+ if (arp_opcode != ARP_OP_REQUEST) {
rte_pktmbuf_free(pkt);
continue;
}
ether_addr_copy(&ports[fs->tx_port].eth_addr,
ð_h->s_addr);
- arp_h->arp_op = rte_cpu_to_be_16(ARP_OP_REPLY);
+ arp_h->arp_opcode = rte_cpu_to_be_16(ARP_OP_REPLY);
ether_addr_copy(&arp_h->arp_data.arp_tha, ð_addr);
ether_addr_copy(&arp_h->arp_data.arp_sha, &arp_h->arp_data.arp_tha);
ether_addr_copy(ð_h->s_addr, &arp_h->arp_data.arp_sha);
AVF_CHECK_CMD_LENGTH(avf_aqc_cppm_configuration);
/* Set ARP Proxy command / response (indirect 0x0104) */
-struct avf_aqc_arp_proxy_data {
+struct avf_aqc_arp_protocolxy_data {
__le16 command_flags;
#define AVF_AQ_ARP_INIT_IPV4 0x0800
#define AVF_AQ_ARP_UNSUP_CTL 0x1000
u8 reserved[2];
};
-AVF_CHECK_STRUCT_LEN(0x14, avf_aqc_arp_proxy_data);
+AVF_CHECK_STRUCT_LEN(0x14, avf_aqc_arp_protocolxy_data);
/* Set NS Proxy Table Entry Command (indirect 0x0105) */
struct avf_aqc_ns_proxy_data {
}
/**
- * avf_aq_set_arp_proxy_config
+ * avf_aq_set_arp_protocolxy_config
* @hw: pointer to the HW structure
* @proxy_config: pointer to proxy config command table struct
* @cmd_details: pointer to command details
*
* Set ARP offload parameters from pre-populated
- * avf_aqc_arp_proxy_data struct
+ * avf_aqc_arp_protocolxy_data struct
**/
-enum avf_status_code avf_aq_set_arp_proxy_config(struct avf_hw *hw,
- struct avf_aqc_arp_proxy_data *proxy_config,
+enum avf_status_code avf_aq_set_arp_protocolxy_config(struct avf_hw *hw,
+ struct avf_aqc_arp_protocolxy_data *proxy_config,
struct avf_asq_cmd_details *cmd_details)
{
struct avf_aq_desc desc;
CPU_TO_LE32(AVF_HI_DWORD((u64)proxy_config));
desc.params.external.addr_low =
CPU_TO_LE32(AVF_LO_DWORD((u64)proxy_config));
- desc.datalen = CPU_TO_LE16(sizeof(struct avf_aqc_arp_proxy_data));
+ desc.datalen = CPU_TO_LE16(sizeof(struct avf_aqc_arp_protocolxy_data));
status = avf_asq_send_command(hw, &desc, proxy_config,
- sizeof(struct avf_aqc_arp_proxy_data),
+ sizeof(struct avf_aqc_arp_protocolxy_data),
cmd_details);
return status;
u32 reg_addr, u32 *reg_val,
struct avf_asq_cmd_details *cmd_details);
-enum avf_status_code avf_aq_set_arp_proxy_config(struct avf_hw *hw,
- struct avf_aqc_arp_proxy_data *proxy_config,
+enum avf_status_code avf_aq_set_arp_protocolxy_config(struct avf_hw *hw,
+ struct avf_aqc_arp_protocolxy_data *proxy_config,
struct avf_asq_cmd_details *cmd_details);
enum avf_status_code avf_aq_set_ns_proxy_table_entry(struct avf_hw *hw,
struct avf_aqc_ns_proxy_data *ns_proxy_table_entry,
void bond_mode_alb_arp_recv(struct ether_hdr *eth_h, uint16_t offset,
struct bond_dev_private *internals) {
- struct arp_hdr *arp;
+ struct rte_arp_hdr *arp;
struct client_data *hash_table = internals->mode6.client_table;
struct client_data *client_info;
uint8_t hash_index;
- arp = (struct arp_hdr *) ((char *) (eth_h + 1) + offset);
+ arp = (struct rte_arp_hdr *) ((char *) (eth_h + 1) + offset);
/* ARP Requests are forwarded to the application with no changes */
- if (arp->arp_op != rte_cpu_to_be_16(ARP_OP_REPLY))
+ if (arp->arp_opcode != rte_cpu_to_be_16(ARP_OP_REPLY))
return;
/* From now on, we analyze only ARP Reply packets */
bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
struct bond_dev_private *internals)
{
- struct arp_hdr *arp;
+ struct rte_arp_hdr *arp;
struct client_data *hash_table = internals->mode6.client_table;
struct client_data *client_info;
struct ether_addr bonding_mac;
- arp = (struct arp_hdr *)((char *)(eth_h + 1) + offset);
+ arp = (struct rte_arp_hdr *)((char *)(eth_h + 1) + offset);
/*
* Traffic with src MAC other than bonding should be sent on
client_info = &hash_table[hash_index];
rte_spinlock_lock(&internals->mode6.lock);
- if (arp->arp_op == rte_cpu_to_be_16(ARP_OP_REPLY)) {
+ if (arp->arp_opcode == rte_cpu_to_be_16(ARP_OP_REPLY)) {
if (client_info->in_use) {
if (client_info->app_ip == arp->arp_data.arp_sip &&
client_info->cli_ip == arp->arp_data.arp_tip) {
struct rte_mbuf *pkt, struct bond_dev_private *internals)
{
struct ether_hdr *eth_h;
- struct arp_hdr *arp_h;
+ struct rte_arp_hdr *arp_h;
uint16_t slave_idx;
rte_spinlock_lock(&internals->mode6.lock);
else
eth_h->ether_type = rte_cpu_to_be_16(ETHER_TYPE_ARP);
- arp_h = (struct arp_hdr *)((char *)eth_h + sizeof(struct ether_hdr)
+ arp_h = (struct rte_arp_hdr *)((char *)eth_h + sizeof(struct ether_hdr)
+ client_info->vlan_count * sizeof(struct vlan_hdr));
memcpy(eth_h + 1, client_info->vlan,
ether_addr_copy(&client_info->cli_mac, &arp_h->arp_data.arp_tha);
arp_h->arp_data.arp_tip = client_info->cli_ip;
- arp_h->arp_hrd = rte_cpu_to_be_16(ARP_HRD_ETHER);
- arp_h->arp_pro = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
- arp_h->arp_hln = ETHER_ADDR_LEN;
- arp_h->arp_pln = sizeof(uint32_t);
- arp_h->arp_op = rte_cpu_to_be_16(ARP_OP_REPLY);
+ arp_h->arp_hardware = rte_cpu_to_be_16(ARP_HRD_ETHER);
+ arp_h->arp_protocol = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
+ arp_h->arp_hlen = ETHER_ADDR_LEN;
+ arp_h->arp_plen = sizeof(uint32_t);
+ arp_h->arp_opcode = rte_cpu_to_be_16(ARP_OP_REPLY);
slave_idx = client_info->slave_idx;
rte_spinlock_unlock(&internals->mode6.lock);
#ifdef RTE_LIBRTE_BOND_DEBUG_ALB
static void
-arp_op_name(uint16_t arp_op, char *buf)
+arp_opcode_name(uint16_t arp_opcode, char *buf)
{
- switch (arp_op) {
+ switch (arp_opcode) {
case ARP_OP_REQUEST:
snprintf(buf, sizeof("ARP Request"), "%s", "ARP Request");
return;
}
#ifdef RTE_LIBRTE_BOND_DEBUG_ALB
-#define MODE6_DEBUG(info, src_ip, dst_ip, eth_h, arp_op, port, burstnumber) \
+#define MODE6_DEBUG(info, src_ip, dst_ip, eth_h, arp_opcode, port, burstnumber) \
rte_log(RTE_LOG_DEBUG, bond_logtype, \
"%s port:%d SrcMAC:%02X:%02X:%02X:%02X:%02X:%02X SrcIP:%s " \
"DstMAC:%02X:%02X:%02X:%02X:%02X:%02X DstIP:%s %s %d\n", \
eth_h->d_addr.addr_bytes[2], eth_h->d_addr.addr_bytes[3], \
eth_h->d_addr.addr_bytes[4], eth_h->d_addr.addr_bytes[5], \
dst_ip, \
- arp_op, ++burstnumber)
+ arp_opcode, ++burstnumber)
#endif
static void
{
struct ipv4_hdr *ipv4_h;
#ifdef RTE_LIBRTE_BOND_DEBUG_ALB
- struct arp_hdr *arp_h;
+ struct rte_arp_hdr *arp_h;
char dst_ip[16];
char ArpOp[24];
char buf[16];
}
#ifdef RTE_LIBRTE_BOND_DEBUG_ALB
else if (ether_type == rte_cpu_to_be_16(ETHER_TYPE_ARP)) {
- arp_h = (struct arp_hdr *)((char *)(eth_h + 1) + offset);
+ arp_h = (struct rte_arp_hdr *)((char *)(eth_h + 1) + offset);
ipv4_addr_to_dot(arp_h->arp_data.arp_sip, src_ip, MaxIPv4String);
ipv4_addr_to_dot(arp_h->arp_data.arp_tip, dst_ip, MaxIPv4String);
- arp_op_name(rte_be_to_cpu_16(arp_h->arp_op), ArpOp);
+ arp_opcode_name(rte_be_to_cpu_16(arp_h->arp_opcode), ArpOp);
MODE6_DEBUG(buf, src_ip, dst_ip, eth_h, ArpOp, port, *burstnumber);
}
#endif
"Failed to allocate ARP packet from pool");
continue;
}
- pkt_size = sizeof(struct ether_hdr) + sizeof(struct arp_hdr)
+ pkt_size = sizeof(struct ether_hdr) + sizeof(struct rte_arp_hdr)
+ client_info->vlan_count * sizeof(struct vlan_hdr);
upd_pkt->data_len = pkt_size;
upd_pkt->pkt_len = pkt_size;
I40E_CHECK_CMD_LENGTH(i40e_aqc_cppm_configuration);
/* Set ARP Proxy command / response (indirect 0x0104) */
-struct i40e_aqc_arp_proxy_data {
+struct i40e_aqc_arp_protocolxy_data {
__le16 command_flags;
#define I40E_AQ_ARP_INIT_IPV4 0x0800
#define I40E_AQ_ARP_UNSUP_CTL 0x1000
u8 reserved[2];
};
-I40E_CHECK_STRUCT_LEN(0x14, i40e_aqc_arp_proxy_data);
+I40E_CHECK_STRUCT_LEN(0x14, i40e_aqc_arp_protocolxy_data);
/* Set NS Proxy Table Entry Command (indirect 0x0105) */
struct i40e_aqc_ns_proxy_data {
#endif /* VF_DRIVER */
/**
- * i40e_aq_set_arp_proxy_config
+ * i40e_aq_set_arp_protocolxy_config
* @hw: pointer to the HW structure
* @proxy_config: pointer to proxy config command table struct
* @cmd_details: pointer to command details
*
* Set ARP offload parameters from pre-populated
- * i40e_aqc_arp_proxy_data struct
+ * i40e_aqc_arp_protocolxy_data struct
**/
-enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw,
- struct i40e_aqc_arp_proxy_data *proxy_config,
+enum i40e_status_code i40e_aq_set_arp_protocolxy_config(struct i40e_hw *hw,
+ struct i40e_aqc_arp_protocolxy_data *proxy_config,
struct i40e_asq_cmd_details *cmd_details)
{
struct i40e_aq_desc desc;
CPU_TO_LE32(I40E_HI_DWORD((u64)proxy_config));
desc.params.external.addr_low =
CPU_TO_LE32(I40E_LO_DWORD((u64)proxy_config));
- desc.datalen = CPU_TO_LE16(sizeof(struct i40e_aqc_arp_proxy_data));
+ desc.datalen = CPU_TO_LE16(sizeof(struct i40e_aqc_arp_protocolxy_data));
status = i40e_asq_send_command(hw, &desc, proxy_config,
- sizeof(struct i40e_aqc_arp_proxy_data),
+ sizeof(struct i40e_aqc_arp_protocolxy_data),
cmd_details);
return status;
u32 reg_addr, u32 *reg_val,
struct i40e_asq_cmd_details *cmd_details);
-enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw,
- struct i40e_aqc_arp_proxy_data *proxy_config,
+enum i40e_status_code i40e_aq_set_arp_protocolxy_config(struct i40e_hw *hw,
+ struct i40e_aqc_arp_protocolxy_data *proxy_config,
struct i40e_asq_cmd_details *cmd_details);
enum i40e_status_code i40e_aq_set_ns_proxy_table_entry(struct i40e_hw *hw,
struct i40e_aqc_ns_proxy_data *ns_proxy_table_entry,
*/
if (fdir_input->flow.l2_flow.ether_type ==
rte_cpu_to_be_16(ETHER_TYPE_ARP))
- payload += sizeof(struct arp_hdr);
+ payload += sizeof(struct rte_arp_hdr);
set_idx = I40E_FLXPLD_L2_IDX;
break;
default:
*/
if (fdir_input->flow.l2_flow.ether_type ==
rte_cpu_to_be_16(ETHER_TYPE_ARP))
- payload += sizeof(struct arp_hdr);
+ payload += sizeof(struct rte_arp_hdr);
set_idx = I40E_FLXPLD_L2_IDX;
} else if (fdir_input->flow_ext.customized_pctype) {
/* If customized pctype is used */
struct ether_addr d_addr;
struct ether_hdr *eth_hdr;
- struct arp_hdr *arp_hdr;
+ struct rte_arp_hdr *arp_hdr;
struct ipv4_hdr *ipv4_hdr;
uint16_t ether_type, offset;
global_flag_stru_p->port_packets[1]++;
rte_spinlock_unlock(&global_flag_stru_p->lock);
}
- arp_hdr = (struct arp_hdr *)((char *)(eth_hdr + 1) + offset);
+ arp_hdr = (struct rte_arp_hdr *)((char *)(eth_hdr + 1) + offset);
if (arp_hdr->arp_data.arp_tip == bond_ip) {
- if (arp_hdr->arp_op == rte_cpu_to_be_16(ARP_OP_REQUEST)) {
- arp_hdr->arp_op = rte_cpu_to_be_16(ARP_OP_REPLY);
+ if (arp_hdr->arp_opcode == rte_cpu_to_be_16(ARP_OP_REQUEST)) {
+ arp_hdr->arp_opcode = rte_cpu_to_be_16(ARP_OP_REPLY);
/* Switch src and dst data and set bonding MAC */
ether_addr_copy(ð_hdr->s_addr, ð_hdr->d_addr);
rte_eth_macaddr_get(BOND_PORT, ð_hdr->s_addr);
struct rte_mbuf *created_pkt;
struct ether_hdr *eth_hdr;
- struct arp_hdr *arp_hdr;
+ struct rte_arp_hdr *arp_hdr;
uint32_t bond_ip;
size_t pkt_size;
return;
}
- pkt_size = sizeof(struct ether_hdr) + sizeof(struct arp_hdr);
+ pkt_size = sizeof(struct ether_hdr) + sizeof(struct rte_arp_hdr);
created_pkt->data_len = pkt_size;
created_pkt->pkt_len = pkt_size;
memset(ð_hdr->d_addr, 0xFF, ETHER_ADDR_LEN);
eth_hdr->ether_type = rte_cpu_to_be_16(ETHER_TYPE_ARP);
- arp_hdr = (struct arp_hdr *)((char *)eth_hdr + sizeof(struct ether_hdr));
- arp_hdr->arp_hrd = rte_cpu_to_be_16(ARP_HRD_ETHER);
- arp_hdr->arp_pro = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
- arp_hdr->arp_hln = ETHER_ADDR_LEN;
- arp_hdr->arp_pln = sizeof(uint32_t);
- arp_hdr->arp_op = rte_cpu_to_be_16(ARP_OP_REQUEST);
+ arp_hdr = (struct rte_arp_hdr *)((char *)eth_hdr + sizeof(struct ether_hdr));
+ arp_hdr->arp_hardware = rte_cpu_to_be_16(ARP_HRD_ETHER);
+ arp_hdr->arp_protocol = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
+ arp_hdr->arp_hlen = ETHER_ADDR_LEN;
+ arp_hdr->arp_plen = sizeof(uint32_t);
+ arp_hdr->arp_opcode = rte_cpu_to_be_16(ARP_OP_REQUEST);
rte_eth_macaddr_get(BOND_PORT, &arp_hdr->arp_data.arp_sha);
arp_hdr->arp_data.arp_sip = bond_ip;
const struct ether_addr *mac)
{
struct ether_hdr *eth_hdr;
- struct arp_hdr *rarp;
+ struct rte_arp_hdr *rarp;
struct rte_mbuf *mbuf;
if (mpool == NULL)
eth_hdr->ether_type = htons(ETHER_TYPE_RARP);
/* RARP header. */
- rarp = (struct arp_hdr *)(eth_hdr + 1);
- rarp->arp_hrd = htons(ARP_HRD_ETHER);
- rarp->arp_pro = htons(ETHER_TYPE_IPv4);
- rarp->arp_hln = ETHER_ADDR_LEN;
- rarp->arp_pln = 4;
- rarp->arp_op = htons(ARP_OP_REVREQUEST);
+ rarp = (struct rte_arp_hdr *)(eth_hdr + 1);
+ rarp->arp_hardware = htons(ARP_HRD_ETHER);
+ rarp->arp_protocol = htons(ETHER_TYPE_IPv4);
+ rarp->arp_hlen = ETHER_ADDR_LEN;
+ rarp->arp_plen = 4;
+ rarp->arp_opcode = htons(ARP_OP_REVREQUEST);
ether_addr_copy(mac, &rarp->arp_data.arp_sha);
ether_addr_copy(mac, &rarp->arp_data.arp_tha);
/**
* ARP header IPv4 payload.
*/
-struct arp_ipv4 {
+struct rte_arp_ipv4 {
struct ether_addr arp_sha; /**< sender hardware address */
uint32_t arp_sip; /**< sender IP address */
struct ether_addr arp_tha; /**< target hardware address */
/**
* ARP header.
*/
-struct arp_hdr {
- uint16_t arp_hrd; /* format of hardware address */
+struct rte_arp_hdr {
+ uint16_t arp_hardware; /* format of hardware address */
#define ARP_HRD_ETHER 1 /* ARP Ethernet address format */
- uint16_t arp_pro; /* format of protocol address */
- uint8_t arp_hln; /* length of hardware address */
- uint8_t arp_pln; /* length of protocol address */
- uint16_t arp_op; /* ARP opcode (command) */
+ uint16_t arp_protocol; /* format of protocol address */
+ uint8_t arp_hlen; /* length of hardware address */
+ uint8_t arp_plen; /* length of protocol address */
+ uint16_t arp_opcode; /* ARP opcode (command) */
#define ARP_OP_REQUEST 1 /* request to resolve address */
#define ARP_OP_REPLY 2 /* response to previous request */
#define ARP_OP_REVREQUEST 3 /* request proto addr given hardware */
#define ARP_OP_INVREQUEST 8 /* request to identify peer */
#define ARP_OP_INVREPLY 9 /* response identifying peer */
- struct arp_ipv4 arp_data;
+ struct rte_arp_ipv4 arp_data;
} __attribute__((__packed__));
/**
}
void
-initialize_arp_header(struct arp_hdr *arp_hdr, struct ether_addr *src_mac,
+initialize_arp_header(struct rte_arp_hdr *arp_hdr, struct ether_addr *src_mac,
struct ether_addr *dst_mac, uint32_t src_ip, uint32_t dst_ip,
uint32_t opcode)
{
- arp_hdr->arp_hrd = rte_cpu_to_be_16(ARP_HRD_ETHER);
- arp_hdr->arp_pro = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
- arp_hdr->arp_hln = ETHER_ADDR_LEN;
- arp_hdr->arp_pln = sizeof(uint32_t);
- arp_hdr->arp_op = rte_cpu_to_be_16(opcode);
+ arp_hdr->arp_hardware = rte_cpu_to_be_16(ARP_HRD_ETHER);
+ arp_hdr->arp_protocol = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
+ arp_hdr->arp_hlen = ETHER_ADDR_LEN;
+ arp_hdr->arp_plen = sizeof(uint32_t);
+ arp_hdr->arp_opcode = rte_cpu_to_be_16(opcode);
ether_addr_copy(src_mac, &arp_hdr->arp_data.arp_sha);
arp_hdr->arp_data.arp_sip = src_ip;
ether_addr_copy(dst_mac, &arp_hdr->arp_data.arp_tha);
uint8_t vlan_enabled, uint16_t van_id);
void
-initialize_arp_header(struct arp_hdr *arp_hdr, struct ether_addr *src_mac,
+initialize_arp_header(struct rte_arp_hdr *arp_hdr, struct ether_addr *src_mac,
struct ether_addr *dst_mac, uint32_t src_ip, uint32_t dst_ip,
uint32_t opcode);
struct rte_mbuf *pkts_sent[MAX_PKT_BURST];
struct ether_hdr *eth_pkt;
- struct arp_hdr *arp_pkt;
+ struct rte_arp_hdr *arp_pkt;
int slave_idx, nb_pkts, pkt_idx;
int retval = 0;
eth_pkt = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
0);
- arp_pkt = (struct arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
+ arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
initialize_arp_header(arp_pkt, &bond_mac, &client_mac, ip_host, ip_client1,
ARP_OP_REPLY);
rte_eth_tx_burst(test_params->bonded_port_id, 0, &pkt, 1);
eth_pkt = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
0);
- arp_pkt = (struct arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
+ arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
initialize_arp_header(arp_pkt, &bond_mac, &client_mac, ip_host, ip_client2,
ARP_OP_REPLY);
rte_eth_tx_burst(test_params->bonded_port_id, 0, &pkt, 1);
eth_pkt = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
0);
- arp_pkt = (struct arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
+ arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
initialize_arp_header(arp_pkt, &bond_mac, &client_mac, ip_host, ip_client3,
ARP_OP_REPLY);
rte_eth_tx_burst(test_params->bonded_port_id, 0, &pkt, 1);
eth_pkt = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
0);
- arp_pkt = (struct arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
+ arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
initialize_arp_header(arp_pkt, &bond_mac, &client_mac, ip_host, ip_client4,
ARP_OP_REPLY);
rte_eth_tx_burst(test_params->bonded_port_id, 0, &pkt, 1);
for (pkt_idx = 0; pkt_idx < nb_pkts; pkt_idx++) {
eth_pkt = rte_pktmbuf_mtod(pkts_sent[pkt_idx], struct ether_hdr *);
- arp_pkt = (struct arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
+ arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
if (slave_idx%2 == 0) {
if (!is_same_ether_addr(slave_mac1, &arp_pkt->arp_data.arp_sha)) {
test_alb_reply_from_client(void)
{
struct ether_hdr *eth_pkt;
- struct arp_hdr *arp_pkt;
+ struct rte_arp_hdr *arp_pkt;
struct rte_mbuf *pkt;
struct rte_mbuf *pkts_sent[MAX_PKT_BURST];
eth_pkt = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
0);
- arp_pkt = (struct arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
+ arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
initialize_arp_header(arp_pkt, &client_mac, &bond_mac, ip_client1, ip_host,
ARP_OP_REPLY);
virtual_ethdev_add_mbufs_to_rx_queue(test_params->slave_port_ids[0], &pkt,
eth_pkt = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
0);
- arp_pkt = (struct arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
+ arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
initialize_arp_header(arp_pkt, &client_mac, &bond_mac, ip_client2, ip_host,
ARP_OP_REPLY);
virtual_ethdev_add_mbufs_to_rx_queue(test_params->slave_port_ids[0], &pkt,
eth_pkt = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
0);
- arp_pkt = (struct arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
+ arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
initialize_arp_header(arp_pkt, &client_mac, &bond_mac, ip_client3, ip_host,
ARP_OP_REPLY);
virtual_ethdev_add_mbufs_to_rx_queue(test_params->slave_port_ids[0], &pkt,
eth_pkt = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
0);
- arp_pkt = (struct arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
+ arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
initialize_arp_header(arp_pkt, &client_mac, &bond_mac, ip_client4, ip_host,
ARP_OP_REPLY);
virtual_ethdev_add_mbufs_to_rx_queue(test_params->slave_port_ids[0], &pkt,
for (pkt_idx = 0; pkt_idx < nb_pkts; pkt_idx++) {
eth_pkt = rte_pktmbuf_mtod(pkts_sent[pkt_idx], struct ether_hdr *);
- arp_pkt = (struct arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
+ arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
if (slave_idx%2 == 0) {
if (!is_same_ether_addr(slave_mac1, &arp_pkt->arp_data.arp_sha)) {
{
struct ether_hdr *eth_pkt;
struct vlan_hdr *vlan_pkt;
- struct arp_hdr *arp_pkt;
+ struct rte_arp_hdr *arp_pkt;
struct rte_mbuf *pkt;
struct rte_mbuf *pkts_sent[MAX_PKT_BURST];
vlan_pkt = vlan_pkt+1;
vlan_pkt->vlan_tci = rte_cpu_to_be_16(2);
vlan_pkt->eth_proto = rte_cpu_to_be_16(ETHER_TYPE_ARP);
- arp_pkt = (struct arp_hdr *)((char *)(vlan_pkt + 1));
+ arp_pkt = (struct rte_arp_hdr *)((char *)(vlan_pkt + 1));
initialize_arp_header(arp_pkt, &client_mac, &bond_mac, ip_client1, ip_host,
ARP_OP_REPLY);
virtual_ethdev_add_mbufs_to_rx_queue(test_params->slave_port_ids[0], &pkt,