Skip to content

Commit 33ea134

Browse files
committed
Merge tag 'net-5.19-final' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from bluetooth and netfilter, no known blockers for the release. Current release - regressions: - wifi: mac80211: do not abuse fq.lock in ieee80211_do_stop(), fix taking the lock before its initialized - Bluetooth: mgmt: fix double free on error path Current release - new code bugs: - eth: ice: fix tunnel checksum offload with fragmented traffic Previous releases - regressions: - tcp: md5: fix IPv4-mapped support after refactoring, don't take the pure v6 path - Revert "tcp: change pingpong threshold to 3", improving detection of interactive sessions - mld: fix netdev refcount leak in mld_{query | report}_work() due to a race - Bluetooth: - always set event mask on suspend, avoid early wake ups - L2CAP: fix use-after-free caused by l2cap_chan_put - bridge: do not send empty IFLA_AF_SPEC attribute Previous releases - always broken: - ping6: fix memleak in ipv6_renew_options() - sctp: prevent null-deref caused by over-eager error paths - virtio-net: fix the race between refill work and close, resulting in NAPI scheduled after close and a BUG() - macsec: - fix three netlink parsing bugs - avoid breaking the device state on invalid change requests - fix a memleak in another error path Misc: - dt-bindings: net: ethernet-controller: rework 'fixed-link' schema - two more batches of sysctl data race adornment" * tag 'net-5.19-final' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (67 commits) stmmac: dwmac-mediatek: fix resource leak in probe ipv6/addrconf: fix a null-ptr-deref bug for ip6_ptr net: ping6: Fix memleak in ipv6_renew_options(). net/funeth: Fix fun_xdp_tx() and XDP packet reclaim sctp: leave the err path free in sctp_stream_init to sctp_stream_free sfc: disable softirqs for ptp TX ptp: ocp: Select CRC16 in the Kconfig. tcp: md5: fix IPv4-mapped support virtio-net: fix the race between refill work and close mptcp: Do not return EINPROGRESS when subflow creation succeeds Bluetooth: L2CAP: Fix use-after-free caused by l2cap_chan_put Bluetooth: Always set event mask on suspend Bluetooth: mgmt: Fix double free on error path wifi: mac80211: do not abuse fq.lock in ieee80211_do_stop() 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 netfilter: nft_queue: only allow supported familes and hooks ...
2 parents e64ab2d + 4d3d3a1 commit 33ea134

Some content is hidden

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

56 files changed

+481
-321
lines changed

Documentation/devicetree/bindings/net/ethernet-controller.yaml

Lines changed: 59 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -167,70 +167,65 @@ properties:
167167
- in-band-status
168168

169169
fixed-link:
170-
allOf:
171-
- if:
172-
type: array
173-
then:
174-
deprecated: true
175-
items:
176-
- minimum: 0
177-
maximum: 31
178-
description:
179-
Emulated PHY ID, choose any but unique to the all
180-
specified fixed-links
181-
182-
- enum: [0, 1]
183-
description:
184-
Duplex configuration. 0 for half duplex or 1 for
185-
full duplex
186-
187-
- enum: [10, 100, 1000, 2500, 10000]
188-
description:
189-
Link speed in Mbits/sec.
190-
191-
- enum: [0, 1]
192-
description:
193-
Pause configuration. 0 for no pause, 1 for pause
194-
195-
- enum: [0, 1]
196-
description:
197-
Asymmetric pause configuration. 0 for no asymmetric
198-
pause, 1 for asymmetric pause
199-
200-
201-
- if:
202-
type: object
203-
then:
204-
properties:
205-
speed:
206-
description:
207-
Link speed.
208-
$ref: /schemas/types.yaml#/definitions/uint32
209-
enum: [10, 100, 1000, 2500, 10000]
210-
211-
full-duplex:
212-
$ref: /schemas/types.yaml#/definitions/flag
213-
description:
214-
Indicates that full-duplex is used. When absent, half
215-
duplex is assumed.
216-
217-
pause:
218-
$ref: /schemas/types.yaml#definitions/flag
219-
description:
220-
Indicates that pause should be enabled.
221-
222-
asym-pause:
223-
$ref: /schemas/types.yaml#/definitions/flag
224-
description:
225-
Indicates that asym_pause should be enabled.
226-
227-
link-gpios:
228-
maxItems: 1
229-
description:
230-
GPIO to determine if the link is up
231-
232-
required:
233-
- speed
170+
oneOf:
171+
- $ref: /schemas/types.yaml#/definitions/uint32-array
172+
deprecated: true
173+
items:
174+
- minimum: 0
175+
maximum: 31
176+
description:
177+
Emulated PHY ID, choose any but unique to the all
178+
specified fixed-links
179+
180+
- enum: [0, 1]
181+
description:
182+
Duplex configuration. 0 for half duplex or 1 for
183+
full duplex
184+
185+
- enum: [10, 100, 1000, 2500, 10000]
186+
description:
187+
Link speed in Mbits/sec.
188+
189+
- enum: [0, 1]
190+
description:
191+
Pause configuration. 0 for no pause, 1 for pause
192+
193+
- enum: [0, 1]
194+
description:
195+
Asymmetric pause configuration. 0 for no asymmetric
196+
pause, 1 for asymmetric pause
197+
- type: object
198+
additionalProperties: false
199+
properties:
200+
speed:
201+
description:
202+
Link speed.
203+
$ref: /schemas/types.yaml#/definitions/uint32
204+
enum: [10, 100, 1000, 2500, 10000]
205+
206+
full-duplex:
207+
$ref: /schemas/types.yaml#/definitions/flag
208+
description:
209+
Indicates that full-duplex is used. When absent, half
210+
duplex is assumed.
211+
212+
pause:
213+
$ref: /schemas/types.yaml#definitions/flag
214+
description:
215+
Indicates that pause should be enabled.
216+
217+
asym-pause:
218+
$ref: /schemas/types.yaml#/definitions/flag
219+
description:
220+
Indicates that asym_pause should be enabled.
221+
222+
link-gpios:
223+
maxItems: 1
224+
description:
225+
GPIO to determine if the link is up
226+
227+
required:
228+
- speed
234229

235230
additionalProperties: true
236231

Documentation/devicetree/bindings/net/fsl,fec.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ properties:
183183
Should specify the gpio for phy reset.
184184

185185
phy-reset-duration:
186+
$ref: /schemas/types.yaml#/definitions/uint32
186187
deprecated: true
187188
description:
188189
Reset duration in milliseconds. Should present only if property
@@ -191,12 +192,14 @@ properties:
191192
and 1 millisecond will be used instead.
192193

193194
phy-reset-active-high:
195+
type: boolean
194196
deprecated: true
195197
description:
196198
If present then the reset sequence using the GPIO specified in the
197199
"phy-reset-gpios" property is reversed (H=reset state, L=operation state).
198200

199201
phy-reset-post-delay:
202+
$ref: /schemas/types.yaml#/definitions/uint32
200203
deprecated: true
201204
description:
202205
Post reset delay in milliseconds. If present then a delay of phy-reset-post-delay

Documentation/networking/ip-sysctl.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2866,7 +2866,14 @@ sctp_rmem - vector of 3 INTEGERs: min, default, max
28662866
Default: 4K
28672867

28682868
sctp_wmem - vector of 3 INTEGERs: min, default, max
2869-
Currently this tunable has no effect.
2869+
Only the first value ("min") is used, "default" and "max" are
2870+
ignored.
2871+
2872+
min: Minimum size of send buffer that can be used by SCTP sockets.
2873+
It is guaranteed to each SCTP socket (but not association) even
2874+
under moderate memory pressure.
2875+
2876+
Default: 4K
28702877

28712878
addr_scope_policy - INTEGER
28722879
Control IPv4 address scoping - draft-stewart-tsvwg-sctp-ipv4-00

drivers/net/ethernet/fungible/funeth/funeth_rx.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ static void *fun_run_xdp(struct funeth_rxq *q, skb_frag_t *frags, void *buf_va,
142142
int ref_ok, struct funeth_txq *xdp_q)
143143
{
144144
struct bpf_prog *xdp_prog;
145+
struct xdp_frame *xdpf;
145146
struct xdp_buff xdp;
146147
u32 act;
147148

@@ -163,7 +164,9 @@ static void *fun_run_xdp(struct funeth_rxq *q, skb_frag_t *frags, void *buf_va,
163164
case XDP_TX:
164165
if (unlikely(!ref_ok))
165166
goto pass;
166-
if (!fun_xdp_tx(xdp_q, xdp.data, xdp.data_end - xdp.data))
167+
168+
xdpf = xdp_convert_buff_to_frame(&xdp);
169+
if (!xdpf || !fun_xdp_tx(xdp_q, xdpf))
167170
goto xdp_error;
168171
FUN_QSTAT_INC(q, xdp_tx);
169172
q->xdp_flush |= FUN_XDP_FLUSH_TX;

drivers/net/ethernet/fungible/funeth/funeth_tx.c

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ static unsigned int fun_xdpq_clean(struct funeth_txq *q, unsigned int budget)
466466

467467
do {
468468
fun_xdp_unmap(q, reclaim_idx);
469-
page_frag_free(q->info[reclaim_idx].vaddr);
469+
xdp_return_frame(q->info[reclaim_idx].xdpf);
470470

471471
trace_funeth_tx_free(q, reclaim_idx, 1, head);
472472

@@ -479,11 +479,11 @@ static unsigned int fun_xdpq_clean(struct funeth_txq *q, unsigned int budget)
479479
return npkts;
480480
}
481481

482-
bool fun_xdp_tx(struct funeth_txq *q, void *data, unsigned int len)
482+
bool fun_xdp_tx(struct funeth_txq *q, struct xdp_frame *xdpf)
483483
{
484484
struct fun_eth_tx_req *req;
485485
struct fun_dataop_gl *gle;
486-
unsigned int idx;
486+
unsigned int idx, len;
487487
dma_addr_t dma;
488488

489489
if (fun_txq_avail(q) < FUN_XDP_CLEAN_THRES)
@@ -494,7 +494,8 @@ bool fun_xdp_tx(struct funeth_txq *q, void *data, unsigned int len)
494494
return false;
495495
}
496496

497-
dma = dma_map_single(q->dma_dev, data, len, DMA_TO_DEVICE);
497+
len = xdpf->len;
498+
dma = dma_map_single(q->dma_dev, xdpf->data, len, DMA_TO_DEVICE);
498499
if (unlikely(dma_mapping_error(q->dma_dev, dma))) {
499500
FUN_QSTAT_INC(q, tx_map_err);
500501
return false;
@@ -514,7 +515,7 @@ bool fun_xdp_tx(struct funeth_txq *q, void *data, unsigned int len)
514515
gle = (struct fun_dataop_gl *)req->dataop.imm;
515516
fun_dataop_gl_init(gle, 0, 0, len, dma);
516517

517-
q->info[idx].vaddr = data;
518+
q->info[idx].xdpf = xdpf;
518519

519520
u64_stats_update_begin(&q->syncp);
520521
q->stats.tx_bytes += len;
@@ -545,12 +546,9 @@ int fun_xdp_xmit_frames(struct net_device *dev, int n,
545546
if (unlikely(q_idx >= fp->num_xdpqs))
546547
return -ENXIO;
547548

548-
for (q = xdpqs[q_idx], i = 0; i < n; i++) {
549-
const struct xdp_frame *xdpf = frames[i];
550-
551-
if (!fun_xdp_tx(q, xdpf->data, xdpf->len))
549+
for (q = xdpqs[q_idx], i = 0; i < n; i++)
550+
if (!fun_xdp_tx(q, frames[i]))
552551
break;
553-
}
554552

555553
if (unlikely(flags & XDP_XMIT_FLUSH))
556554
fun_txq_wr_db(q);
@@ -577,7 +575,7 @@ static void fun_xdpq_purge(struct funeth_txq *q)
577575
unsigned int idx = q->cons_cnt & q->mask;
578576

579577
fun_xdp_unmap(q, idx);
580-
page_frag_free(q->info[idx].vaddr);
578+
xdp_return_frame(q->info[idx].xdpf);
581579
q->cons_cnt++;
582580
}
583581
}

drivers/net/ethernet/fungible/funeth/funeth_txrx.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ struct funeth_txq_stats { /* per Tx queue SW counters */
9595

9696
struct funeth_tx_info { /* per Tx descriptor state */
9797
union {
98-
struct sk_buff *skb; /* associated packet */
99-
void *vaddr; /* start address for XDP */
98+
struct sk_buff *skb; /* associated packet (sk_buff path) */
99+
struct xdp_frame *xdpf; /* associated XDP frame (XDP path) */
100100
};
101101
};
102102

@@ -245,7 +245,7 @@ static inline int fun_irq_node(const struct fun_irq *p)
245245
int fun_rxq_napi_poll(struct napi_struct *napi, int budget);
246246
int fun_txq_napi_poll(struct napi_struct *napi, int budget);
247247
netdev_tx_t fun_start_xmit(struct sk_buff *skb, struct net_device *netdev);
248-
bool fun_xdp_tx(struct funeth_txq *q, void *data, unsigned int len);
248+
bool fun_xdp_tx(struct funeth_txq *q, struct xdp_frame *xdpf);
249249
int fun_xdp_xmit_frames(struct net_device *dev, int n,
250250
struct xdp_frame **frames, u32 flags);
251251

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1925,11 +1925,15 @@ static void i40e_vsi_setup_queue_map(struct i40e_vsi *vsi,
19251925
* non-zero req_queue_pairs says that user requested a new
19261926
* queue count via ethtool's set_channels, so use this
19271927
* value for queues distribution across traffic classes
1928+
* We need at least one queue pair for the interface
1929+
* to be usable as we see in else statement.
19281930
*/
19291931
if (vsi->req_queue_pairs > 0)
19301932
vsi->num_queue_pairs = vsi->req_queue_pairs;
19311933
else if (pf->flags & I40E_FLAG_MSIX_ENABLED)
19321934
vsi->num_queue_pairs = pf->num_lan_msix;
1935+
else
1936+
vsi->num_queue_pairs = 1;
19331937
}
19341938

19351939
/* Number of queues per enabled TC */

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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 7 additions & 3 deletions
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

Lines changed: 0 additions & 40 deletions
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

0 commit comments

Comments
 (0)