Skip to content

Commit 27605c8

Browse files
committed
Merge tag 'net-6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from bluetooth and wireless. Current release - regressions: - af_unix: allow passing cred for embryo without SO_PASSCRED/SO_PASSPIDFD Current release - new code bugs: - eth: airoha: correct enable mask for RX queues 16-31 - veth: prevent NULL pointer dereference in veth_xdp_rcv when peer disappears under traffic - ipv6: move fib6_config_validate() to ip6_route_add(), prevent invalid routes Previous releases - regressions: - phy: phy_caps: don't skip better duplex match on non-exact match - dsa: b53: fix untagged traffic sent via cpu tagged with VID 0 - Revert "wifi: mwifiex: Fix HT40 bandwidth issue.", it caused transient packet loss, exact reason not fully understood, yet Previous releases - always broken: - net: clear the dst when BPF is changing skb protocol (IPv4 <> IPv6) - sched: sfq: fix a potential crash on gso_skb handling - Bluetooth: intel: improve rx buffer posting to avoid causing issues in the firmware - eth: intel: i40e: make reset handling robust against multiple requests - eth: mlx5: ensure FW pages are always allocated on the local NUMA node, even when device is configure to 'serve' another node - wifi: ath12k: fix GCC_GCC_PCIE_HOT_RST definition for WCN7850, prevent kernel crashes - wifi: ath11k: avoid burning CPU in ath11k_debugfs_fw_stats_request() for 3 sec if fw_stats_done is not set" * tag 'net-6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (70 commits) selftests: drv-net: rss_ctx: Add test for ntuple rules targeting default RSS context net: ethtool: Don't check if RSS context exists in case of context 0 af_unix: Allow passing cred for embryo without SO_PASSCRED/SO_PASSPIDFD. ipv6: Move fib6_config_validate() to ip6_route_add(). net: drv: netdevsim: don't napi_complete() from netpoll net/mlx5: HWS, Add error checking to hws_bwc_rule_complex_hash_node_get() veth: prevent NULL pointer dereference in veth_xdp_rcv net_sched: remove qdisc_tree_flush_backlog() net_sched: ets: fix a race in ets_qdisc_change() net_sched: tbf: fix a race in tbf_change() net_sched: red: fix a race in __red_change() net_sched: prio: fix a race in prio_tune() net_sched: sch_sfq: reject invalid perturb period net: phy: phy_caps: Don't skip better duplex macth on non-exact match MAINTAINERS: Update Kuniyuki Iwashima's email address. selftests: net: add test case for NAT46 looping back dst net: clear the dst when changing skb protocol net/mlx5e: Fix number of lanes to UNKNOWN when using data_rate_oper net/mlx5e: Fix leak of Geneve TLV option object net/mlx5: HWS, make sure the uplink is the last destination ...
2 parents 9cc7d59 + d5705af commit 27605c8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+818
-555
lines changed

.mailmap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,9 @@ Krzysztof Wilczyński <[email protected]> <[email protected]>
426426
Krzysztof Wilczyński <[email protected]> <[email protected]>
427427
428428
Kuninori Morimoto <[email protected]>
429+
430+
431+
429432
430433
431434

MAINTAINERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17494,7 +17494,7 @@ F: tools/testing/selftests/net/srv6*
1749417494
NETWORKING [TCP]
1749517495
M: Eric Dumazet <[email protected]>
1749617496
M: Neal Cardwell <[email protected]>
17497-
R: Kuniyuki Iwashima <kuniyu@amazon.com>
17497+
R: Kuniyuki Iwashima <kuniyu@google.com>
1749817498
1749917499
S: Maintained
1750017500
F: Documentation/networking/net_cachelines/tcp_sock.rst
@@ -17524,7 +17524,7 @@ F: net/tls/*
1752417524

1752517525
NETWORKING [SOCKETS]
1752617526
M: Eric Dumazet <[email protected]>
17527-
M: Kuniyuki Iwashima <kuniyu@amazon.com>
17527+
M: Kuniyuki Iwashima <kuniyu@google.com>
1752817528
M: Paolo Abeni <[email protected]>
1752917529
M: Willem de Bruijn <[email protected]>
1753017530
S: Maintained
@@ -17539,7 +17539,7 @@ F: net/core/scm.c
1753917539
F: net/socket.c
1754017540

1754117541
NETWORKING [UNIX SOCKETS]
17542-
M: Kuniyuki Iwashima <kuniyu@amazon.com>
17542+
M: Kuniyuki Iwashima <kuniyu@google.com>
1754317543
S: Maintained
1754417544
F: include/net/af_unix.h
1754517545
F: include/net/netns/unix.h

drivers/bluetooth/btintel_pcie.c

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,13 @@ static int btintel_pcie_submit_rx(struct btintel_pcie_data *data)
396396
static int btintel_pcie_start_rx(struct btintel_pcie_data *data)
397397
{
398398
int i, ret;
399+
struct rxq *rxq = &data->rxq;
400+
401+
/* Post (BTINTEL_PCIE_RX_DESCS_COUNT - 3) buffers to overcome the
402+
* hardware issues leading to race condition at the firmware.
403+
*/
399404

400-
for (i = 0; i < BTINTEL_PCIE_RX_MAX_QUEUE; i++) {
405+
for (i = 0; i < rxq->count - 3; i++) {
401406
ret = btintel_pcie_submit_rx(data);
402407
if (ret)
403408
return ret;
@@ -1782,8 +1787,8 @@ static int btintel_pcie_alloc(struct btintel_pcie_data *data)
17821787
* + size of index * Number of queues(2) * type of index array(4)
17831788
* + size of context information
17841789
*/
1785-
total = (sizeof(struct tfd) + sizeof(struct urbd0) + sizeof(struct frbd)
1786-
+ sizeof(struct urbd1)) * BTINTEL_DESCS_COUNT;
1790+
total = (sizeof(struct tfd) + sizeof(struct urbd0)) * BTINTEL_PCIE_TX_DESCS_COUNT;
1791+
total += (sizeof(struct frbd) + sizeof(struct urbd1)) * BTINTEL_PCIE_RX_DESCS_COUNT;
17871792

17881793
/* Add the sum of size of index array and size of ci struct */
17891794
total += (sizeof(u16) * BTINTEL_PCIE_NUM_QUEUES * 4) + sizeof(struct ctx_info);
@@ -1808,36 +1813,36 @@ static int btintel_pcie_alloc(struct btintel_pcie_data *data)
18081813
data->dma_v_addr = v_addr;
18091814

18101815
/* Setup descriptor count */
1811-
data->txq.count = BTINTEL_DESCS_COUNT;
1812-
data->rxq.count = BTINTEL_DESCS_COUNT;
1816+
data->txq.count = BTINTEL_PCIE_TX_DESCS_COUNT;
1817+
data->rxq.count = BTINTEL_PCIE_RX_DESCS_COUNT;
18131818

18141819
/* Setup tfds */
18151820
data->txq.tfds_p_addr = p_addr;
18161821
data->txq.tfds = v_addr;
18171822

1818-
p_addr += (sizeof(struct tfd) * BTINTEL_DESCS_COUNT);
1819-
v_addr += (sizeof(struct tfd) * BTINTEL_DESCS_COUNT);
1823+
p_addr += (sizeof(struct tfd) * BTINTEL_PCIE_TX_DESCS_COUNT);
1824+
v_addr += (sizeof(struct tfd) * BTINTEL_PCIE_TX_DESCS_COUNT);
18201825

18211826
/* Setup urbd0 */
18221827
data->txq.urbd0s_p_addr = p_addr;
18231828
data->txq.urbd0s = v_addr;
18241829

1825-
p_addr += (sizeof(struct urbd0) * BTINTEL_DESCS_COUNT);
1826-
v_addr += (sizeof(struct urbd0) * BTINTEL_DESCS_COUNT);
1830+
p_addr += (sizeof(struct urbd0) * BTINTEL_PCIE_TX_DESCS_COUNT);
1831+
v_addr += (sizeof(struct urbd0) * BTINTEL_PCIE_TX_DESCS_COUNT);
18271832

18281833
/* Setup FRBD*/
18291834
data->rxq.frbds_p_addr = p_addr;
18301835
data->rxq.frbds = v_addr;
18311836

1832-
p_addr += (sizeof(struct frbd) * BTINTEL_DESCS_COUNT);
1833-
v_addr += (sizeof(struct frbd) * BTINTEL_DESCS_COUNT);
1837+
p_addr += (sizeof(struct frbd) * BTINTEL_PCIE_RX_DESCS_COUNT);
1838+
v_addr += (sizeof(struct frbd) * BTINTEL_PCIE_RX_DESCS_COUNT);
18341839

18351840
/* Setup urbd1 */
18361841
data->rxq.urbd1s_p_addr = p_addr;
18371842
data->rxq.urbd1s = v_addr;
18381843

1839-
p_addr += (sizeof(struct urbd1) * BTINTEL_DESCS_COUNT);
1840-
v_addr += (sizeof(struct urbd1) * BTINTEL_DESCS_COUNT);
1844+
p_addr += (sizeof(struct urbd1) * BTINTEL_PCIE_RX_DESCS_COUNT);
1845+
v_addr += (sizeof(struct urbd1) * BTINTEL_PCIE_RX_DESCS_COUNT);
18411846

18421847
/* Setup data buffers for txq */
18431848
err = btintel_pcie_setup_txq_bufs(data, &data->txq);

drivers/bluetooth/btintel_pcie.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,11 @@ enum msix_mbox_int_causes {
154154
/* Default interrupt timeout in msec */
155155
#define BTINTEL_DEFAULT_INTR_TIMEOUT_MS 3000
156156

157-
/* The number of descriptors in TX/RX queues */
158-
#define BTINTEL_DESCS_COUNT 16
157+
/* The number of descriptors in TX queues */
158+
#define BTINTEL_PCIE_TX_DESCS_COUNT 32
159+
160+
/* The number of descriptors in RX queues */
161+
#define BTINTEL_PCIE_RX_DESCS_COUNT 64
159162

160163
/* Number of Queue for TX and RX
161164
* It indicates the index of the IA(Index Array)
@@ -177,9 +180,6 @@ enum {
177180
/* Doorbell vector for TFD */
178181
#define BTINTEL_PCIE_TX_DB_VEC 0
179182

180-
/* Number of pending RX requests for downlink */
181-
#define BTINTEL_PCIE_RX_MAX_QUEUE 6
182-
183183
/* Doorbell vector for FRBD */
184184
#define BTINTEL_PCIE_RX_DB_VEC 513
185185

drivers/net/dsa/b53/b53_common.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,9 +2034,6 @@ int b53_br_join(struct dsa_switch *ds, int port, struct dsa_bridge bridge,
20342034

20352035
b53_get_vlan_entry(dev, pvid, vl);
20362036
vl->members &= ~BIT(port);
2037-
if (vl->members == BIT(cpu_port))
2038-
vl->members &= ~BIT(cpu_port);
2039-
vl->untag = vl->members;
20402037
b53_set_vlan_entry(dev, pvid, vl);
20412038
}
20422039

@@ -2115,8 +2112,7 @@ void b53_br_leave(struct dsa_switch *ds, int port, struct dsa_bridge bridge)
21152112
}
21162113

21172114
b53_get_vlan_entry(dev, pvid, vl);
2118-
vl->members |= BIT(port) | BIT(cpu_port);
2119-
vl->untag |= BIT(port) | BIT(cpu_port);
2115+
vl->members |= BIT(port);
21202116
b53_set_vlan_entry(dev, pvid, vl);
21212117
}
21222118
}

drivers/net/ethernet/airoha/airoha_regs.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,8 +614,9 @@
614614
RX19_DONE_INT_MASK | RX18_DONE_INT_MASK | \
615615
RX17_DONE_INT_MASK | RX16_DONE_INT_MASK)
616616

617-
#define RX_DONE_INT_MASK (RX_DONE_HIGH_INT_MASK | RX_DONE_LOW_INT_MASK)
618617
#define RX_DONE_HIGH_OFFSET fls(RX_DONE_HIGH_INT_MASK)
618+
#define RX_DONE_INT_MASK \
619+
((RX_DONE_HIGH_INT_MASK << RX_DONE_HIGH_OFFSET) | RX_DONE_LOW_INT_MASK)
619620

620621
#define INT_RX2_MASK(_n) \
621622
((RX_NO_CPU_DSCP_HIGH_INT_MASK & (_n)) | \

drivers/net/ethernet/freescale/enetc/Kconfig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
config FSL_ENETC_CORE
33
tristate
4+
select NXP_NETC_LIB if NXP_NTMP
45
help
56
This module supports common functionality between the PF and VF
67
drivers for the NXP ENETC controller.
@@ -22,6 +23,9 @@ config NXP_NETC_LIB
2223
Switch, such as NETC Table Management Protocol (NTMP) 2.0, common tc
2324
flower and debugfs interfaces and so on.
2425

26+
config NXP_NTMP
27+
bool
28+
2529
config FSL_ENETC
2630
tristate "ENETC PF driver"
2731
depends on PCI_MSI
@@ -45,7 +49,7 @@ config NXP_ENETC4
4549
select FSL_ENETC_CORE
4650
select FSL_ENETC_MDIO
4751
select NXP_ENETC_PF_COMMON
48-
select NXP_NETC_LIB
52+
select NXP_NTMP
4953
select PHYLINK
5054
select DIMLIB
5155
help

drivers/net/ethernet/intel/e1000/e1000_main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -477,10 +477,6 @@ static void e1000_down_and_stop(struct e1000_adapter *adapter)
477477

478478
cancel_delayed_work_sync(&adapter->phy_info_task);
479479
cancel_delayed_work_sync(&adapter->fifo_stall_task);
480-
481-
/* Only kill reset task if adapter is not resetting */
482-
if (!test_bit(__E1000_RESETTING, &adapter->flags))
483-
cancel_work_sync(&adapter->reset_task);
484480
}
485481

486482
void e1000_down(struct e1000_adapter *adapter)
@@ -1266,6 +1262,10 @@ static void e1000_remove(struct pci_dev *pdev)
12661262

12671263
unregister_netdev(netdev);
12681264

1265+
/* Only kill reset task if adapter is not resetting */
1266+
if (!test_bit(__E1000_RESETTING, &adapter->flags))
1267+
cancel_work_sync(&adapter->reset_task);
1268+
12691269
e1000_phy_hw_reset(hw);
12701270

12711271
kfree(adapter->tx_ring);

drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1546,8 +1546,8 @@ static void i40e_cleanup_reset_vf(struct i40e_vf *vf)
15461546
* @vf: pointer to the VF structure
15471547
* @flr: VFLR was issued or not
15481548
*
1549-
* Returns true if the VF is in reset, resets successfully, or resets
1550-
* are disabled and false otherwise.
1549+
* Return: True if reset was performed successfully or if resets are disabled.
1550+
* False if reset is already in progress.
15511551
**/
15521552
bool i40e_reset_vf(struct i40e_vf *vf, bool flr)
15531553
{
@@ -1566,7 +1566,7 @@ bool i40e_reset_vf(struct i40e_vf *vf, bool flr)
15661566

15671567
/* If VF is being reset already we don't need to continue. */
15681568
if (test_and_set_bit(I40E_VF_STATE_RESETTING, &vf->vf_states))
1569-
return true;
1569+
return false;
15701570

15711571
i40e_trigger_vf_reset(vf, flr);
15721572

@@ -4328,7 +4328,10 @@ int i40e_vc_process_vflr_event(struct i40e_pf *pf)
43284328
reg = rd32(hw, I40E_GLGEN_VFLRSTAT(reg_idx));
43294329
if (reg & BIT(bit_idx))
43304330
/* i40e_reset_vf will clear the bit in GLGEN_VFLRSTAT */
4331-
i40e_reset_vf(vf, true);
4331+
if (!i40e_reset_vf(vf, true)) {
4332+
/* At least one VF did not finish resetting, retry next time */
4333+
set_bit(__I40E_VFLR_EVENT_PENDING, pf->state);
4334+
}
43324335
}
43334336

43344337
return 0;

drivers/net/ethernet/intel/iavf/iavf_main.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3209,6 +3209,17 @@ static void iavf_reset_task(struct work_struct *work)
32093209
}
32103210

32113211
continue_reset:
3212+
/* If we are still early in the state machine, just restart. */
3213+
if (adapter->state <= __IAVF_INIT_FAILED) {
3214+
iavf_shutdown_adminq(hw);
3215+
iavf_change_state(adapter, __IAVF_STARTUP);
3216+
iavf_startup(adapter);
3217+
queue_delayed_work(adapter->wq, &adapter->watchdog_task,
3218+
msecs_to_jiffies(30));
3219+
netdev_unlock(netdev);
3220+
return;
3221+
}
3222+
32123223
/* We don't use netif_running() because it may be true prior to
32133224
* ndo_open() returning, so we can't assume it means all our open
32143225
* tasks have finished, since we're not holding the rtnl_lock here.

drivers/net/ethernet/intel/iavf/iavf_virtchnl.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,23 @@ iavf_poll_virtchnl_msg(struct iavf_hw *hw, struct iavf_arq_event_info *event,
7979
return iavf_status_to_errno(status);
8080
received_op =
8181
(enum virtchnl_ops)le32_to_cpu(event->desc.cookie_high);
82+
83+
if (received_op == VIRTCHNL_OP_EVENT) {
84+
struct iavf_adapter *adapter = hw->back;
85+
struct virtchnl_pf_event *vpe =
86+
(struct virtchnl_pf_event *)event->msg_buf;
87+
88+
if (vpe->event != VIRTCHNL_EVENT_RESET_IMPENDING)
89+
continue;
90+
91+
dev_info(&adapter->pdev->dev, "Reset indication received from the PF\n");
92+
if (!(adapter->flags & IAVF_FLAG_RESET_PENDING))
93+
iavf_schedule_reset(adapter,
94+
IAVF_FLAG_RESET_PENDING);
95+
96+
return -EIO;
97+
}
98+
8299
if (op_to_poll == received_op)
83100
break;
84101
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2299,6 +2299,7 @@ static int ice_capture_crosststamp(ktime_t *device,
22992299
ts = ((u64)ts_hi << 32) | ts_lo;
23002300
system->cycles = ts;
23012301
system->cs_id = CSID_X86_ART;
2302+
system->use_nsecs = true;
23022303

23032304
/* Read Device source clock time */
23042305
ts_lo = rd32(hw, cfg->dev_time_l[tmr_idx]);

drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
#include "en/fs_ethtool.h"
4444

4545
#define LANES_UNKNOWN 0
46-
#define MAX_LANES 8
4746

4847
void mlx5e_ethtool_get_drvinfo(struct mlx5e_priv *priv,
4948
struct ethtool_drvinfo *drvinfo)
@@ -1098,10 +1097,8 @@ static void get_link_properties(struct net_device *netdev,
10981097
speed = info->speed;
10991098
lanes = info->lanes;
11001099
duplex = DUPLEX_FULL;
1101-
} else if (data_rate_oper) {
1100+
} else if (data_rate_oper)
11021101
speed = 100 * data_rate_oper;
1103-
lanes = MAX_LANES;
1104-
}
11051102

11061103
out:
11071104
link_ksettings->base.duplex = duplex;

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2028,9 +2028,8 @@ mlx5e_tc_add_fdb_flow(struct mlx5e_priv *priv,
20282028
return err;
20292029
}
20302030

2031-
static bool mlx5_flow_has_geneve_opt(struct mlx5e_tc_flow *flow)
2031+
static bool mlx5_flow_has_geneve_opt(struct mlx5_flow_spec *spec)
20322032
{
2033-
struct mlx5_flow_spec *spec = &flow->attr->parse_attr->spec;
20342033
void *headers_v = MLX5_ADDR_OF(fte_match_param,
20352034
spec->match_value,
20362035
misc_parameters_3);
@@ -2069,7 +2068,7 @@ static void mlx5e_tc_del_fdb_flow(struct mlx5e_priv *priv,
20692068
}
20702069
complete_all(&flow->del_hw_done);
20712070

2072-
if (mlx5_flow_has_geneve_opt(flow))
2071+
if (mlx5_flow_has_geneve_opt(&attr->parse_attr->spec))
20732072
mlx5_geneve_tlv_option_del(priv->mdev->geneve);
20742073

20752074
if (flow->decap_route)
@@ -2574,12 +2573,13 @@ static int parse_tunnel_attr(struct mlx5e_priv *priv,
25742573

25752574
err = mlx5e_tc_tun_parse(filter_dev, priv, tmp_spec, f, match_level);
25762575
if (err) {
2577-
kvfree(tmp_spec);
25782576
NL_SET_ERR_MSG_MOD(extack, "Failed to parse tunnel attributes");
25792577
netdev_warn(priv->netdev, "Failed to parse tunnel attributes");
2580-
return err;
2578+
} else {
2579+
err = mlx5e_tc_set_attr_rx_tun(flow, tmp_spec);
25812580
}
2582-
err = mlx5e_tc_set_attr_rx_tun(flow, tmp_spec);
2581+
if (mlx5_flow_has_geneve_opt(tmp_spec))
2582+
mlx5_geneve_tlv_option_del(priv->mdev->geneve);
25832583
kvfree(tmp_spec);
25842584
if (err)
25852585
return err;

drivers/net/ethernet/mellanox/mlx5/core/eswitch.c

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,12 +1295,15 @@ mlx5_eswitch_enable_pf_vf_vports(struct mlx5_eswitch *esw,
12951295
ret = mlx5_eswitch_load_pf_vf_vport(esw, MLX5_VPORT_ECPF, enabled_events);
12961296
if (ret)
12971297
goto ecpf_err;
1298-
if (mlx5_core_ec_sriov_enabled(esw->dev)) {
1299-
ret = mlx5_eswitch_load_ec_vf_vports(esw, esw->esw_funcs.num_ec_vfs,
1300-
enabled_events);
1301-
if (ret)
1302-
goto ec_vf_err;
1303-
}
1298+
}
1299+
1300+
/* Enable ECVF vports */
1301+
if (mlx5_core_ec_sriov_enabled(esw->dev)) {
1302+
ret = mlx5_eswitch_load_ec_vf_vports(esw,
1303+
esw->esw_funcs.num_ec_vfs,
1304+
enabled_events);
1305+
if (ret)
1306+
goto ec_vf_err;
13041307
}
13051308

13061309
/* Enable VF vports */
@@ -1331,9 +1334,11 @@ void mlx5_eswitch_disable_pf_vf_vports(struct mlx5_eswitch *esw)
13311334
{
13321335
mlx5_eswitch_unload_vf_vports(esw, esw->esw_funcs.num_vfs);
13331336

1337+
if (mlx5_core_ec_sriov_enabled(esw->dev))
1338+
mlx5_eswitch_unload_ec_vf_vports(esw,
1339+
esw->esw_funcs.num_ec_vfs);
1340+
13341341
if (mlx5_ecpf_vport_exists(esw->dev)) {
1335-
if (mlx5_core_ec_sriov_enabled(esw->dev))
1336-
mlx5_eswitch_unload_ec_vf_vports(esw, esw->esw_funcs.num_vfs);
13371342
mlx5_eswitch_unload_pf_vf_vport(esw, MLX5_VPORT_ECPF);
13381343
}
13391344

0 commit comments

Comments
 (0)