Skip to content

Commit 6296789

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Need to save away the IV across tls async operations, from Dave Watson. 2) Upon successful packet processing, we should liberate the SKB with dev_consume_skb{_irq}(). From Yang Wei. 3) Only apply RX hang workaround on effected macb chips, from Harini Katakam. 4) Dummy netdev need a proper namespace assigned to them, from Josh Elsasser. 5) Some paths of nft_compat run lockless now, and thus we need to use a proper refcnt_t. From Florian Westphal. 6) Avoid deadlock in mlx5 by doing IRQ locking, from Moni Shoua. 7) netrom does not refcount sockets properly wrt. timers, fix that by using the sock timer API. From Cong Wang. 8) Fix locking of inexact inserts of xfrm policies, from Florian Westphal. 9) Missing xfrm hash generation bump, also from Florian. 10) Missing of_node_put() in hns driver, from Yonglong Liu. 11) Fix DN_IFREQ_SIZE, from Johannes Berg. 12) ip6mr notifier is invoked during traversal of wrong table, from Nir Dotan. 13) TX promisc settings not performed correctly in qed, from Manish Chopra. 14) Fix OOB access in vhost, from Jason Wang. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (52 commits) MAINTAINERS: Add entry for XDP (eXpress Data Path) net: set default network namespace in init_dummy_netdev() net: b44: replace dev_kfree_skb_xxx by dev_consume_skb_xxx for drop profiles net: caif: call dev_consume_skb_any when skb xmit done net: 8139cp: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles net: macb: Apply RXUBR workaround only to versions with errata net: ti: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles net: apple: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles net: amd8111e: replace dev_kfree_skb_irq by dev_consume_skb_irq net: alteon: replace dev_kfree_skb_irq by dev_consume_skb_irq net: tls: Fix deadlock in free_resources tx net: tls: Save iv in tls_rec for async crypto requests vhost: fix OOB in get_rx_bufs() qed: Fix stack out of bounds bug qed: Fix system crash in ll2 xmit qed: Fix VF probe failure while FLR qed: Fix LACP pdu drops for VFs qed: Fix bug in tx promiscuous mode settings net: i825xx: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles netfilter: ipt_CLUSTERIP: fix warning unused variable cn ...
2 parents 4aa9fc2 + d07e1e0 commit 6296789

File tree

50 files changed

+605
-195
lines changed

Some content is hidden

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

50 files changed

+605
-195
lines changed

MAINTAINERS

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16673,6 +16673,24 @@ T: git git://linuxtv.org/media_tree.git
1667316673
S: Maintained
1667416674
F: drivers/media/tuners/tuner-xc2028.*
1667516675

16676+
XDP (eXpress Data Path)
16677+
M: Alexei Starovoitov <ast@kernel.org>
16678+
M: Daniel Borkmann <daniel@iogearbox.net>
16679+
M: David S. Miller <davem@davemloft.net>
16680+
M: Jakub Kicinski <jakub.kicinski@netronome.com>
16681+
M: Jesper Dangaard Brouer <hawk@kernel.org>
16682+
M: John Fastabend <john.fastabend@gmail.com>
16683+
L: netdev@vger.kernel.org
16684+
L: xdp-newbies@vger.kernel.org
16685+
S: Supported
16686+
F: net/core/xdp.c
16687+
F: include/net/xdp.h
16688+
F: kernel/bpf/devmap.c
16689+
F: kernel/bpf/cpumap.c
16690+
F: include/trace/events/xdp.h
16691+
K: xdp
16692+
N: xdp
16693+
1667616694
XDP SOCKETS (AF_XDP)
1667716695
M: Björn Töpel <bjorn.topel@intel.com>
1667816696
M: Magnus Karlsson <magnus.karlsson@intel.com>

drivers/net/caif/caif_serial.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,7 @@ static int handle_tx(struct ser_device *ser)
257257
if (skb->len == 0) {
258258
struct sk_buff *tmp = skb_dequeue(&ser->head);
259259
WARN_ON(tmp != skb);
260-
if (in_interrupt())
261-
dev_kfree_skb_irq(skb);
262-
else
263-
kfree_skb(skb);
260+
dev_consume_skb_any(skb);
264261
}
265262
}
266263
/* Send flow off if queue is empty */

drivers/net/dsa/mv88e6xxx/serdes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ int mv88e6390_serdes_irq_setup(struct mv88e6xxx_chip *chip, int port)
664664
if (port < 9)
665665
return 0;
666666

667-
return mv88e6390_serdes_irq_setup(chip, port);
667+
return mv88e6390x_serdes_irq_setup(chip, port);
668668
}
669669

670670
void mv88e6390x_serdes_irq_free(struct mv88e6xxx_chip *chip, int port)

drivers/net/ethernet/alteon/acenic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2059,7 +2059,7 @@ static inline void ace_tx_int(struct net_device *dev,
20592059
if (skb) {
20602060
dev->stats.tx_packets++;
20612061
dev->stats.tx_bytes += skb->len;
2062-
dev_kfree_skb_irq(skb);
2062+
dev_consume_skb_irq(skb);
20632063
info->skb = NULL;
20642064
}
20652065

drivers/net/ethernet/altera/altera_msgdma.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ u32 msgdma_tx_completions(struct altera_tse_private *priv)
145145
& 0xffff;
146146

147147
if (inuse) { /* Tx FIFO is not empty */
148-
ready = priv->tx_prod - priv->tx_cons - inuse - 1;
148+
ready = max_t(int,
149+
priv->tx_prod - priv->tx_cons - inuse - 1, 0);
149150
} else {
150151
/* Check for buffered last packet */
151152
status = csrrd32(priv->tx_dma_csr, msgdma_csroffs(status));

drivers/net/ethernet/amd/amd8111e.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ static int amd8111e_tx(struct net_device *dev)
666666
pci_unmap_single(lp->pci_dev, lp->tx_dma_addr[tx_index],
667667
lp->tx_skbuff[tx_index]->len,
668668
PCI_DMA_TODEVICE);
669-
dev_kfree_skb_irq (lp->tx_skbuff[tx_index]);
669+
dev_consume_skb_irq(lp->tx_skbuff[tx_index]);
670670
lp->tx_skbuff[tx_index] = NULL;
671671
lp->tx_dma_addr[tx_index] = 0;
672672
}

drivers/net/ethernet/apple/bmac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ static irqreturn_t bmac_txdma_intr(int irq, void *dev_id)
777777

778778
if (bp->tx_bufs[bp->tx_empty]) {
779779
++dev->stats.tx_packets;
780-
dev_kfree_skb_irq(bp->tx_bufs[bp->tx_empty]);
780+
dev_consume_skb_irq(bp->tx_bufs[bp->tx_empty]);
781781
}
782782
bp->tx_bufs[bp->tx_empty] = NULL;
783783
bp->tx_fullup = 0;

drivers/net/ethernet/broadcom/b44.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ static void b44_tx(struct b44 *bp)
638638
bytes_compl += skb->len;
639639
pkts_compl++;
640640

641-
dev_kfree_skb_irq(skb);
641+
dev_consume_skb_irq(skb);
642642
}
643643

644644
netdev_completed_queue(bp->dev, pkts_compl, bytes_compl);
@@ -1012,7 +1012,7 @@ static netdev_tx_t b44_start_xmit(struct sk_buff *skb, struct net_device *dev)
10121012
}
10131013

10141014
skb_copy_from_linear_data(skb, skb_put(bounce_skb, len), len);
1015-
dev_kfree_skb_any(skb);
1015+
dev_consume_skb_any(skb);
10161016
skb = bounce_skb;
10171017
}
10181018

drivers/net/ethernet/cadence/macb.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,7 @@
643643
#define MACB_CAPS_JUMBO 0x00000020
644644
#define MACB_CAPS_GEM_HAS_PTP 0x00000040
645645
#define MACB_CAPS_BD_RD_PREFETCH 0x00000080
646+
#define MACB_CAPS_NEEDS_RSTONUBR 0x00000100
646647
#define MACB_CAPS_FIFO_MODE 0x10000000
647648
#define MACB_CAPS_GIGABIT_MODE_AVAILABLE 0x20000000
648649
#define MACB_CAPS_SG_DISABLED 0x40000000
@@ -1214,6 +1215,8 @@ struct macb {
12141215

12151216
int rx_bd_rd_prefetch;
12161217
int tx_bd_rd_prefetch;
1218+
1219+
u32 rx_intr_mask;
12171220
};
12181221

12191222
#ifdef CONFIG_MACB_USE_HWSTAMP

drivers/net/ethernet/cadence/macb_main.c

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@
5656
/* level of occupied TX descriptors under which we wake up TX process */
5757
#define MACB_TX_WAKEUP_THRESH(bp) (3 * (bp)->tx_ring_size / 4)
5858

59-
#define MACB_RX_INT_FLAGS (MACB_BIT(RCOMP) | MACB_BIT(RXUBR) \
60-
| MACB_BIT(ISR_ROVR))
59+
#define MACB_RX_INT_FLAGS (MACB_BIT(RCOMP) | MACB_BIT(ISR_ROVR))
6160
#define MACB_TX_ERR_FLAGS (MACB_BIT(ISR_TUND) \
6261
| MACB_BIT(ISR_RLE) \
6362
| MACB_BIT(TXERR))
@@ -1270,7 +1269,7 @@ static int macb_poll(struct napi_struct *napi, int budget)
12701269
queue_writel(queue, ISR, MACB_BIT(RCOMP));
12711270
napi_reschedule(napi);
12721271
} else {
1273-
queue_writel(queue, IER, MACB_RX_INT_FLAGS);
1272+
queue_writel(queue, IER, bp->rx_intr_mask);
12741273
}
12751274
}
12761275

@@ -1288,7 +1287,7 @@ static void macb_hresp_error_task(unsigned long data)
12881287
u32 ctrl;
12891288

12901289
for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) {
1291-
queue_writel(queue, IDR, MACB_RX_INT_FLAGS |
1290+
queue_writel(queue, IDR, bp->rx_intr_mask |
12921291
MACB_TX_INT_FLAGS |
12931292
MACB_BIT(HRESP));
12941293
}
@@ -1318,7 +1317,7 @@ static void macb_hresp_error_task(unsigned long data)
13181317

13191318
/* Enable interrupts */
13201319
queue_writel(queue, IER,
1321-
MACB_RX_INT_FLAGS |
1320+
bp->rx_intr_mask |
13221321
MACB_TX_INT_FLAGS |
13231322
MACB_BIT(HRESP));
13241323
}
@@ -1372,14 +1371,14 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id)
13721371
(unsigned int)(queue - bp->queues),
13731372
(unsigned long)status);
13741373

1375-
if (status & MACB_RX_INT_FLAGS) {
1374+
if (status & bp->rx_intr_mask) {
13761375
/* There's no point taking any more interrupts
13771376
* until we have processed the buffers. The
13781377
* scheduling call may fail if the poll routine
13791378
* is already scheduled, so disable interrupts
13801379
* now.
13811380
*/
1382-
queue_writel(queue, IDR, MACB_RX_INT_FLAGS);
1381+
queue_writel(queue, IDR, bp->rx_intr_mask);
13831382
if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE)
13841383
queue_writel(queue, ISR, MACB_BIT(RCOMP));
13851384

@@ -1412,8 +1411,9 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id)
14121411
/* There is a hardware issue under heavy load where DMA can
14131412
* stop, this causes endless "used buffer descriptor read"
14141413
* interrupts but it can be cleared by re-enabling RX. See
1415-
* the at91 manual, section 41.3.1 or the Zynq manual
1416-
* section 16.7.4 for details.
1414+
* the at91rm9200 manual, section 41.3.1 or the Zynq manual
1415+
* section 16.7.4 for details. RXUBR is only enabled for
1416+
* these two versions.
14171417
*/
14181418
if (status & MACB_BIT(RXUBR)) {
14191419
ctrl = macb_readl(bp, NCR);
@@ -2259,7 +2259,7 @@ static void macb_init_hw(struct macb *bp)
22592259

22602260
/* Enable interrupts */
22612261
queue_writel(queue, IER,
2262-
MACB_RX_INT_FLAGS |
2262+
bp->rx_intr_mask |
22632263
MACB_TX_INT_FLAGS |
22642264
MACB_BIT(HRESP));
22652265
}
@@ -3907,6 +3907,7 @@ static const struct macb_config sama5d4_config = {
39073907
};
39083908

39093909
static const struct macb_config emac_config = {
3910+
.caps = MACB_CAPS_NEEDS_RSTONUBR,
39103911
.clk_init = at91ether_clk_init,
39113912
.init = at91ether_init,
39123913
};
@@ -3928,7 +3929,8 @@ static const struct macb_config zynqmp_config = {
39283929
};
39293930

39303931
static const struct macb_config zynq_config = {
3931-
.caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_NO_GIGABIT_HALF,
3932+
.caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_NO_GIGABIT_HALF |
3933+
MACB_CAPS_NEEDS_RSTONUBR,
39323934
.dma_burst_length = 16,
39333935
.clk_init = macb_clk_init,
39343936
.init = macb_init,
@@ -4083,6 +4085,10 @@ static int macb_probe(struct platform_device *pdev)
40834085
macb_dma_desc_get_size(bp);
40844086
}
40854087

4088+
bp->rx_intr_mask = MACB_RX_INT_FLAGS;
4089+
if (bp->caps & MACB_CAPS_NEEDS_RSTONUBR)
4090+
bp->rx_intr_mask |= MACB_BIT(RXUBR);
4091+
40864092
mac = of_get_mac_address(np);
40874093
if (mac) {
40884094
ether_addr_copy(bp->dev->dev_addr, mac);

drivers/net/ethernet/hisilicon/hns/hns_enet.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2418,6 +2418,8 @@ static int hns_nic_dev_probe(struct platform_device *pdev)
24182418
out_notify_fail:
24192419
(void)cancel_work_sync(&priv->service_task);
24202420
out_read_prop_fail:
2421+
/* safe for ACPI FW */
2422+
of_node_put(to_of_node(priv->fwnode));
24212423
free_netdev(ndev);
24222424
return ret;
24232425
}
@@ -2447,6 +2449,9 @@ static int hns_nic_dev_remove(struct platform_device *pdev)
24472449
set_bit(NIC_STATE_REMOVING, &priv->state);
24482450
(void)cancel_work_sync(&priv->service_task);
24492451

2452+
/* safe for ACPI FW */
2453+
of_node_put(to_of_node(priv->fwnode));
2454+
24502455
free_netdev(ndev);
24512456
return 0;
24522457
}

drivers/net/ethernet/hisilicon/hns/hns_ethtool.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,16 +1157,18 @@ static int hns_get_regs_len(struct net_device *net_dev)
11571157
*/
11581158
static int hns_nic_nway_reset(struct net_device *netdev)
11591159
{
1160-
int ret = 0;
11611160
struct phy_device *phy = netdev->phydev;
11621161

1163-
if (netif_running(netdev)) {
1164-
/* if autoneg is disabled, don't restart auto-negotiation */
1165-
if (phy && phy->autoneg == AUTONEG_ENABLE)
1166-
ret = genphy_restart_aneg(phy);
1167-
}
1162+
if (!netif_running(netdev))
1163+
return 0;
11681164

1169-
return ret;
1165+
if (!phy)
1166+
return -EOPNOTSUPP;
1167+
1168+
if (phy->autoneg != AUTONEG_ENABLE)
1169+
return -EINVAL;
1170+
1171+
return genphy_restart_aneg(phy);
11701172
}
11711173

11721174
static u32

drivers/net/ethernet/hisilicon/hns_mdio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ static int hns_mdio_read(struct mii_bus *bus, int phy_id, int regnum)
321321
}
322322

323323
hns_mdio_cmd_write(mdio_dev, is_c45,
324-
MDIO_C45_WRITE_ADDR, phy_id, devad);
324+
MDIO_C45_READ, phy_id, devad);
325325
}
326326

327327
/* Step 5: waitting for MDIO_COMMAND_REG 's mdio_start==0,*/

drivers/net/ethernet/i825xx/82596.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1310,7 +1310,7 @@ static irqreturn_t i596_interrupt(int irq, void *dev_id)
13101310
dev->stats.tx_aborted_errors++;
13111311
}
13121312

1313-
dev_kfree_skb_irq(skb);
1313+
dev_consume_skb_irq(skb);
13141314

13151315
tx_cmd->cmd.command = 0; /* Mark free */
13161316
break;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ static int mlx5e_open_rq(struct mlx5e_channel *c,
950950
if (params->rx_dim_enabled)
951951
__set_bit(MLX5E_RQ_STATE_AM, &c->rq.state);
952952

953-
if (params->pflags & MLX5E_PFLAG_RX_NO_CSUM_COMPLETE)
953+
if (MLX5E_GET_PFLAG(params, MLX5E_PFLAG_RX_NO_CSUM_COMPLETE))
954954
__set_bit(MLX5E_RQ_STATE_NO_CSUM_COMPLETE, &c->rq.state);
955955

956956
return 0;

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

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,9 +1126,17 @@ static int mlx5e_rep_get_phys_port_name(struct net_device *dev,
11261126
struct mlx5e_priv *priv = netdev_priv(dev);
11271127
struct mlx5e_rep_priv *rpriv = priv->ppriv;
11281128
struct mlx5_eswitch_rep *rep = rpriv->rep;
1129-
int ret;
1129+
int ret, pf_num;
1130+
1131+
ret = mlx5_lag_get_pf_num(priv->mdev, &pf_num);
1132+
if (ret)
1133+
return ret;
1134+
1135+
if (rep->vport == FDB_UPLINK_VPORT)
1136+
ret = snprintf(buf, len, "p%d", pf_num);
1137+
else
1138+
ret = snprintf(buf, len, "pf%dvf%d", pf_num, rep->vport - 1);
11301139

1131-
ret = snprintf(buf, len, "%d", rep->vport - 1);
11321140
if (ret >= len)
11331141
return -EOPNOTSUPP;
11341142

@@ -1285,6 +1293,18 @@ static int mlx5e_uplink_rep_set_mac(struct net_device *netdev, void *addr)
12851293
return 0;
12861294
}
12871295

1296+
static int mlx5e_uplink_rep_set_vf_vlan(struct net_device *dev, int vf, u16 vlan, u8 qos,
1297+
__be16 vlan_proto)
1298+
{
1299+
netdev_warn_once(dev, "legacy vf vlan setting isn't supported in switchdev mode\n");
1300+
1301+
if (vlan != 0)
1302+
return -EOPNOTSUPP;
1303+
1304+
/* allow setting 0-vid for compatibility with libvirt */
1305+
return 0;
1306+
}
1307+
12881308
static const struct switchdev_ops mlx5e_rep_switchdev_ops = {
12891309
.switchdev_port_attr_get = mlx5e_attr_get,
12901310
};
@@ -1319,6 +1339,7 @@ static const struct net_device_ops mlx5e_netdev_ops_uplink_rep = {
13191339
.ndo_set_vf_rate = mlx5e_set_vf_rate,
13201340
.ndo_get_vf_config = mlx5e_get_vf_config,
13211341
.ndo_get_vf_stats = mlx5e_get_vf_stats,
1342+
.ndo_set_vf_vlan = mlx5e_uplink_rep_set_vf_vlan,
13221343
};
13231344

13241345
bool mlx5e_eswitch_rep(struct net_device *netdev)

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

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,13 +1134,6 @@ static int esw_vport_ingress_config(struct mlx5_eswitch *esw,
11341134
int err = 0;
11351135
u8 *smac_v;
11361136

1137-
if (vport->info.spoofchk && !is_valid_ether_addr(vport->info.mac)) {
1138-
mlx5_core_warn(esw->dev,
1139-
"vport[%d] configure ingress rules failed, illegal mac with spoofchk\n",
1140-
vport->vport);
1141-
return -EPERM;
1142-
}
1143-
11441137
esw_vport_cleanup_ingress_rules(esw, vport);
11451138

11461139
if (!vport->info.vlan && !vport->info.qos && !vport->info.spoofchk) {
@@ -1728,7 +1721,7 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev)
17281721
int vport_num;
17291722
int err;
17301723

1731-
if (!MLX5_ESWITCH_MANAGER(dev))
1724+
if (!MLX5_VPORT_MANAGER(dev))
17321725
return 0;
17331726

17341727
esw_info(dev,
@@ -1797,7 +1790,7 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev)
17971790

17981791
void mlx5_eswitch_cleanup(struct mlx5_eswitch *esw)
17991792
{
1800-
if (!esw || !MLX5_ESWITCH_MANAGER(esw->dev))
1793+
if (!esw || !MLX5_VPORT_MANAGER(esw->dev))
18011794
return;
18021795

18031796
esw_info(esw->dev, "cleanup\n");
@@ -1827,13 +1820,10 @@ int mlx5_eswitch_set_vport_mac(struct mlx5_eswitch *esw,
18271820
mutex_lock(&esw->state_lock);
18281821
evport = &esw->vports[vport];
18291822

1830-
if (evport->info.spoofchk && !is_valid_ether_addr(mac)) {
1823+
if (evport->info.spoofchk && !is_valid_ether_addr(mac))
18311824
mlx5_core_warn(esw->dev,
1832-
"MAC invalidation is not allowed when spoofchk is on, vport(%d)\n",
1825+
"Set invalid MAC while spoofchk is on, vport(%d)\n",
18331826
vport);
1834-
err = -EPERM;
1835-
goto unlock;
1836-
}
18371827

18381828
err = mlx5_modify_nic_vport_mac_address(esw->dev, vport, mac);
18391829
if (err) {
@@ -1979,6 +1969,10 @@ int mlx5_eswitch_set_vport_spoofchk(struct mlx5_eswitch *esw,
19791969
evport = &esw->vports[vport];
19801970
pschk = evport->info.spoofchk;
19811971
evport->info.spoofchk = spoofchk;
1972+
if (pschk && !is_valid_ether_addr(evport->info.mac))
1973+
mlx5_core_warn(esw->dev,
1974+
"Spoofchk in set while MAC is invalid, vport(%d)\n",
1975+
evport->vport);
19821976
if (evport->enabled && esw->mode == SRIOV_LEGACY)
19831977
err = esw_vport_ingress_config(esw, evport);
19841978
if (err)

0 commit comments

Comments
 (0)