Skip to content

Commit bf84719

Browse files
committed
Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2022-07-26 This series contains updates to ice driver only. Przemyslaw corrects accounting for VF VLANs to allow for correct number of VLANs for untrusted VF. He also correct issue with checksum offload on VXLAN tunnels. Ani allows for two VSIs to share the same MAC address. Maciej corrects checked bits for descriptor completion of loopback * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: do not setup vlan for loopback VSI ice: check (DD | EOF) bits on Rx descriptor rather than (EOP | RS) ice: Fix VSIs unable to share unicast MAC ice: Fix tunnel checksum offload with fragmented traffic ice: Fix max VLANs available for VF ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 181d8d2 + cc01954 commit bf84719

File tree

5 files changed

+16
-48
lines changed

5 files changed

+16
-48
lines changed

drivers/net/ethernet/intel/ice/ice_ethtool.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,8 @@ static int ice_lbtest_receive_frames(struct ice_rx_ring *rx_ring)
658658
rx_desc = ICE_RX_DESC(rx_ring, i);
659659

660660
if (!(rx_desc->wb.status_error0 &
661-
cpu_to_le16(ICE_TX_DESC_CMD_EOP | ICE_TX_DESC_CMD_RS)))
661+
(cpu_to_le16(BIT(ICE_RX_FLEX_DESC_STATUS0_DD_S)) |
662+
cpu_to_le16(BIT(ICE_RX_FLEX_DESC_STATUS0_EOF_S)))))
662663
continue;
663664

664665
rx_buf = &rx_ring->rx_buf[i];

drivers/net/ethernet/intel/ice/ice_main.c

+7-3
Original file line numberDiff line numberDiff line change
@@ -4656,6 +4656,8 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent)
46564656
ice_set_safe_mode_caps(hw);
46574657
}
46584658

4659+
hw->ucast_shared = true;
4660+
46594661
err = ice_init_pf(pf);
46604662
if (err) {
46614663
dev_err(dev, "ice_init_pf failed: %d\n", err);
@@ -6011,10 +6013,12 @@ int ice_vsi_cfg(struct ice_vsi *vsi)
60116013
if (vsi->netdev) {
60126014
ice_set_rx_mode(vsi->netdev);
60136015

6014-
err = ice_vsi_vlan_setup(vsi);
6016+
if (vsi->type != ICE_VSI_LB) {
6017+
err = ice_vsi_vlan_setup(vsi);
60156018

6016-
if (err)
6017-
return err;
6019+
if (err)
6020+
return err;
6021+
}
60186022
}
60196023
ice_vsi_cfg_dcb_rings(vsi);
60206024

drivers/net/ethernet/intel/ice/ice_sriov.c

-40
Original file line numberDiff line numberDiff line change
@@ -1309,39 +1309,6 @@ ice_get_vf_cfg(struct net_device *netdev, int vf_id, struct ifla_vf_info *ivi)
13091309
return ret;
13101310
}
13111311

1312-
/**
1313-
* ice_unicast_mac_exists - check if the unicast MAC exists on the PF's switch
1314-
* @pf: PF used to reference the switch's rules
1315-
* @umac: unicast MAC to compare against existing switch rules
1316-
*
1317-
* Return true on the first/any match, else return false
1318-
*/
1319-
static bool ice_unicast_mac_exists(struct ice_pf *pf, u8 *umac)
1320-
{
1321-
struct ice_sw_recipe *mac_recipe_list =
1322-
&pf->hw.switch_info->recp_list[ICE_SW_LKUP_MAC];
1323-
struct ice_fltr_mgmt_list_entry *list_itr;
1324-
struct list_head *rule_head;
1325-
struct mutex *rule_lock; /* protect MAC filter list access */
1326-
1327-
rule_head = &mac_recipe_list->filt_rules;
1328-
rule_lock = &mac_recipe_list->filt_rule_lock;
1329-
1330-
mutex_lock(rule_lock);
1331-
list_for_each_entry(list_itr, rule_head, list_entry) {
1332-
u8 *existing_mac = &list_itr->fltr_info.l_data.mac.mac_addr[0];
1333-
1334-
if (ether_addr_equal(existing_mac, umac)) {
1335-
mutex_unlock(rule_lock);
1336-
return true;
1337-
}
1338-
}
1339-
1340-
mutex_unlock(rule_lock);
1341-
1342-
return false;
1343-
}
1344-
13451312
/**
13461313
* ice_set_vf_mac
13471314
* @netdev: network interface device structure
@@ -1376,13 +1343,6 @@ int ice_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)
13761343
if (ret)
13771344
goto out_put_vf;
13781345

1379-
if (ice_unicast_mac_exists(pf, mac)) {
1380-
netdev_err(netdev, "Unicast MAC %pM already exists on this PF. Preventing setting VF %u unicast MAC address to %pM\n",
1381-
mac, vf_id, mac);
1382-
ret = -EINVAL;
1383-
goto out_put_vf;
1384-
}
1385-
13861346
mutex_lock(&vf->cfg_lock);
13871347

13881348
/* VF is notified of its new MAC via the PF's response to the

drivers/net/ethernet/intel/ice/ice_txrx.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -1751,11 +1751,13 @@ int ice_tx_csum(struct ice_tx_buf *first, struct ice_tx_offload_params *off)
17511751

17521752
protocol = vlan_get_protocol(skb);
17531753

1754-
if (eth_p_mpls(protocol))
1754+
if (eth_p_mpls(protocol)) {
17551755
ip.hdr = skb_inner_network_header(skb);
1756-
else
1756+
l4.hdr = skb_checksum_start(skb);
1757+
} else {
17571758
ip.hdr = skb_network_header(skb);
1758-
l4.hdr = skb_checksum_start(skb);
1759+
l4.hdr = skb_transport_header(skb);
1760+
}
17591761

17601762
/* compute outer L2 header size */
17611763
l2_len = ip.hdr - skb->data;

drivers/net/ethernet/intel/ice/ice_virtchnl.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -2948,7 +2948,8 @@ ice_vc_validate_add_vlan_filter_list(struct ice_vsi *vsi,
29482948
struct virtchnl_vlan_filtering_caps *vfc,
29492949
struct virtchnl_vlan_filter_list_v2 *vfl)
29502950
{
2951-
u16 num_requested_filters = vsi->num_vlan + vfl->num_elements;
2951+
u16 num_requested_filters = ice_vsi_num_non_zero_vlans(vsi) +
2952+
vfl->num_elements;
29522953

29532954
if (num_requested_filters > vfc->max_filters)
29542955
return false;

0 commit comments

Comments
 (0)