diff options
| -rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_main.c | 16 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 19 |
2 files changed, 18 insertions, 17 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 483126cceade..5ddbd54bbf55 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c | |||
| @@ -1650,6 +1650,13 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi) | |||
| 1650 | dev_info(&pf->pdev->dev, | 1650 | dev_info(&pf->pdev->dev, |
| 1651 | "set uni promisc failed, err %d, aq_err %d\n", | 1651 | "set uni promisc failed, err %d, aq_err %d\n", |
| 1652 | aq_ret, pf->hw.aq.asq_last_status); | 1652 | aq_ret, pf->hw.aq.asq_last_status); |
| 1653 | aq_ret = i40e_aq_set_vsi_broadcast(&vsi->back->hw, | ||
| 1654 | vsi->seid, | ||
| 1655 | cur_promisc, NULL); | ||
| 1656 | if (aq_ret) | ||
| 1657 | dev_info(&pf->pdev->dev, | ||
| 1658 | "set brdcast promisc failed, err %d, aq_err %d\n", | ||
| 1659 | aq_ret, pf->hw.aq.asq_last_status); | ||
| 1653 | } | 1660 | } |
| 1654 | 1661 | ||
| 1655 | clear_bit(__I40E_CONFIG_BUSY, &vsi->state); | 1662 | clear_bit(__I40E_CONFIG_BUSY, &vsi->state); |
| @@ -3987,13 +3994,6 @@ static int i40e_open(struct net_device *netdev) | |||
| 3987 | if (err) | 3994 | if (err) |
| 3988 | goto err_up_complete; | 3995 | goto err_up_complete; |
| 3989 | 3996 | ||
| 3990 | if ((vsi->type == I40E_VSI_MAIN) || (vsi->type == I40E_VSI_VMDQ2)) { | ||
| 3991 | err = i40e_aq_set_vsi_broadcast(&pf->hw, vsi->seid, true, NULL); | ||
| 3992 | if (err) | ||
| 3993 | netdev_info(netdev, | ||
| 3994 | "couldn't set broadcast err %d aq_err %d\n", | ||
| 3995 | err, pf->hw.aq.asq_last_status); | ||
| 3996 | } | ||
| 3997 | #ifdef CONFIG_I40E_VXLAN | 3997 | #ifdef CONFIG_I40E_VXLAN |
| 3998 | vxlan_get_rx_port(netdev); | 3998 | vxlan_get_rx_port(netdev); |
| 3999 | #endif | 3999 | #endif |
| @@ -6067,6 +6067,7 @@ static const struct net_device_ops i40e_netdev_ops = { | |||
| 6067 | **/ | 6067 | **/ |
| 6068 | static int i40e_config_netdev(struct i40e_vsi *vsi) | 6068 | static int i40e_config_netdev(struct i40e_vsi *vsi) |
| 6069 | { | 6069 | { |
| 6070 | u8 brdcast[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; | ||
| 6070 | struct i40e_pf *pf = vsi->back; | 6071 | struct i40e_pf *pf = vsi->back; |
| 6071 | struct i40e_hw *hw = &pf->hw; | 6072 | struct i40e_hw *hw = &pf->hw; |
| 6072 | struct i40e_netdev_priv *np; | 6073 | struct i40e_netdev_priv *np; |
| @@ -6116,6 +6117,7 @@ static int i40e_config_netdev(struct i40e_vsi *vsi) | |||
| 6116 | random_ether_addr(mac_addr); | 6117 | random_ether_addr(mac_addr); |
| 6117 | i40e_add_filter(vsi, mac_addr, I40E_VLAN_ANY, false, false); | 6118 | i40e_add_filter(vsi, mac_addr, I40E_VLAN_ANY, false, false); |
| 6118 | } | 6119 | } |
| 6120 | i40e_add_filter(vsi, brdcast, I40E_VLAN_ANY, false, false); | ||
| 6119 | 6121 | ||
| 6120 | memcpy(netdev->dev_addr, mac_addr, ETH_ALEN); | 6122 | memcpy(netdev->dev_addr, mac_addr, ETH_ALEN); |
| 6121 | memcpy(netdev->perm_addr, mac_addr, ETH_ALEN); | 6123 | memcpy(netdev->perm_addr, mac_addr, ETH_ALEN); |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c index 55ec2db71fa1..fee368a7e75e 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | |||
| @@ -369,7 +369,6 @@ static int i40e_alloc_vsi_res(struct i40e_vf *vf, enum i40e_vsi_type type) | |||
| 369 | { | 369 | { |
| 370 | struct i40e_mac_filter *f = NULL; | 370 | struct i40e_mac_filter *f = NULL; |
| 371 | struct i40e_pf *pf = vf->pf; | 371 | struct i40e_pf *pf = vf->pf; |
| 372 | struct i40e_hw *hw = &pf->hw; | ||
| 373 | struct i40e_vsi *vsi; | 372 | struct i40e_vsi *vsi; |
| 374 | int ret = 0; | 373 | int ret = 0; |
| 375 | 374 | ||
| @@ -383,6 +382,7 @@ static int i40e_alloc_vsi_res(struct i40e_vf *vf, enum i40e_vsi_type type) | |||
| 383 | goto error_alloc_vsi_res; | 382 | goto error_alloc_vsi_res; |
| 384 | } | 383 | } |
| 385 | if (type == I40E_VSI_SRIOV) { | 384 | if (type == I40E_VSI_SRIOV) { |
| 385 | u8 brdcast[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; | ||
| 386 | vf->lan_vsi_index = vsi->idx; | 386 | vf->lan_vsi_index = vsi->idx; |
| 387 | vf->lan_vsi_id = vsi->id; | 387 | vf->lan_vsi_id = vsi->id; |
| 388 | dev_info(&pf->pdev->dev, | 388 | dev_info(&pf->pdev->dev, |
| @@ -398,6 +398,14 @@ static int i40e_alloc_vsi_res(struct i40e_vf *vf, enum i40e_vsi_type type) | |||
| 398 | i40e_vsi_add_pvid(vsi, vf->port_vlan_id); | 398 | i40e_vsi_add_pvid(vsi, vf->port_vlan_id); |
| 399 | f = i40e_add_filter(vsi, vf->default_lan_addr.addr, | 399 | f = i40e_add_filter(vsi, vf->default_lan_addr.addr, |
| 400 | vf->port_vlan_id, true, false); | 400 | vf->port_vlan_id, true, false); |
| 401 | if (!f) | ||
| 402 | dev_info(&pf->pdev->dev, | ||
| 403 | "Could not allocate VF MAC addr\n"); | ||
| 404 | f = i40e_add_filter(vsi, brdcast, vf->port_vlan_id, | ||
| 405 | true, false); | ||
| 406 | if (!f) | ||
| 407 | dev_info(&pf->pdev->dev, | ||
| 408 | "Could not allocate VF broadcast filter\n"); | ||
| 401 | } | 409 | } |
| 402 | 410 | ||
| 403 | if (!f) { | 411 | if (!f) { |
| @@ -413,15 +421,6 @@ static int i40e_alloc_vsi_res(struct i40e_vf *vf, enum i40e_vsi_type type) | |||
| 413 | goto error_alloc_vsi_res; | 421 | goto error_alloc_vsi_res; |
| 414 | } | 422 | } |
| 415 | 423 | ||
| 416 | /* accept bcast pkts. by default */ | ||
| 417 | ret = i40e_aq_set_vsi_broadcast(hw, vsi->seid, true, NULL); | ||
| 418 | if (ret) { | ||
| 419 | dev_err(&pf->pdev->dev, | ||
| 420 | "set vsi bcast failed for vf %d, vsi %d, aq_err %d\n", | ||
| 421 | vf->vf_id, vsi->idx, pf->hw.aq.asq_last_status); | ||
| 422 | ret = -EINVAL; | ||
| 423 | } | ||
| 424 | |||
| 425 | error_alloc_vsi_res: | 424 | error_alloc_vsi_res: |
| 426 | return ret; | 425 | return ret; |
| 427 | } | 426 | } |
