#define INVALID_PORT_ID (0xFF)
#define INVALID_BONDING_MODE (-1)
-static const struct ether_addr slave_mac_default = {
+static const struct rte_ether_addr slave_mac_default = {
{ 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00 }
};
-static const struct ether_addr parnter_mac_default = {
+static const struct rte_ether_addr parnter_mac_default = {
{ 0x22, 0xBB, 0xFF, 0xBB, 0x00, 0x00 }
};
-static const struct ether_addr parnter_system = {
+static const struct rte_ether_addr parnter_system = {
{ 0x33, 0xFF, 0xBB, 0xFF, 0x00, 0x00 }
};
-static const struct ether_addr slow_protocol_mac_addr = {
+static const struct rte_ether_addr slow_protocol_mac_addr = {
{ 0x01, 0x80, 0xC2, 0x00, 0x00, 0x02 }
};
};
struct ether_vlan_hdr {
- struct ether_hdr pkt_eth_hdr;
- struct vlan_hdr vlan_hdr;
+ struct rte_ether_hdr pkt_eth_hdr;
+ struct rte_vlan_hdr vlan_hdr;
};
struct link_bonding_unittest_params {
static int
add_slave(struct slave_conf *slave, uint8_t start)
{
- struct ether_addr addr, addr_check;
+ struct rte_ether_addr addr, addr_check;
/* Some sanity check */
RTE_VERIFY(test_params.slave_ports <= slave &&
static void
lacp_recv_cb(uint16_t slave_id, struct rte_mbuf *lacp_pkt)
{
- struct ether_hdr *hdr;
+ struct rte_ether_hdr *hdr;
struct slow_protocol_frame *slow_hdr;
RTE_VERIFY(lacp_pkt != NULL);
- hdr = rte_pktmbuf_mtod(lacp_pkt, struct ether_hdr *);
+ hdr = rte_pktmbuf_mtod(lacp_pkt, struct rte_ether_hdr *);
RTE_VERIFY(hdr->ether_type == rte_cpu_to_be_16(ETHER_TYPE_SLOW));
slow_hdr = rte_pktmbuf_mtod(lacp_pkt, struct slow_protocol_frame *);
static int
make_lacp_reply(struct slave_conf *slave, struct rte_mbuf *pkt)
{
- struct ether_hdr *hdr;
+ struct rte_ether_hdr *hdr;
struct slow_protocol_frame *slow_hdr;
struct lacpdu *lacp;
/* look for LACP */
- hdr = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
+ hdr = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
if (hdr->ether_type != rte_cpu_to_be_16(ETHER_TYPE_SLOW))
return 1;
}
static int
-generate_packets(struct ether_addr *src_mac,
- struct ether_addr *dst_mac, uint16_t count, struct rte_mbuf **buf)
+generate_packets(struct rte_ether_addr *src_mac,
+ struct rte_ether_addr *dst_mac, uint16_t count, struct rte_mbuf **buf)
{
uint16_t pktlen = PACKET_BURST_GEN_PKT_LEN;
uint8_t vlan_enable = 0;
uint32_t ip_src[4] = { [0 ... 2] = 0xDEADBEEF, [3] = IPv4(192, 168, 0, 1) };
uint32_t ip_dst[4] = { [0 ... 2] = 0xFEEDFACE, [3] = IPv4(192, 168, 0, 2) };
- struct ether_hdr pkt_eth_hdr;
+ struct rte_ether_hdr pkt_eth_hdr;
struct udp_hdr pkt_udp_hdr;
union {
struct ipv4_hdr v4;
}
static int
-generate_and_put_packets(struct slave_conf *slave, struct ether_addr *src_mac,
- struct ether_addr *dst_mac, uint16_t count)
+generate_and_put_packets(struct slave_conf *slave,
+ struct rte_ether_addr *src_mac,
+ struct rte_ether_addr *dst_mac, uint16_t count)
{
struct rte_mbuf *pkts[MAX_PKT_BURST];
int retval;
int retval;
unsigned delay;
- struct ether_hdr *hdr;
+ struct rte_ether_hdr *hdr;
- struct ether_addr src_mac = { { 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00 } };
- struct ether_addr dst_mac;
- struct ether_addr bonded_mac;
+ struct rte_ether_addr src_mac = {
+ { 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00 } };
+ struct rte_ether_addr dst_mac;
+ struct rte_ether_addr bonded_mac;
retval = initialize_bonded_device_with_slaves(TEST_PROMISC_SLAVE_COUNT,
0);
int cnt[2] = { 0, 0 };
for (i = 0; i < expected_pkts_cnt; i++) {
- hdr = rte_pktmbuf_mtod(pkts[i], struct ether_hdr *);
+ hdr = rte_pktmbuf_mtod(pkts[i], struct rte_ether_hdr *);
cnt[is_same_ether_addr(&hdr->d_addr, &bonded_mac)]++;
}
int eq_cnt = 0;
for (i = 0; i < expected_pkts_cnt; i++) {
- hdr = rte_pktmbuf_mtod(pkts[i], struct ether_hdr *);
+ hdr = rte_pktmbuf_mtod(pkts[i], struct rte_ether_hdr *);
eq_cnt += is_same_ether_addr(&hdr->d_addr, &bonded_mac);
}
int retval;
unsigned delay;
- struct ether_addr dst_mac = { { 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00 } };
- struct ether_addr bonded_mac;
+ struct rte_ether_addr dst_mac = {
+ { 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00 } };
+ struct rte_ether_addr bonded_mac;
retval = initialize_bonded_device_with_slaves(TEST_TX_SLAVE_COUNT, 0);
TEST_ASSERT_SUCCESS(retval, "Failed to initialize bonded device");
uint8_t i;
struct rte_mbuf *lacp_tx_buf[SLAVE_COUNT];
- struct ether_addr src_mac, dst_mac;
+ struct rte_ether_addr src_mac, dst_mac;
struct lacpdu_header lacpdu = {
.lacpdu = {
.subtype = SLOW_SUBTYPE_LACP,
struct rte_mbuf *lacp_tx_buf[SLAVE_COUNT];
struct rte_mbuf *buf[SLAVE_COUNT];
- struct ether_addr src_mac, dst_mac;
+ struct rte_ether_addr src_mac, dst_mac;
struct lacpdu_header lacpdu = {
.lacpdu = {
.subtype = SLOW_SUBTYPE_LACP,