#include <rte_mbuf.h>
#include <rte_malloc.h>
-#include <rte_ethdev_driver.h>
-#include <rte_ethdev_vdev.h>
+#include <ethdev_driver.h>
+#include <ethdev_vdev.h>
#include <rte_tcp.h>
#include <rte_udp.h>
#include <rte_ip.h>
slave_eth_dev->data->dev_conf.rxmode.offloads &=
~DEV_RX_OFFLOAD_VLAN_FILTER;
+ slave_eth_dev->data->dev_conf.rxmode.max_rx_pkt_len =
+ bonded_eth_dev->data->dev_conf.rxmode.max_rx_pkt_len;
+
+ if (bonded_eth_dev->data->dev_conf.rxmode.offloads &
+ DEV_RX_OFFLOAD_JUMBO_FRAME)
+ slave_eth_dev->data->dev_conf.rxmode.offloads |=
+ DEV_RX_OFFLOAD_JUMBO_FRAME;
+ else
+ slave_eth_dev->data->dev_conf.rxmode.offloads &=
+ ~DEV_RX_OFFLOAD_JUMBO_FRAME;
+
nb_rx_queues = bonded_eth_dev->data->nb_rx_queues;
nb_tx_queues = bonded_eth_dev->data->nb_tx_queues;
}
}
-void
+int
bond_ethdev_stop(struct rte_eth_dev *eth_dev)
{
struct bond_dev_private *internals = eth_dev->data->dev_private;
uint16_t i;
+ int ret;
if (internals->mode == BONDING_MODE_8023AD) {
struct port *port;
internals->active_slave_count, slave_id) !=
internals->active_slave_count) {
internals->slaves[i].last_link_status = 0;
- rte_eth_dev_stop(slave_id);
+ ret = rte_eth_dev_stop(slave_id);
+ if (ret != 0) {
+ RTE_BOND_LOG(ERR, "Failed to stop device on port %u",
+ slave_id);
+ return ret;
+ }
deactivate_slave(eth_dev, slave_id);
}
}
+
+ return 0;
}
int
}
eth_dev->dev_ops = &default_dev_ops;
- eth_dev->data->dev_flags = RTE_ETH_DEV_INTR_LSC;
+ eth_dev->data->dev_flags = RTE_ETH_DEV_INTR_LSC |
+ RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
rte_spinlock_init(&internals->lock);
rte_spinlock_init(&internals->lsc_lock);
struct rte_eth_dev *eth_dev;
struct bond_dev_private *internals;
const char *name;
+ int ret = 0;
if (!dev)
return -EINVAL;
return -EBUSY;
if (eth_dev->data->dev_started == 1) {
- bond_ethdev_stop(eth_dev);
+ ret = bond_ethdev_stop(eth_dev);
bond_ethdev_close(eth_dev);
}
rte_eth_dev_release_port(eth_dev);
- return 0;
+ return ret;
}
/* this part will resolve the slave portids after all the other pdev and vdev