vhost: fix offload flags in Rx path
[dpdk.git] / drivers / net / bonding / rte_eth_bond_pmd.c
index 5241c60..6ba09c4 100644 (file)
@@ -3108,14 +3108,11 @@ bond_ethdev_mac_address_set(struct rte_eth_dev *dev,
 }
 
 static int
-bond_filter_ctrl(struct rte_eth_dev *dev __rte_unused,
-                enum rte_filter_type type, enum rte_filter_op op, void *arg)
+bond_flow_ops_get(struct rte_eth_dev *dev __rte_unused,
+                 const struct rte_flow_ops **ops)
 {
-       if (type == RTE_ETH_FILTER_GENERIC && op == RTE_ETH_FILTER_GET) {
-               *(const void **)arg = &bond_flow_ops;
-               return 0;
-       }
-       return -ENOTSUP;
+       *ops = &bond_flow_ops;
+       return 0;
 }
 
 static int
@@ -3207,7 +3204,7 @@ const struct eth_dev_ops default_dev_ops = {
        .mac_addr_set         = bond_ethdev_mac_address_set,
        .mac_addr_add         = bond_ethdev_mac_addr_add,
        .mac_addr_remove      = bond_ethdev_mac_addr_remove,
-       .filter_ctrl          = bond_filter_ctrl
+       .flow_ops_get         = bond_flow_ops_get
 };
 
 static int
@@ -3336,8 +3333,9 @@ bond_probe(struct rte_vdev_device *dev)
        const char *name;
        struct bond_dev_private *internals;
        struct rte_kvargs *kvlist;
-       uint8_t bonding_mode, socket_id/*, agg_mode*/;
-       int  arg_count, port_id;
+       uint8_t bonding_mode;
+       int arg_count, port_id;
+       int socket_id;
        uint8_t agg_mode;
        struct rte_eth_dev *eth_dev;
 
@@ -3470,6 +3468,8 @@ bond_remove(struct rte_vdev_device *dev)
                ret = bond_ethdev_stop(eth_dev);
                bond_ethdev_close(eth_dev);
        }
+       if (internals->kvlist != NULL)
+               rte_kvargs_free(internals->kvlist);
        rte_eth_dev_release_port(eth_dev);
 
        return ret;
@@ -3778,4 +3778,4 @@ RTE_PMD_REGISTER_PARAM_STRING(net_bonding,
        "up_delay=<int> "
        "down_delay=<int>");
 
-RTE_LOG_REGISTER(bond_logtype, pmd.net.bond, NOTICE);
+RTE_LOG_REGISTER(bond_logtype, pmd.net.bonding, NOTICE);