Skip to content

Commit 89cdf9d

Browse files
committed
Merge tag 'net-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from netfilter and bpf. Current release - regressions: - sched: fix SKB_NOT_DROPPED_YET splat under debug config Current release - new code bugs: - tcp: - fix usec timestamps with TCP fastopen - fix possible out-of-bounds reads in tcp_hash_fail() - fix SYN option room calculation for TCP-AO - tcp_sigpool: fix some off by one bugs - bpf: fix compilation error without CGROUPS - ptp: - ptp_read() should not release queue - fix tsevqs corruption Previous releases - regressions: - llc: verify mac len before reading mac header Previous releases - always broken: - bpf: - fix check_stack_write_fixed_off() to correctly spill imm - fix precision tracking for BPF_ALU | BPF_TO_BE | BPF_END - check map->usercnt after timer->timer is assigned - dsa: lan9303: consequently nested-lock physical MDIO - dccp/tcp: call security_inet_conn_request() after setting IP addr - tg3: fix the TX ring stall due to incorrect full ring handling - phylink: initialize carrier state at creation - ice: fix direction of VF rules in switchdev mode Misc: - fill in a bunch of missing MODULE_DESCRIPTION()s, more to come" * tag 'net-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (84 commits) net: ti: icss-iep: fix setting counter value ptp: fix corrupted list in ptp_open ptp: ptp_read should not release queue net_sched: sch_fq: better validate TCA_FQ_WEIGHTS and TCA_FQ_PRIOMAP net: kcm: fill in MODULE_DESCRIPTION() net/sched: act_ct: Always fill offloading tuple iifidx netfilter: nat: fix ipv6 nat redirect with mapped and scoped addresses netfilter: xt_recent: fix (increase) ipv6 literal buffer length ipvs: add missing module descriptions netfilter: nf_tables: remove catchall element in GC sync path netfilter: add missing module descriptions drivers/net/ppp: use standard array-copy-function net: enetc: shorten enetc_setup_xdp_prog() error message to fit NETLINK_MAX_FMTMSG_LEN virtio/vsock: Fix uninit-value in virtio_transport_recv_pkt() r8169: respect userspace disabling IFF_MULTICAST selftests/bpf: get trusted cgrp from bpf_iter__cgroup directly bpf: Let verifier consider {task,cgroup} is trusted in bpf_iter_reg net: phylink: initialize carrier state at creation test/vsock: add dobule bind connect test test/vsock: refactor vsock_accept ...
2 parents 3b22041 + 83b9dda commit 89cdf9d

File tree

178 files changed

+1240
-432
lines changed

Some content is hidden

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

178 files changed

+1240
-432
lines changed

Documentation/bpf/kfuncs.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,14 @@ prototype in a header for the wrapper kfunc.
3737
An example is given below::
3838

3939
/* Disables missing prototype warnings */
40-
__diag_push();
41-
__diag_ignore_all("-Wmissing-prototypes",
42-
"Global kfuncs as their definitions will be in BTF");
40+
__bpf_kfunc_start_defs();
4341

4442
__bpf_kfunc struct task_struct *bpf_find_get_task_by_vpid(pid_t nr)
4543
{
4644
return find_get_task_by_vpid(nr);
4745
}
4846

49-
__diag_pop();
47+
__bpf_kfunc_end_defs();
5048

5149
A wrapper kfunc is often needed when we need to annotate parameters of the
5250
kfunc. Otherwise one may directly make the kfunc visible to the BPF program by

Documentation/netlink/specs/devlink.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ definitions:
7171
name: roce-bit
7272
-
7373
name: migratable-bit
74+
-
75+
name: ipsec-crypto-bit
76+
-
77+
name: ipsec-packet-bit
7478
-
7579
type: enum
7680
name: sb-threshold-type

Documentation/networking/smc-sysctl.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,16 @@ smcr_testlink_time - INTEGER
4444

4545
wmem - INTEGER
4646
Initial size of send buffer used by SMC sockets.
47-
The default value inherits from net.ipv4.tcp_wmem[1].
4847

4948
The minimum value is 16KiB and there is no hard limit for max value, but
5049
only allowed 512KiB for SMC-R and 1MiB for SMC-D.
5150

52-
Default: 16K
51+
Default: 64KiB
5352

5453
rmem - INTEGER
5554
Initial size of receive buffer (RMB) used by SMC sockets.
56-
The default value inherits from net.ipv4.tcp_rmem[1].
5755

5856
The minimum value is 16KiB and there is no hard limit for max value, but
5957
only allowed 512KiB for SMC-R and 1MiB for SMC-D.
6058

61-
Default: 128K
59+
Default: 64KiB

drivers/net/dsa/lan9303_mdio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static int lan9303_mdio_write(void *ctx, uint32_t reg, uint32_t val)
3232
struct lan9303_mdio *sw_dev = (struct lan9303_mdio *)ctx;
3333

3434
reg <<= 2; /* reg num to offset */
35-
mutex_lock(&sw_dev->device->bus->mdio_lock);
35+
mutex_lock_nested(&sw_dev->device->bus->mdio_lock, MDIO_MUTEX_NESTED);
3636
lan9303_mdio_real_write(sw_dev->device, reg, val & 0xffff);
3737
lan9303_mdio_real_write(sw_dev->device, reg + 2, (val >> 16) & 0xffff);
3838
mutex_unlock(&sw_dev->device->bus->mdio_lock);
@@ -50,7 +50,7 @@ static int lan9303_mdio_read(void *ctx, uint32_t reg, uint32_t *val)
5050
struct lan9303_mdio *sw_dev = (struct lan9303_mdio *)ctx;
5151

5252
reg <<= 2; /* reg num to offset */
53-
mutex_lock(&sw_dev->device->bus->mdio_lock);
53+
mutex_lock_nested(&sw_dev->device->bus->mdio_lock, MDIO_MUTEX_NESTED);
5454
*val = lan9303_mdio_real_read(sw_dev->device, reg);
5555
*val |= (lan9303_mdio_real_read(sw_dev->device, reg + 2) << 16);
5656
mutex_unlock(&sw_dev->device->bus->mdio_lock);

drivers/net/ethernet/broadcom/tg3.c

Lines changed: 44 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6647,9 +6647,9 @@ static void tg3_tx(struct tg3_napi *tnapi)
66476647

66486648
tnapi->tx_cons = sw_idx;
66496649

6650-
/* Need to make the tx_cons update visible to tg3_start_xmit()
6650+
/* Need to make the tx_cons update visible to __tg3_start_xmit()
66516651
* before checking for netif_queue_stopped(). Without the
6652-
* memory barrier, there is a small possibility that tg3_start_xmit()
6652+
* memory barrier, there is a small possibility that __tg3_start_xmit()
66536653
* will miss it and cause the queue to be stopped forever.
66546654
*/
66556655
smp_mb();
@@ -7889,7 +7889,7 @@ static bool tg3_tso_bug_gso_check(struct tg3_napi *tnapi, struct sk_buff *skb)
78897889
return skb_shinfo(skb)->gso_segs < tnapi->tx_pending / 3;
78907890
}
78917891

7892-
static netdev_tx_t tg3_start_xmit(struct sk_buff *, struct net_device *);
7892+
static netdev_tx_t __tg3_start_xmit(struct sk_buff *, struct net_device *);
78937893

78947894
/* Use GSO to workaround all TSO packets that meet HW bug conditions
78957895
* indicated in tg3_tx_frag_set()
@@ -7923,7 +7923,7 @@ static int tg3_tso_bug(struct tg3 *tp, struct tg3_napi *tnapi,
79237923

79247924
skb_list_walk_safe(segs, seg, next) {
79257925
skb_mark_not_on_list(seg);
7926-
tg3_start_xmit(seg, tp->dev);
7926+
__tg3_start_xmit(seg, tp->dev);
79277927
}
79287928

79297929
tg3_tso_bug_end:
@@ -7933,7 +7933,7 @@ static int tg3_tso_bug(struct tg3 *tp, struct tg3_napi *tnapi,
79337933
}
79347934

79357935
/* hard_start_xmit for all devices */
7936-
static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
7936+
static netdev_tx_t __tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
79377937
{
79387938
struct tg3 *tp = netdev_priv(dev);
79397939
u32 len, entry, base_flags, mss, vlan = 0;
@@ -8182,11 +8182,6 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
81828182
netif_tx_wake_queue(txq);
81838183
}
81848184

8185-
if (!netdev_xmit_more() || netif_xmit_stopped(txq)) {
8186-
/* Packets are ready, update Tx producer idx on card. */
8187-
tw32_tx_mbox(tnapi->prodmbox, entry);
8188-
}
8189-
81908185
return NETDEV_TX_OK;
81918186

81928187
dma_error:
@@ -8199,6 +8194,42 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
81998194
return NETDEV_TX_OK;
82008195
}
82018196

8197+
static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
8198+
{
8199+
struct netdev_queue *txq;
8200+
u16 skb_queue_mapping;
8201+
netdev_tx_t ret;
8202+
8203+
skb_queue_mapping = skb_get_queue_mapping(skb);
8204+
txq = netdev_get_tx_queue(dev, skb_queue_mapping);
8205+
8206+
ret = __tg3_start_xmit(skb, dev);
8207+
8208+
/* Notify the hardware that packets are ready by updating the TX ring
8209+
* tail pointer. We respect netdev_xmit_more() thus avoiding poking
8210+
* the hardware for every packet. To guarantee forward progress the TX
8211+
* ring must be drained when it is full as indicated by
8212+
* netif_xmit_stopped(). This needs to happen even when the current
8213+
* skb was dropped or rejected with NETDEV_TX_BUSY. Otherwise packets
8214+
* queued by previous __tg3_start_xmit() calls might get stuck in
8215+
* the queue forever.
8216+
*/
8217+
if (!netdev_xmit_more() || netif_xmit_stopped(txq)) {
8218+
struct tg3_napi *tnapi;
8219+
struct tg3 *tp;
8220+
8221+
tp = netdev_priv(dev);
8222+
tnapi = &tp->napi[skb_queue_mapping];
8223+
8224+
if (tg3_flag(tp, ENABLE_TSS))
8225+
tnapi++;
8226+
8227+
tw32_tx_mbox(tnapi->prodmbox, tnapi->tx_prod);
8228+
}
8229+
8230+
return ret;
8231+
}
8232+
82028233
static void tg3_mac_loopback(struct tg3 *tp, bool enable)
82038234
{
82048235
if (enable) {
@@ -17729,7 +17760,7 @@ static int tg3_init_one(struct pci_dev *pdev,
1772917760
* device behind the EPB cannot support DMA addresses > 40-bit.
1773017761
* On 64-bit systems with IOMMU, use 40-bit dma_mask.
1773117762
* On 64-bit systems without IOMMU, use 64-bit dma_mask and
17732-
* do DMA address check in tg3_start_xmit().
17763+
* do DMA address check in __tg3_start_xmit().
1773317764
*/
1773417765
if (tg3_flag(tp, IS_5788))
1773517766
persist_dma_mask = dma_mask = DMA_BIT_MASK(32);
@@ -18127,7 +18158,8 @@ static void tg3_shutdown(struct pci_dev *pdev)
1812718158
if (netif_running(dev))
1812818159
dev_close(dev);
1812918160

18130-
tg3_power_down(tp);
18161+
if (system_state == SYSTEM_POWER_OFF)
18162+
tg3_power_down(tp);
1813118163

1813218164
rtnl_unlock();
1813318165

drivers/net/ethernet/freescale/enetc/enetc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2769,7 +2769,7 @@ static int enetc_setup_xdp_prog(struct net_device *ndev, struct bpf_prog *prog,
27692769
if (priv->min_num_stack_tx_queues + num_xdp_tx_queues >
27702770
priv->num_tx_rings) {
27712771
NL_SET_ERR_MSG_FMT_MOD(extack,
2772-
"Reserving %d XDP TXQs does not leave a minimum of %d TXQs for network stack (total %d available)",
2772+
"Reserving %d XDP TXQs does not leave a minimum of %d for stack (total %d)",
27732773
num_xdp_tx_queues,
27742774
priv->min_num_stack_tx_queues,
27752775
priv->num_tx_rings);

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,5 @@ int i40e_devlink_create_port(struct i40e_pf *pf)
231231
**/
232232
void i40e_devlink_destroy_port(struct i40e_pf *pf)
233233
{
234-
devlink_port_type_clear(&pf->devlink_port);
235234
devlink_port_unregister(&pf->devlink_port);
236235
}

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14213,8 +14213,7 @@ int i40e_vsi_release(struct i40e_vsi *vsi)
1421314213
}
1421414214
set_bit(__I40E_VSI_RELEASING, vsi->state);
1421514215
uplink_seid = vsi->uplink_seid;
14216-
if (vsi->type == I40E_VSI_MAIN)
14217-
i40e_devlink_destroy_port(pf);
14216+
1421814217
if (vsi->type != I40E_VSI_SRIOV) {
1421914218
if (vsi->netdev_registered) {
1422014219
vsi->netdev_registered = false;
@@ -14228,6 +14227,9 @@ int i40e_vsi_release(struct i40e_vsi *vsi)
1422814227
i40e_vsi_disable_irq(vsi);
1422914228
}
1423014229

14230+
if (vsi->type == I40E_VSI_MAIN)
14231+
i40e_devlink_destroy_port(pf);
14232+
1423114233
spin_lock_bh(&vsi->mac_filter_hash_lock);
1423214234

1423314235
/* clear the sync flag on all filters */
@@ -14402,14 +14404,14 @@ static struct i40e_vsi *i40e_vsi_reinit_setup(struct i40e_vsi *vsi)
1440214404

1440314405
err_rings:
1440414406
i40e_vsi_free_q_vectors(vsi);
14405-
if (vsi->type == I40E_VSI_MAIN)
14406-
i40e_devlink_destroy_port(pf);
1440714407
if (vsi->netdev_registered) {
1440814408
vsi->netdev_registered = false;
1440914409
unregister_netdev(vsi->netdev);
1441014410
free_netdev(vsi->netdev);
1441114411
vsi->netdev = NULL;
1441214412
}
14413+
if (vsi->type == I40E_VSI_MAIN)
14414+
i40e_devlink_destroy_port(pf);
1441314415
i40e_aq_delete_element(&pf->hw, vsi->seid, NULL);
1441414416
err_vsi:
1441514417
i40e_vsi_clear(vsi);

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

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ void ice_lag_move_new_vf_nodes(struct ice_vf *vf)
628628
INIT_LIST_HEAD(&ndlist.node);
629629
rcu_read_lock();
630630
for_each_netdev_in_bond_rcu(lag->upper_netdev, tmp_nd) {
631-
nl = kzalloc(sizeof(*nl), GFP_KERNEL);
631+
nl = kzalloc(sizeof(*nl), GFP_ATOMIC);
632632
if (!nl)
633633
break;
634634

@@ -1555,18 +1555,12 @@ static void ice_lag_chk_disabled_bond(struct ice_lag *lag, void *ptr)
15551555
*/
15561556
static void ice_lag_disable_sriov_bond(struct ice_lag *lag)
15571557
{
1558-
struct ice_lag_netdev_list *entry;
15591558
struct ice_netdev_priv *np;
1560-
struct net_device *netdev;
15611559
struct ice_pf *pf;
15621560

1563-
list_for_each_entry(entry, lag->netdev_head, node) {
1564-
netdev = entry->netdev;
1565-
np = netdev_priv(netdev);
1566-
pf = np->vsi->back;
1567-
1568-
ice_clear_feature_support(pf, ICE_F_SRIOV_LAG);
1569-
}
1561+
np = netdev_priv(lag->netdev);
1562+
pf = np->vsi->back;
1563+
ice_clear_feature_support(pf, ICE_F_SRIOV_LAG);
15701564
}
15711565

15721566
/**
@@ -1698,7 +1692,7 @@ ice_lag_event_handler(struct notifier_block *notif_blk, unsigned long event,
16981692

16991693
rcu_read_lock();
17001694
for_each_netdev_in_bond_rcu(upper_netdev, tmp_nd) {
1701-
nd_list = kzalloc(sizeof(*nd_list), GFP_KERNEL);
1695+
nd_list = kzalloc(sizeof(*nd_list), GFP_ATOMIC);
17021696
if (!nd_list)
17031697
break;
17041698

@@ -2075,7 +2069,7 @@ void ice_lag_rebuild(struct ice_pf *pf)
20752069
INIT_LIST_HEAD(&ndlist.node);
20762070
rcu_read_lock();
20772071
for_each_netdev_in_bond_rcu(lag->upper_netdev, tmp_nd) {
2078-
nl = kzalloc(sizeof(*nl), GFP_KERNEL);
2072+
nl = kzalloc(sizeof(*nl), GFP_ATOMIC);
20792073
if (!nl)
20802074
break;
20812075

0 commit comments

Comments
 (0)