X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fice%2Fice_ethdev.c;h=f0dc543575fbe201dec59b4116cf2f75b10e0a9a;hb=76fd789cc7dddbaa2c08065b7c3ca915b5c07e7c;hp=5a1190d50effbb04f3ce92ecc66e7d007741217e;hpb=962fa026889d83f5f0a6880a98d050e0c3e0f6b9;p=dpdk.git diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 5a1190d50e..f0dc543575 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -129,10 +129,8 @@ static int ice_xstats_get(struct rte_eth_dev *dev, static int ice_xstats_get_names(struct rte_eth_dev *dev, struct rte_eth_xstat_name *xstats_names, unsigned int limit); -static int ice_dev_filter_ctrl(struct rte_eth_dev *dev, - enum rte_filter_type filter_type, - enum rte_filter_op filter_op, - void *arg); +static int ice_dev_flow_ops_get(struct rte_eth_dev *dev, + const struct rte_flow_ops **ops); static int ice_dev_udp_tunnel_port_add(struct rte_eth_dev *dev, struct rte_eth_udp_tunnel *udp_tunnel); static int ice_dev_udp_tunnel_port_del(struct rte_eth_dev *dev, @@ -215,7 +213,7 @@ static const struct eth_dev_ops ice_eth_dev_ops = { .xstats_get = ice_xstats_get, .xstats_get_names = ice_xstats_get_names, .xstats_reset = ice_stats_reset, - .filter_ctrl = ice_dev_filter_ctrl, + .flow_ops_get = ice_dev_flow_ops_get, .udp_tunnel_port_add = ice_dev_udp_tunnel_port_add, .udp_tunnel_port_del = ice_dev_udp_tunnel_port_del, .tx_done_cleanup = ice_tx_done_cleanup, @@ -809,7 +807,7 @@ ice_init_mac_address(struct rte_eth_dev *dev) (struct rte_ether_addr *)hw->port_info[0].mac.perm_addr); dev->data->mac_addrs = - rte_zmalloc(NULL, sizeof(struct rte_ether_addr), 0); + rte_zmalloc(NULL, sizeof(struct rte_ether_addr) * ICE_NUM_MACADDR_MAX, 0); if (!dev->data->mac_addrs) { PMD_INIT_LOG(ERR, "Failed to allocate memory to store mac address"); @@ -2348,7 +2346,7 @@ hash_cfg_reset(struct ice_rss_hash_cfg *cfg) cfg->hash_flds = 0; cfg->addl_hdrs = 0; cfg->symm = 0; - cfg->hdr_type = ICE_RSS_ANY_HEADERS; + cfg->hdr_type = ICE_RSS_OUTER_HEADERS; } static int @@ -2833,7 +2831,7 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf) __func__, ret); cfg.symm = 0; - cfg.hdr_type = ICE_RSS_ANY_HEADERS; + cfg.hdr_type = ICE_RSS_OUTER_HEADERS; /* Configure RSS for IPv4 with src/dst addr as input set */ if (rss_hf & ETH_RSS_IPV4) { cfg.addl_hdrs = ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER; @@ -5267,30 +5265,14 @@ static int ice_xstats_get_names(__rte_unused struct rte_eth_dev *dev, } static int -ice_dev_filter_ctrl(struct rte_eth_dev *dev, - enum rte_filter_type filter_type, - enum rte_filter_op filter_op, - void *arg) +ice_dev_flow_ops_get(struct rte_eth_dev *dev, + const struct rte_flow_ops **ops) { - int ret = 0; - if (!dev) return -EINVAL; - switch (filter_type) { - case RTE_ETH_FILTER_GENERIC: - if (filter_op != RTE_ETH_FILTER_GET) - return -EINVAL; - *(const void **)arg = &ice_flow_ops; - break; - default: - PMD_DRV_LOG(WARNING, "Filter type (%d) not supported", - filter_type); - ret = -EINVAL; - break; - } - - return ret; + *ops = &ice_flow_ops; + return 0; } /* Add UDP tunneling port */