X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fbonding%2Frte_eth_bond_pmd.c;h=970fe0c8b02b7d456d0fe2a793d929adc16b4023;hb=a67857e97ba8b8fc4636e2a336e929450a1614e2;hp=129f04b36feecf39bae1779a5605f0e0beba1f8a;hpb=50705e8e3cdd261c1333ede1f449feb9c2c69893;p=dpdk.git diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 129f04b36f..970fe0c8b0 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include @@ -1650,7 +1650,8 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->max_mac_addrs = 1; - dev_info->max_rx_pktlen = (uint32_t)2048; + dev_info->max_rx_pktlen = internals->candidate_max_rx_pktlen ? + internals->candidate_max_rx_pktlen : 2048; dev_info->max_rx_queues = (uint16_t)128; dev_info->max_tx_queues = (uint16_t)512; @@ -2176,7 +2177,7 @@ const struct eth_dev_ops default_dev_ops = { }; static int -bond_init(const char *name, const char *params) +bond_probe(const char *name, const char *params) { struct bond_dev_private *internals; struct rte_kvargs *kvlist; @@ -2243,7 +2244,7 @@ parse_error: } static int -bond_uninit(const char *name) +bond_remove(const char *name) { int ret; @@ -2293,6 +2294,9 @@ bond_ethdev_configure(struct rte_eth_dev *dev) } } + /* set the max_rx_pktlen */ + internals->max_rx_pktlen = internals->candidate_max_rx_pktlen; + /* * if no kvlist, it means that this bonded device has been created * through the bonding api. @@ -2504,11 +2508,20 @@ bond_ethdev_configure(struct rte_eth_dev *dev) return 0; } -static struct rte_driver bond_drv = { - .name = "eth_bond", - .type = PMD_VDEV, - .init = bond_init, - .uninit = bond_uninit, +static struct rte_vdev_driver bond_drv = { + .probe = bond_probe, + .remove = bond_remove, }; -PMD_REGISTER_DRIVER(bond_drv); +DRIVER_REGISTER_VDEV(net_bonding, bond_drv); + +DRIVER_REGISTER_PARAM_STRING(net_bonding, + "slave= " + "primary= " + "mode=[0-6] " + "xmit_policy=[l2 | l23 | l34] " + "socket_id= " + "mac= " + "lsc_poll_period_ms= " + "up_delay= " + "down_delay=");