Skip to content

Commit 23309d6

Browse files
committed
Merge tag 'net-6.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni: "Including fixes from netfilter and bpf. There are a few fixes for new code bugs, including the Mellanox one noted in the last networking pull. No known regressions outstanding. Current release - regressions: - sched: clear actions pointer in miss cookie init fail - mptcp: fix accept vs worker race - bpf: fix bpf_arch_text_poke() with new_addr == NULL on s390 - eth: bnxt_en: fix a possible NULL pointer dereference in unload path - eth: veth: take into account peer device for NETDEV_XDP_ACT_NDO_XMIT xdp_features flag Current release - new code bugs: - eth: revert "net/mlx5: Enable management PF initialization" Previous releases - regressions: - netfilter: fix recent physdev match breakage - bpf: fix incorrect verifier pruning due to missing register precision taints - eth: virtio_net: fix overflow inside xdp_linearize_page() - eth: cxgb4: fix use after free bugs caused by circular dependency problem - eth: mlxsw: pci: fix possible crash during initialization Previous releases - always broken: - sched: sch_qfq: prevent slab-out-of-bounds in qfq_activate_agg - netfilter: validate catch-all set elements - bridge: don't notify FDB entries with "master dynamic" - eth: bonding: fix memory leak when changing bond type to ethernet - eth: i40e: fix accessing vsi->active_filters without holding lock Misc: - Mat is back as MPTCP co-maintainer" * tag 'net-6.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (33 commits) net: bridge: switchdev: don't notify FDB entries with "master dynamic" Revert "net/mlx5: Enable management PF initialization" MAINTAINERS: Resume MPTCP co-maintainer role mailmap: add entries for Mat Martineau e1000e: Disable TSO on i219-LM card to increase speed bnxt_en: fix free-runnig PHC mode net: dsa: microchip: ksz8795: Correctly handle huge frame configuration bpf: Fix incorrect verifier pruning due to missing register precision taints hamradio: drop ISA_DMA_API dependency mlxsw: pci: Fix possible crash during initialization mptcp: fix accept vs worker race mptcp: stops worker on unaccepted sockets at listener close net: rpl: fix rpl header size calculation net: vmxnet3: Fix NULL pointer dereference in vmxnet3_rq_rx_complete() bonding: Fix memory leak when changing bond type to Ethernet veth: take into account peer device for NETDEV_XDP_ACT_NDO_XMIT xdp_features flag mlxfw: fix null-ptr-deref in mlxfw_mfa2_tlv_next() bnxt_en: Fix a possible NULL pointer dereference in unload path bnxt_en: Do not initialize PTP on older P3/P4 chips netfilter: nf_tables: tighten netlink attribute requirements for catch-all elements ...
2 parents cb08563 + 927cdea commit 23309d6

File tree

36 files changed

+351
-161
lines changed

36 files changed

+351
-161
lines changed

.mailmap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@ Martin Kepplinger <[email protected]> <[email protected]>
299299
300300
Martyna Szapar-Mudlaw <[email protected]> <[email protected]>
301301
Mathieu Othacehe <[email protected]>
302+
303+
302304
303305
304306

Documentation/networking/devlink/ice.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ ice devlink support
77
This document describes the devlink features implemented by the ``ice``
88
device driver.
99

10+
Parameters
11+
==========
12+
13+
.. list-table:: Generic parameters implemented
14+
15+
* - Name
16+
- Mode
17+
- Notes
18+
* - ``enable_roce``
19+
- runtime
20+
- mutually exclusive with ``enable_iwarp``
21+
* - ``enable_iwarp``
22+
- runtime
23+
- mutually exclusive with ``enable_roce``
24+
1025
Info versions
1126
=============
1227

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14594,6 +14594,7 @@ F: net/netlabel/
1459414594

1459514595
NETWORKING [MPTCP]
1459614596
M: Matthieu Baerts <[email protected]>
14597+
M: Mat Martineau <[email protected]>
1459714598
1459814599
1459914600
S: Maintained

arch/s390/net/bpf_jit_comp.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ static void bpf_jit_plt(void *plt, void *ret, void *target)
539539
{
540540
memcpy(plt, bpf_plt, BPF_PLT_SIZE);
541541
*(void **)((char *)plt + (bpf_plt_ret - bpf_plt)) = ret;
542-
*(void **)((char *)plt + (bpf_plt_target - bpf_plt)) = target;
542+
*(void **)((char *)plt + (bpf_plt_target - bpf_plt)) = target ?: ret;
543543
}
544544

545545
/*
@@ -2010,7 +2010,9 @@ int bpf_arch_text_poke(void *ip, enum bpf_text_poke_type t,
20102010
} __packed insn;
20112011
char expected_plt[BPF_PLT_SIZE];
20122012
char current_plt[BPF_PLT_SIZE];
2013+
char new_plt[BPF_PLT_SIZE];
20132014
char *plt;
2015+
char *ret;
20142016
int err;
20152017

20162018
/* Verify the branch to be patched. */
@@ -2032,12 +2034,15 @@ int bpf_arch_text_poke(void *ip, enum bpf_text_poke_type t,
20322034
err = copy_from_kernel_nofault(current_plt, plt, BPF_PLT_SIZE);
20332035
if (err < 0)
20342036
return err;
2035-
bpf_jit_plt(expected_plt, (char *)ip + 6, old_addr);
2037+
ret = (char *)ip + 6;
2038+
bpf_jit_plt(expected_plt, ret, old_addr);
20362039
if (memcmp(current_plt, expected_plt, BPF_PLT_SIZE))
20372040
return -EINVAL;
20382041
/* Adjust the call address. */
2042+
bpf_jit_plt(new_plt, ret, new_addr);
20392043
s390_kernel_write(plt + (bpf_plt_target - bpf_plt),
2040-
&new_addr, sizeof(void *));
2044+
new_plt + (bpf_plt_target - bpf_plt),
2045+
sizeof(void *));
20412046
}
20422047

20432048
/* Adjust the mask of the branch. */

drivers/net/bonding/bond_main.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,14 +1777,15 @@ void bond_lower_state_changed(struct slave *slave)
17771777

17781778
/* The bonding driver uses ether_setup() to convert a master bond device
17791779
* to ARPHRD_ETHER, that resets the target netdevice's flags so we always
1780-
* have to restore the IFF_MASTER flag, and only restore IFF_SLAVE if it was set
1780+
* have to restore the IFF_MASTER flag, and only restore IFF_SLAVE and IFF_UP
1781+
* if they were set
17811782
*/
17821783
static void bond_ether_setup(struct net_device *bond_dev)
17831784
{
1784-
unsigned int slave_flag = bond_dev->flags & IFF_SLAVE;
1785+
unsigned int flags = bond_dev->flags & (IFF_SLAVE | IFF_UP);
17851786

17861787
ether_setup(bond_dev);
1787-
bond_dev->flags |= IFF_MASTER | slave_flag;
1788+
bond_dev->flags |= IFF_MASTER | flags;
17881789
bond_dev->priv_flags &= ~IFF_TX_SKB_SHARING;
17891790
}
17901791

drivers/net/dsa/microchip/ksz8795.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static int ksz8795_change_mtu(struct ksz_device *dev, int frame_size)
9696

9797
if (frame_size > KSZ8_LEGAL_PACKET_SIZE)
9898
ctrl2 |= SW_LEGAL_PACKET_DISABLE;
99-
else if (frame_size > KSZ8863_NORMAL_PACKET_SIZE)
99+
if (frame_size > KSZ8863_NORMAL_PACKET_SIZE)
100100
ctrl1 |= SW_HUGE_PACKET;
101101

102102
ret = ksz_rmw8(dev, REG_SW_CTRL_1, SW_HUGE_PACKET, ctrl1);

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2388,7 +2388,7 @@ static int bnxt_async_event_process(struct bnxt *bp,
23882388
case ASYNC_EVENT_CMPL_EVENT_ID_PHC_UPDATE: {
23892389
switch (BNXT_EVENT_PHC_EVENT_TYPE(data1)) {
23902390
case ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA1_FLAGS_PHC_RTC_UPDATE:
2391-
if (bp->fw_cap & BNXT_FW_CAP_PTP_RTC) {
2391+
if (BNXT_PTP_USE_RTC(bp)) {
23922392
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
23932393
u64 ns;
23942394

@@ -7627,7 +7627,7 @@ static int __bnxt_hwrm_ptp_qcfg(struct bnxt *bp)
76277627
u8 flags;
76287628
int rc;
76297629

7630-
if (bp->hwrm_spec_code < 0x10801) {
7630+
if (bp->hwrm_spec_code < 0x10801 || !BNXT_CHIP_P5_THOR(bp)) {
76317631
rc = -ENODEV;
76327632
goto no_ptp;
76337633
}

drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ void bnxt_rdma_aux_device_uninit(struct bnxt *bp)
304304
struct auxiliary_device *adev;
305305

306306
/* Skip if no auxiliary device init was done. */
307-
if (!(bp->flags & BNXT_FLAG_ROCE_CAP))
307+
if (!bp->aux_priv)
308308
return;
309309

310310
aux_priv = bp->aux_priv;
@@ -324,6 +324,7 @@ static void bnxt_aux_dev_release(struct device *dev)
324324
bp->edev = NULL;
325325
kfree(aux_priv->edev);
326326
kfree(aux_priv);
327+
bp->aux_priv = NULL;
327328
}
328329

329330
static void bnxt_set_edev_info(struct bnxt_en_dev *edev, struct bnxt *bp)
@@ -359,19 +360,18 @@ void bnxt_rdma_aux_device_init(struct bnxt *bp)
359360
if (!(bp->flags & BNXT_FLAG_ROCE_CAP))
360361
return;
361362

362-
bp->aux_priv = kzalloc(sizeof(*bp->aux_priv), GFP_KERNEL);
363-
if (!bp->aux_priv)
363+
aux_priv = kzalloc(sizeof(*bp->aux_priv), GFP_KERNEL);
364+
if (!aux_priv)
364365
goto exit;
365366

366-
bp->aux_priv->id = ida_alloc(&bnxt_aux_dev_ids, GFP_KERNEL);
367-
if (bp->aux_priv->id < 0) {
367+
aux_priv->id = ida_alloc(&bnxt_aux_dev_ids, GFP_KERNEL);
368+
if (aux_priv->id < 0) {
368369
netdev_warn(bp->dev,
369370
"ida alloc failed for ROCE auxiliary device\n");
370-
kfree(bp->aux_priv);
371+
kfree(aux_priv);
371372
goto exit;
372373
}
373374

374-
aux_priv = bp->aux_priv;
375375
aux_dev = &aux_priv->aux_dev;
376376
aux_dev->id = aux_priv->id;
377377
aux_dev->name = "rdma";
@@ -380,10 +380,11 @@ void bnxt_rdma_aux_device_init(struct bnxt *bp)
380380

381381
rc = auxiliary_device_init(aux_dev);
382382
if (rc) {
383-
ida_free(&bnxt_aux_dev_ids, bp->aux_priv->id);
384-
kfree(bp->aux_priv);
383+
ida_free(&bnxt_aux_dev_ids, aux_priv->id);
384+
kfree(aux_priv);
385385
goto exit;
386386
}
387+
bp->aux_priv = aux_priv;
387388

388389
/* From this point, all cleanup will happen via the .release callback &
389390
* any error unwinding will need to include a call to

drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@ void cxgb4_cleanup_tc_flower(struct adapter *adap)
11351135
return;
11361136

11371137
if (adap->flower_stats_timer.function)
1138-
del_timer_sync(&adap->flower_stats_timer);
1138+
timer_shutdown_sync(&adap->flower_stats_timer);
11391139
cancel_work_sync(&adap->flower_stats_work);
11401140
rhashtable_destroy(&adap->flower_tbl);
11411141
adap->tc_flower_initialized = false;

drivers/net/ethernet/intel/e1000e/netdev.c

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5288,31 +5288,6 @@ static void e1000_watchdog_task(struct work_struct *work)
52885288
ew32(TARC(0), tarc0);
52895289
}
52905290

5291-
/* disable TSO for pcie and 10/100 speeds, to avoid
5292-
* some hardware issues
5293-
*/
5294-
if (!(adapter->flags & FLAG_TSO_FORCE)) {
5295-
switch (adapter->link_speed) {
5296-
case SPEED_10:
5297-
case SPEED_100:
5298-
e_info("10/100 speed: disabling TSO\n");
5299-
netdev->features &= ~NETIF_F_TSO;
5300-
netdev->features &= ~NETIF_F_TSO6;
5301-
break;
5302-
case SPEED_1000:
5303-
netdev->features |= NETIF_F_TSO;
5304-
netdev->features |= NETIF_F_TSO6;
5305-
break;
5306-
default:
5307-
/* oops */
5308-
break;
5309-
}
5310-
if (hw->mac.type == e1000_pch_spt) {
5311-
netdev->features &= ~NETIF_F_TSO;
5312-
netdev->features &= ~NETIF_F_TSO6;
5313-
}
5314-
}
5315-
53165291
/* enable transmits in the hardware, need to do this
53175292
* after setting TARC(0)
53185293
*/
@@ -7526,6 +7501,32 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
75267501
NETIF_F_RXCSUM |
75277502
NETIF_F_HW_CSUM);
75287503

7504+
/* disable TSO for pcie and 10/100 speeds to avoid
7505+
* some hardware issues and for i219 to fix transfer
7506+
* speed being capped at 60%
7507+
*/
7508+
if (!(adapter->flags & FLAG_TSO_FORCE)) {
7509+
switch (adapter->link_speed) {
7510+
case SPEED_10:
7511+
case SPEED_100:
7512+
e_info("10/100 speed: disabling TSO\n");
7513+
netdev->features &= ~NETIF_F_TSO;
7514+
netdev->features &= ~NETIF_F_TSO6;
7515+
break;
7516+
case SPEED_1000:
7517+
netdev->features |= NETIF_F_TSO;
7518+
netdev->features |= NETIF_F_TSO6;
7519+
break;
7520+
default:
7521+
/* oops */
7522+
break;
7523+
}
7524+
if (hw->mac.type == e1000_pch_spt) {
7525+
netdev->features &= ~NETIF_F_TSO;
7526+
netdev->features &= ~NETIF_F_TSO6;
7527+
}
7528+
}
7529+
75297530
/* Set user-changeable features (subset of all device features) */
75307531
netdev->hw_features = netdev->features;
75317532
netdev->hw_features |= NETIF_F_RXFCS;

0 commit comments

Comments
 (0)