int bonding_modes[] = { BONDING_MODE_ROUND_ROBIN,
BONDING_MODE_ACTIVE_BACKUP,
BONDING_MODE_BALANCE,
- BONDING_MODE_BROADCAST };
+#ifdef RTE_MBUF_REFCNT
+ BONDING_MODE_BROADCAST
+#endif
+ };
/* Test supported link bonding modes */
for (i = 0; i < (int)RTE_DIM(bonding_modes); i++) {
}
/* Generate burst of packets to transmit */
- generated_burst_size = generate_packet_burst(test_params->mbuf_pool,
- pkts_burst, test_params->pkt_eth_hdr, vlan, ip_hdr, ipv4,
- test_params->pkt_udp_hdr, burst_size);
+ generated_burst_size =
+ generate_packet_burst(test_params->mbuf_pool,
+ pkts_burst, test_params->pkt_eth_hdr,
+ vlan, ip_hdr, ipv4,
+ test_params->pkt_udp_hdr, burst_size,
+ PACKET_BURST_GEN_PKT_LEN_128, 1);
if (generated_burst_size != burst_size) {
printf("Failed to generate packet burst");
return -1;
}
/* Generate a burst of packets to transmit */
- generated_burst_size = generate_packet_burst(test_params->mbuf_pool,
- pkts_burst, test_params->pkt_eth_hdr, 0, test_params->pkt_ipv4_hdr,
- 1, test_params->pkt_udp_hdr, burst_size);
+ generated_burst_size =
+ generate_packet_burst(test_params->mbuf_pool,
+ pkts_burst, test_params->pkt_eth_hdr, 0,
+ test_params->pkt_ipv4_hdr, 1,
+ test_params->pkt_udp_hdr, burst_size,
+ PACKET_BURST_GEN_PKT_LEN, 1);
if (generated_burst_size != burst_size)
return -1;
/* Generate a burst 1 of packets to transmit */
if (generate_packet_burst(test_params->mbuf_pool, &pkts_burst[0][0],
- test_params->pkt_eth_hdr, 0, test_params->pkt_ipv4_hdr, 1,
- test_params->pkt_udp_hdr, burst_size[0]) != burst_size[0])
+ test_params->pkt_eth_hdr, 0,
+ test_params->pkt_ipv4_hdr, 1,
+ test_params->pkt_udp_hdr, burst_size[0],
+ PACKET_BURST_GEN_PKT_LEN, 1) != burst_size[0])
return -1;
initialize_eth_header(test_params->pkt_eth_hdr,
/* Generate a burst 2 of packets to transmit */
if (generate_packet_burst(test_params->mbuf_pool, &pkts_burst[1][0],
- test_params->pkt_eth_hdr, 0, test_params->pkt_ipv4_hdr, 1,
- test_params->pkt_udp_hdr, burst_size[1]) != burst_size[1])
+ test_params->pkt_eth_hdr, 0,
+ test_params->pkt_ipv4_hdr, 1,
+ test_params->pkt_udp_hdr, burst_size[1],
+ PACKET_BURST_GEN_PKT_LEN, 1) != burst_size[1])
return -1;
/* Send burst 1 on bonded port */
return remove_slaves_and_stop_bonded_device();
}
+#ifdef RTE_MBUF_REFCNT
/** Broadcast Mode Tests */
static int
}
/* Generate a burst of packets to transmit */
- generated_burst_size = generate_packet_burst(test_params->mbuf_pool,
- pkts_burst, test_params->pkt_eth_hdr, 0, test_params->pkt_ipv4_hdr,
- 1, test_params->pkt_udp_hdr, burst_size);
+ generated_burst_size =
+ generate_packet_burst(test_params->mbuf_pool,
+ pkts_burst, test_params->pkt_eth_hdr, 0,
+ test_params->pkt_ipv4_hdr, 1,
+ test_params->pkt_udp_hdr, burst_size,
+ PACKET_BURST_GEN_PKT_LEN, 1);
if (generated_burst_size != burst_size)
return -1;
/* Clean up and remove slaves from bonded device */
return remove_slaves_and_stop_bonded_device();
}
+#endif
static int
test_reconfigure_bonded_device(void)
TEST_CASE(test_balance_verify_promiscuous_enable_disable),
TEST_CASE(test_balance_verify_mac_assignment),
TEST_CASE(test_balance_verify_slave_link_status_change_behaviour),
+#ifdef RTE_MBUF_REFCNT
TEST_CASE(test_broadcast_tx_burst),
TEST_CASE(test_broadcast_rx_burst),
TEST_CASE(test_broadcast_verify_promiscuous_enable_disable),
TEST_CASE(test_broadcast_verify_mac_assignment),
TEST_CASE(test_broadcast_verify_slave_link_status_change_behaviour),
+#endif
TEST_CASE(test_reconfigure_bonded_device),
TEST_CASE(test_close_bonded_device),