* @param port_pos Port to assign.
*/
static void
-selection_logic(struct bond_dev_private *internals, uint8_t slave_id)
+selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
{
struct port *agg, *port;
uint16_t slaves_count, new_agg_id, i, j = 0;
}
static void
-rx_machine_update(struct bond_dev_private *internals, uint8_t slave_id,
+rx_machine_update(struct bond_dev_private *internals, uint16_t slave_id,
struct rte_mbuf *lacp_pkt) {
struct lacpdu_header *lacp;
struct lacpdu_actor_partner_params *partner;
struct rte_eth_link link_info;
struct ether_addr slave_addr;
struct rte_mbuf *lacp_pkt = NULL;
-
- uint8_t i, slave_id;
+ uint16_t slave_id;
+ uint16_t i;
/* Update link status on each port */
bond_mode_8023ad_enable(struct rte_eth_dev *bond_dev)
{
struct bond_dev_private *internals = bond_dev->data->dev_private;
- uint8_t i;
+ uint16_t i;
for (i = 0; i < internals->active_slave_count; i++)
bond_mode_8023ad_activate_slave(bond_dev,
for (i = 0; i < nb_bufs; i++) {
/* Populate slave mbuf arrays with mbufs for that slave. */
- uint8_t slave_idx = bufs_slave_port_idxs[i];
+ uint16_t slave_idx = bufs_slave_port_idxs[i];
slave_bufs[slave_idx][slave_nb_bufs[slave_idx]++] = bufs[i];
}
uint8_t collecting; /* current slave collecting status */
const uint8_t promisc = internals->promiscuous_en;
- uint8_t i, j, k;
uint8_t subtype;
+ uint8_t j, k;
+ uint16_t i;
/* Copy slave list to protect against slave up/down changes during tx
* bursting */
void
burst_xmit_l2_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
- uint8_t slave_count, uint16_t *slaves)
+ uint16_t slave_count, uint16_t *slaves)
{
struct ether_hdr *eth_hdr;
uint32_t hash;
void
burst_xmit_l23_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
- uint8_t slave_count, uint16_t *slaves)
+ uint16_t slave_count, uint16_t *slaves)
{
uint16_t i;
struct ether_hdr *eth_hdr;
void
burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
- uint8_t slave_count, uint16_t *slaves)
+ uint16_t slave_count, uint16_t *slaves)
{
struct ether_hdr *eth_hdr;
uint16_t proto;
struct bwg_slave {
uint64_t bwg_left_int;
uint64_t bwg_left_remainder;
- uint8_t slave;
+ uint16_t slave;
};
void
struct bond_dev_private *internals = arg;
struct rte_eth_stats slave_stats;
struct bwg_slave bwg_array[RTE_MAX_ETHPORTS];
- uint8_t slave_count;
+ uint16_t slave_count;
uint64_t tx_bytes;
uint8_t update_stats = 0;
- uint8_t i, slave_id;
+ uint16_t slave_id;
+ uint16_t i;
internals->slave_update_idx++;
for (i = 0; i < nb_bufs; i++) {
/* Populate slave mbuf arrays with mbufs for that slave. */
- uint8_t slave_idx = bufs_slave_port_idxs[i];
+ uint16_t slave_idx = bufs_slave_port_idxs[i];
slave_bufs[slave_idx][slave_nb_bufs[slave_idx]++] = bufs[i];
}
* Populate slave mbuf arrays with mbufs for that
* slave
*/
- uint8_t slave_idx = bufs_slave_port_idxs[i];
+ uint16_t slave_idx = bufs_slave_port_idxs[i];
slave_bufs[slave_idx][slave_nb_bufs[slave_idx]++] =
bufs[i];
struct bond_dev_private *internals;
struct bond_tx_queue *bd_tx_q;
- uint8_t tx_failed_flag = 0, num_of_slaves;
uint16_t slaves[RTE_MAX_ETHPORTS];
+ uint8_t tx_failed_flag = 0;
+ uint16_t num_of_slaves;
uint16_t max_nb_of_tx_pkts = 0;
slave_remove(struct bond_dev_private *internals,
struct rte_eth_dev *slave_eth_dev)
{
- uint8_t i;
+ uint16_t i;
for (i = 0; i < internals->slave_count; i++)
if (internals->slaves[i].port_id ==
bond_ethdev_stop(struct rte_eth_dev *eth_dev)
{
struct bond_dev_private *internals = eth_dev->data->dev_private;
- uint8_t i;
+ uint16_t i;
if (internals->mode == BONDING_MODE_8023AD) {
struct port *port;
*/
if (internals->slave_count > 0) {
struct rte_eth_dev_info slave_info;
- uint8_t idx;
+ uint16_t idx;
for (idx = 0; idx < internals->slave_count; idx++) {
rte_eth_dev_info_get(internals->slaves[idx].port_id,
struct rte_eth_link link;
int rc = -1;
- int i, valid_slave = 0;
- uint8_t active_pos;
uint8_t lsc_flag = 0;
+ int valid_slave = 0;
+ uint16_t active_pos;
+ uint16_t i;
if (type != RTE_ETH_EVENT_INTR_LSC || param == NULL)
return rc;
};
typedef void (*burst_xmit_hash_t)(struct rte_mbuf **buf, uint16_t nb_pkts,
- uint8_t slave_count, uint16_t *slaves);
+ uint16_t slave_count, uint16_t *slaves);
/** Link Bonding PMD device private configuration Structure */
struct bond_dev_private {
void
burst_xmit_l2_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
- uint8_t slave_count, uint16_t *slaves);
+ uint16_t slave_count, uint16_t *slaves);
void
burst_xmit_l23_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
- uint8_t slave_count, uint16_t *slaves);
+ uint16_t slave_count, uint16_t *slaves);
void
burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
- uint8_t slave_count, uint16_t *slaves);
+ uint16_t slave_count, uint16_t *slaves);
void