.. | .. |
---|
2788 | 2788 | struct i40e_pf *pf = vsi->back; |
---|
2789 | 2789 | |
---|
2790 | 2790 | if (i40e_enabled_xdp_vsi(vsi)) { |
---|
2791 | | - int frame_size = new_mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN; |
---|
| 2791 | + int frame_size = new_mtu + I40E_PACKET_HDR_PAD; |
---|
2792 | 2792 | |
---|
2793 | 2793 | if (frame_size > i40e_max_xdp_frame_size(vsi)) |
---|
2794 | 2794 | return -EINVAL; |
---|
.. | .. |
---|
10448 | 10448 | pf->hw.aq.asq_last_status)); |
---|
10449 | 10449 | } |
---|
10450 | 10450 | /* reinit the misc interrupt */ |
---|
10451 | | - if (pf->flags & I40E_FLAG_MSIX_ENABLED) |
---|
| 10451 | + if (pf->flags & I40E_FLAG_MSIX_ENABLED) { |
---|
10452 | 10452 | ret = i40e_setup_misc_vector(pf); |
---|
| 10453 | + if (ret) |
---|
| 10454 | + goto end_unlock; |
---|
| 10455 | + } |
---|
10453 | 10456 | |
---|
10454 | 10457 | /* Add a filter to drop all Flow control frames from any VSI from being |
---|
10455 | 10458 | * transmitted. By doing so we stop a malicious VF from sending out |
---|
.. | .. |
---|
12520 | 12523 | } |
---|
12521 | 12524 | |
---|
12522 | 12525 | br_spec = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_AF_SPEC); |
---|
| 12526 | + if (!br_spec) |
---|
| 12527 | + return -EINVAL; |
---|
12523 | 12528 | |
---|
12524 | 12529 | nla_for_each_nested(attr, br_spec, rem) { |
---|
12525 | 12530 | __u16 mode; |
---|
.. | .. |
---|
13456 | 13461 | vsi->id = ctxt.vsi_number; |
---|
13457 | 13462 | } |
---|
13458 | 13463 | |
---|
13459 | | - vsi->active_filters = 0; |
---|
13460 | | - clear_bit(__I40E_VSI_OVERFLOW_PROMISC, vsi->state); |
---|
13461 | 13464 | spin_lock_bh(&vsi->mac_filter_hash_lock); |
---|
| 13465 | + vsi->active_filters = 0; |
---|
13462 | 13466 | /* If macvlan filters already exist, force them to get loaded */ |
---|
13463 | 13467 | hash_for_each_safe(vsi->mac_filter_hash, bkt, h, f, hlist) { |
---|
13464 | 13468 | f->state = I40E_FILTER_NEW; |
---|
13465 | 13469 | f_count++; |
---|
13466 | 13470 | } |
---|
13467 | 13471 | spin_unlock_bh(&vsi->mac_filter_hash_lock); |
---|
| 13472 | + clear_bit(__I40E_VSI_OVERFLOW_PROMISC, vsi->state); |
---|
13468 | 13473 | |
---|
13469 | 13474 | if (f_count) { |
---|
13470 | 13475 | vsi->flags |= I40E_VSI_FLAG_FILTER_CHANGED; |
---|
.. | .. |
---|
14849 | 14854 | int err; |
---|
14850 | 14855 | int v_idx; |
---|
14851 | 14856 | |
---|
| 14857 | + pci_set_drvdata(pf->pdev, pf); |
---|
14852 | 14858 | pci_save_state(pf->pdev); |
---|
14853 | 14859 | |
---|
14854 | 14860 | /* set up periodic task facility */ |
---|