X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fi40e%2Frte_pmd_i40e.c;h=446e31710c7a9db8a77d83a89225086e243758d2;hb=2ab5c84605f03e125eaa917cf6c1d5338729098e;hp=24281c293869a9c3bfc451d1662bc9bfeb1a1357;hpb=b066f1d62d6c2ed2f6cdd8a8169ea384685c3aa3;p=dpdk.git diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c index 24281c2938..446e31710c 100644 --- a/drivers/net/i40e/rte_pmd_i40e.c +++ b/drivers/net/i40e/rte_pmd_i40e.c @@ -581,6 +581,7 @@ rte_pmd_i40e_remove_vf_mac_addr(uint16_t port, uint16_t vf_id, struct i40e_pf_vf *vf; struct i40e_vsi *vsi; struct i40e_pf *pf; + int ret; if (i40e_validate_mac_addr((u8 *)mac_addr) != I40E_SUCCESS) return -EINVAL; @@ -609,8 +610,9 @@ rte_pmd_i40e_remove_vf_mac_addr(uint16_t port, uint16_t vf_id, rte_ether_addr_copy(&null_mac_addr, &vf->mac_addr); /* Remove the mac */ - i40e_vsi_delete_mac(vsi, mac_addr); - + ret = i40e_vsi_delete_mac(vsi, mac_addr); + if (ret != I40E_SUCCESS) + return ret; return 0; } @@ -1407,7 +1409,7 @@ rte_pmd_i40e_set_tc_strict_prio(uint16_t port, uint8_t tc_map) /* Disable DCBx if it's the first time to set strict priority. */ if (!veb->strict_prio_tc) { - ret = i40e_aq_stop_lldp(hw, true, NULL); + ret = i40e_aq_stop_lldp(hw, true, true, NULL); if (ret) PMD_DRV_LOG(INFO, "Failed to disable DCBx as it's already" @@ -1462,7 +1464,7 @@ rte_pmd_i40e_set_tc_strict_prio(uint16_t port, uint8_t tc_map) /* Enable DCBx again, if all the TCs' strict priority disabled. */ if (!tc_map) { - ret = i40e_aq_start_lldp(hw, NULL); + ret = i40e_aq_start_lldp(hw, true, NULL); if (ret) { PMD_DRV_LOG(ERR, "Failed to enable DCBx, err(%d).", ret); @@ -2170,7 +2172,8 @@ static int check_invalid_pkt_type(uint32_t pkt_type) tnl != RTE_PTYPE_TUNNEL_GRENAT && tnl != RTE_PTYPE_TUNNEL_GTPC && tnl != RTE_PTYPE_TUNNEL_GTPU && - tnl != RTE_PTYPE_TUNNEL_L2TP) + tnl != RTE_PTYPE_TUNNEL_L2TP && + tnl != RTE_PTYPE_TUNNEL_ESP) return -1; if (il2 && @@ -3205,3 +3208,24 @@ rte_pmd_i40e_inset_set(uint16_t port, uint8_t pctype, I40E_WRITE_FLUSH(hw); return 0; } + +int +rte_pmd_i40e_set_switch_dev(uint16_t port_id, struct rte_eth_dev *switch_dev) +{ + struct rte_eth_dev *i40e_dev; + struct i40e_hw *hw; + + RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); + + i40e_dev = &rte_eth_devices[port_id]; + if (!is_i40e_supported(i40e_dev)) + return -ENOTSUP; + + hw = I40E_DEV_PRIVATE_TO_HW(i40e_dev->data->dev_private); + if (!hw) + return -1; + + hw->switch_dev = switch_dev; + + return 0; +}