Skip to content

Commit 6843306

Browse files
committed
Merge tag 'net-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from bluetooth, bpf and wireguard. Current release - regressions: - nvme-tcp: fix comma-related oops after sendpage changes Current release - new code bugs: - ptp: make max_phase_adjustment sysfs device attribute invisible when not supported Previous releases - regressions: - sctp: fix potential deadlock on &net->sctp.addr_wq_lock - mptcp: - ensure subflow is unhashed before cleaning the backlog - do not rely on implicit state check in mptcp_listen() Previous releases - always broken: - net: fix net_dev_start_xmit trace event vs skb_transport_offset() - Bluetooth: - fix use-bdaddr-property quirk - L2CAP: fix multiple UaFs - ISO: use hci_sync for setting CIG parameters - hci_event: fix Set CIG Parameters error status handling - hci_event: fix parsing of CIS Established Event - MGMT: fix marking SCAN_RSP as not connectable - wireguard: queuing: use saner cpu selection wrapping - sched: act_ipt: various bug fixes for iptables <> TC interactions - sched: act_pedit: add size check for TCA_PEDIT_PARMS_EX - dsa: fixes for receiving PTP packets with 8021q and sja1105 tagging - eth: sfc: fix null-deref in devlink port without MAE access - eth: ibmvnic: do not reset dql stats on NON_FATAL err Misc: - xsk: honor SO_BINDTODEVICE on bind" * tag 'net-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (70 commits) nfp: clean mc addresses in application firmware when closing port selftests: mptcp: pm_nl_ctl: fix 32-bit support selftests: mptcp: depend on SYN_COOKIES selftests: mptcp: userspace_pm: report errors with 'remove' tests selftests: mptcp: userspace_pm: use correct server port selftests: mptcp: sockopt: return error if wrong mark selftests: mptcp: sockopt: use 'iptables-legacy' if available selftests: mptcp: connect: fail if nft supposed to work mptcp: do not rely on implicit state check in mptcp_listen() mptcp: ensure subflow is unhashed before cleaning the backlog s390/qeth: Fix vipa deletion octeontx-af: fix hardware timestamp configuration net: dsa: sja1105: always enable the send_meta options net: dsa: tag_sja1105: fix MAC DA patching from meta frames net: Replace strlcpy with strscpy pptp: Fix fib lookup calls. mlxsw: spectrum_router: Fix an IS_ERR() vs NULL check net/sched: act_pedit: Add size check for TCA_PEDIT_PARMS_EX xsk: Honor SO_BINDTODEVICE on bind ptp: Make max_phase_adjustment sysfs device attribute invisible when not supported ...
2 parents 73a3fcd + cc7eab2 commit 6843306

Some content is hidden

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

80 files changed

+640
-330
lines changed

Documentation/ABI/testing/sysfs-class-net-qmi

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Description:
6262
What: /sys/class/net/<iface>/qmi/pass_through
6363
Date: January 2021
6464
KernelVersion: 5.12
65-
Contact: Subash Abhinov Kasiviswanathan <[email protected]>
65+
Contact: Subash Abhinov Kasiviswanathan <[email protected]>
6666
Description:
6767
Boolean. Default: 'N'
6868

Documentation/networking/af_xdp.rst

+9
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,15 @@ start N bytes into the buffer leaving the first N bytes for the
433433
application to use. The final option is the flags field, but it will
434434
be dealt with in separate sections for each UMEM flag.
435435

436+
SO_BINDTODEVICE setsockopt
437+
--------------------------
438+
439+
This is a generic SOL_SOCKET option that can be used to tie AF_XDP
440+
socket to a particular network interface. It is useful when a socket
441+
is created by a privileged process and passed to a non-privileged one.
442+
Once the option is set, kernel will refuse attempts to bind that socket
443+
to a different interface. Updating the value requires CAP_NET_RAW.
444+
436445
XDP_STATISTICS getsockopt
437446
-------------------------
438447

Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst

+3-4
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,7 @@ MAP header|IP Packet|Optional padding|MAP header|Command Packet|Optional pad...
190190
3. Userspace configuration
191191
==========================
192192

193-
rmnet userspace configuration is done through netlink library librmnetctl
194-
and command line utility rmnetcli. Utility is hosted in codeaurora forum git.
195-
The driver uses rtnl_link_ops for communication.
193+
rmnet userspace configuration is done through netlink using iproute2
194+
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/
196195

197-
https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/dataservices/tree/rmnetctl
196+
The driver uses rtnl_link_ops for communication.

Documentation/process/maintainer-netdev.rst

+5-2
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,11 @@ themselves. No email should ever be sent to the list with the main purpose
149149
of communicating with the bot, the bot commands should be seen as metadata.
150150

151151
The use of the bot is restricted to authors of the patches (the ``From:``
152-
header on patch submission and command must match!), maintainers themselves
153-
and a handful of senior reviewers. Bot records its activity here:
152+
header on patch submission and command must match!), maintainers of
153+
the modified code according to the MAINTAINERS file (again, ``From:``
154+
must match the MAINTAINERS entry) and a handful of senior reviewers.
155+
156+
Bot records its activity here:
154157

155158
https://patchwork.hopto.org/pw-bot.html
156159

drivers/bluetooth/btqca.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
637637
snprintf(config.fwname, sizeof(config.fwname),
638638
"qca/%s", firmware_name);
639639
else if (qca_is_wcn399x(soc_type)) {
640-
if (ver.soc_id == QCA_WCN3991_SOC_ID) {
640+
if (le32_to_cpu(ver.soc_id) == QCA_WCN3991_SOC_ID) {
641641
snprintf(config.fwname, sizeof(config.fwname),
642642
"qca/crnv%02xu.bin", rom_ver);
643643
} else {

drivers/bluetooth/btrtl.c

+16-2
Original file line numberDiff line numberDiff line change
@@ -1367,14 +1367,30 @@ MODULE_FIRMWARE("rtl_bt/rtl8723cs_vf_fw.bin");
13671367
MODULE_FIRMWARE("rtl_bt/rtl8723cs_vf_config.bin");
13681368
MODULE_FIRMWARE("rtl_bt/rtl8723cs_xx_fw.bin");
13691369
MODULE_FIRMWARE("rtl_bt/rtl8723cs_xx_config.bin");
1370+
MODULE_FIRMWARE("rtl_bt/rtl8723d_fw.bin");
1371+
MODULE_FIRMWARE("rtl_bt/rtl8723d_config.bin");
13701372
MODULE_FIRMWARE("rtl_bt/rtl8723ds_fw.bin");
13711373
MODULE_FIRMWARE("rtl_bt/rtl8723ds_config.bin");
13721374
MODULE_FIRMWARE("rtl_bt/rtl8761a_fw.bin");
13731375
MODULE_FIRMWARE("rtl_bt/rtl8761a_config.bin");
1376+
MODULE_FIRMWARE("rtl_bt/rtl8761b_fw.bin");
1377+
MODULE_FIRMWARE("rtl_bt/rtl8761b_config.bin");
1378+
MODULE_FIRMWARE("rtl_bt/rtl8761bu_fw.bin");
1379+
MODULE_FIRMWARE("rtl_bt/rtl8761bu_config.bin");
13741380
MODULE_FIRMWARE("rtl_bt/rtl8821a_fw.bin");
13751381
MODULE_FIRMWARE("rtl_bt/rtl8821a_config.bin");
1382+
MODULE_FIRMWARE("rtl_bt/rtl8821c_fw.bin");
1383+
MODULE_FIRMWARE("rtl_bt/rtl8821c_config.bin");
1384+
MODULE_FIRMWARE("rtl_bt/rtl8821cs_fw.bin");
1385+
MODULE_FIRMWARE("rtl_bt/rtl8821cs_config.bin");
13761386
MODULE_FIRMWARE("rtl_bt/rtl8822b_fw.bin");
13771387
MODULE_FIRMWARE("rtl_bt/rtl8822b_config.bin");
1388+
MODULE_FIRMWARE("rtl_bt/rtl8822cs_fw.bin");
1389+
MODULE_FIRMWARE("rtl_bt/rtl8822cs_config.bin");
1390+
MODULE_FIRMWARE("rtl_bt/rtl8822cu_fw.bin");
1391+
MODULE_FIRMWARE("rtl_bt/rtl8822cu_config.bin");
1392+
MODULE_FIRMWARE("rtl_bt/rtl8851bu_fw.bin");
1393+
MODULE_FIRMWARE("rtl_bt/rtl8851bu_config.bin");
13781394
MODULE_FIRMWARE("rtl_bt/rtl8852au_fw.bin");
13791395
MODULE_FIRMWARE("rtl_bt/rtl8852au_config.bin");
13801396
MODULE_FIRMWARE("rtl_bt/rtl8852bs_fw.bin");
@@ -1383,5 +1399,3 @@ MODULE_FIRMWARE("rtl_bt/rtl8852bu_fw.bin");
13831399
MODULE_FIRMWARE("rtl_bt/rtl8852bu_config.bin");
13841400
MODULE_FIRMWARE("rtl_bt/rtl8852cu_fw.bin");
13851401
MODULE_FIRMWARE("rtl_bt/rtl8852cu_config.bin");
1386-
MODULE_FIRMWARE("rtl_bt/rtl8851bu_fw.bin");
1387-
MODULE_FIRMWARE("rtl_bt/rtl8851bu_config.bin");

drivers/bluetooth/btusb.c

+5
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,9 @@ static const struct usb_device_id blacklist_table[] = {
613613
{ USB_DEVICE(0x0489, 0xe0d9), .driver_info = BTUSB_MEDIATEK |
614614
BTUSB_WIDEBAND_SPEECH |
615615
BTUSB_VALID_LE_STATES },
616+
{ USB_DEVICE(0x0489, 0xe0f5), .driver_info = BTUSB_MEDIATEK |
617+
BTUSB_WIDEBAND_SPEECH |
618+
BTUSB_VALID_LE_STATES },
616619
{ USB_DEVICE(0x13d3, 0x3568), .driver_info = BTUSB_MEDIATEK |
617620
BTUSB_WIDEBAND_SPEECH |
618621
BTUSB_VALID_LE_STATES },
@@ -655,6 +658,8 @@ static const struct usb_device_id blacklist_table[] = {
655658
BTUSB_WIDEBAND_SPEECH },
656659
{ USB_DEVICE(0x0bda, 0x8771), .driver_info = BTUSB_REALTEK |
657660
BTUSB_WIDEBAND_SPEECH },
661+
{ USB_DEVICE(0x6655, 0x8771), .driver_info = BTUSB_REALTEK |
662+
BTUSB_WIDEBAND_SPEECH },
658663
{ USB_DEVICE(0x7392, 0xc611), .driver_info = BTUSB_REALTEK |
659664
BTUSB_WIDEBAND_SPEECH },
660665
{ USB_DEVICE(0x2b89, 0x8761), .driver_info = BTUSB_REALTEK |

drivers/bluetooth/hci_bcm.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,8 @@ static int bcm_setup(struct hci_uart *hu)
643643
* Allow the bootloader to set a valid address through the
644644
* device tree.
645645
*/
646-
set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hu->hdev->quirks);
646+
if (test_bit(HCI_QUIRK_INVALID_BDADDR, &hu->hdev->quirks))
647+
set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hu->hdev->quirks);
647648

648649
if (!bcm_request_irq(bcm))
649650
err = bcm_setup_sleep(hu);

drivers/net/dsa/ocelot/felix.c

+12
Original file line numberDiff line numberDiff line change
@@ -1725,6 +1725,18 @@ static bool felix_rxtstamp(struct dsa_switch *ds, int port,
17251725
u32 tstamp_hi;
17261726
u64 tstamp;
17271727

1728+
switch (type & PTP_CLASS_PMASK) {
1729+
case PTP_CLASS_L2:
1730+
if (!(ocelot->ports[port]->trap_proto & OCELOT_PROTO_PTP_L2))
1731+
return false;
1732+
break;
1733+
case PTP_CLASS_IPV4:
1734+
case PTP_CLASS_IPV6:
1735+
if (!(ocelot->ports[port]->trap_proto & OCELOT_PROTO_PTP_L4))
1736+
return false;
1737+
break;
1738+
}
1739+
17281740
/* If the "no XTR IRQ" workaround is in use, tell DSA to defer this skb
17291741
* for RX timestamping. Then free it, and poll for its copy through
17301742
* MMIO in the CPU port module, and inject that into the stack from

drivers/net/dsa/sja1105/sja1105.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ struct sja1105_private {
252252
unsigned long ucast_egress_floods;
253253
unsigned long bcast_egress_floods;
254254
unsigned long hwts_tx_en;
255+
unsigned long hwts_rx_en;
255256
const struct sja1105_info *info;
256257
size_t max_xfer_len;
257258
struct spi_device *spidev;
@@ -289,7 +290,6 @@ struct sja1105_spi_message {
289290
/* From sja1105_main.c */
290291
enum sja1105_reset_reason {
291292
SJA1105_VLAN_FILTERING = 0,
292-
SJA1105_RX_HWTSTAMPING,
293293
SJA1105_AGEING_TIME,
294294
SJA1105_SCHEDULING,
295295
SJA1105_BEST_EFFORT_POLICING,

drivers/net/dsa/sja1105/sja1105_main.c

+4-10
Original file line numberDiff line numberDiff line change
@@ -866,12 +866,12 @@ static int sja1105_init_general_params(struct sja1105_private *priv)
866866
.hostprio = 7,
867867
.mac_fltres1 = SJA1105_LINKLOCAL_FILTER_A,
868868
.mac_flt1 = SJA1105_LINKLOCAL_FILTER_A_MASK,
869-
.incl_srcpt1 = false,
870-
.send_meta1 = false,
869+
.incl_srcpt1 = true,
870+
.send_meta1 = true,
871871
.mac_fltres0 = SJA1105_LINKLOCAL_FILTER_B,
872872
.mac_flt0 = SJA1105_LINKLOCAL_FILTER_B_MASK,
873-
.incl_srcpt0 = false,
874-
.send_meta0 = false,
873+
.incl_srcpt0 = true,
874+
.send_meta0 = true,
875875
/* Default to an invalid value */
876876
.mirr_port = priv->ds->num_ports,
877877
/* No TTEthernet */
@@ -2215,7 +2215,6 @@ static int sja1105_reload_cbs(struct sja1105_private *priv)
22152215

22162216
static const char * const sja1105_reset_reasons[] = {
22172217
[SJA1105_VLAN_FILTERING] = "VLAN filtering",
2218-
[SJA1105_RX_HWTSTAMPING] = "RX timestamping",
22192218
[SJA1105_AGEING_TIME] = "Ageing time",
22202219
[SJA1105_SCHEDULING] = "Time-aware scheduling",
22212220
[SJA1105_BEST_EFFORT_POLICING] = "Best-effort policing",
@@ -2405,11 +2404,6 @@ int sja1105_vlan_filtering(struct dsa_switch *ds, int port, bool enabled,
24052404
general_params->tpid = tpid;
24062405
/* EtherType used to identify outer tagged (S-tag) VLAN traffic */
24072406
general_params->tpid2 = tpid2;
2408-
/* When VLAN filtering is on, we need to at least be able to
2409-
* decode management traffic through the "backup plan".
2410-
*/
2411-
general_params->incl_srcpt1 = enabled;
2412-
general_params->incl_srcpt0 = enabled;
24132407

24142408
for (port = 0; port < ds->num_ports; port++) {
24152409
if (dsa_is_unused_port(ds, port))

drivers/net/dsa/sja1105/sja1105_ptp.c

+4-44
Original file line numberDiff line numberDiff line change
@@ -58,35 +58,10 @@ enum sja1105_ptp_clk_mode {
5858
#define ptp_data_to_sja1105(d) \
5959
container_of((d), struct sja1105_private, ptp_data)
6060

61-
/* Must be called only while the RX timestamping state of the tagger
62-
* is turned off
63-
*/
64-
static int sja1105_change_rxtstamping(struct sja1105_private *priv,
65-
bool on)
66-
{
67-
struct sja1105_ptp_data *ptp_data = &priv->ptp_data;
68-
struct sja1105_general_params_entry *general_params;
69-
struct sja1105_table *table;
70-
71-
table = &priv->static_config.tables[BLK_IDX_GENERAL_PARAMS];
72-
general_params = table->entries;
73-
general_params->send_meta1 = on;
74-
general_params->send_meta0 = on;
75-
76-
ptp_cancel_worker_sync(ptp_data->clock);
77-
skb_queue_purge(&ptp_data->skb_txtstamp_queue);
78-
skb_queue_purge(&ptp_data->skb_rxtstamp_queue);
79-
80-
return sja1105_static_config_reload(priv, SJA1105_RX_HWTSTAMPING);
81-
}
82-
8361
int sja1105_hwtstamp_set(struct dsa_switch *ds, int port, struct ifreq *ifr)
8462
{
85-
struct sja1105_tagger_data *tagger_data = sja1105_tagger_data(ds);
8663
struct sja1105_private *priv = ds->priv;
8764
struct hwtstamp_config config;
88-
bool rx_on;
89-
int rc;
9065

9166
if (copy_from_user(&config, ifr->ifr_data, sizeof(config)))
9267
return -EFAULT;
@@ -104,34 +79,20 @@ int sja1105_hwtstamp_set(struct dsa_switch *ds, int port, struct ifreq *ifr)
10479

10580
switch (config.rx_filter) {
10681
case HWTSTAMP_FILTER_NONE:
107-
rx_on = false;
82+
priv->hwts_rx_en &= ~BIT(port);
10883
break;
10984
default:
110-
rx_on = true;
85+
priv->hwts_rx_en |= BIT(port);
11186
break;
11287
}
11388

114-
if (rx_on != tagger_data->rxtstamp_get_state(ds)) {
115-
tagger_data->rxtstamp_set_state(ds, false);
116-
117-
rc = sja1105_change_rxtstamping(priv, rx_on);
118-
if (rc < 0) {
119-
dev_err(ds->dev,
120-
"Failed to change RX timestamping: %d\n", rc);
121-
return rc;
122-
}
123-
if (rx_on)
124-
tagger_data->rxtstamp_set_state(ds, true);
125-
}
126-
12789
if (copy_to_user(ifr->ifr_data, &config, sizeof(config)))
12890
return -EFAULT;
12991
return 0;
13092
}
13193

13294
int sja1105_hwtstamp_get(struct dsa_switch *ds, int port, struct ifreq *ifr)
13395
{
134-
struct sja1105_tagger_data *tagger_data = sja1105_tagger_data(ds);
13596
struct sja1105_private *priv = ds->priv;
13697
struct hwtstamp_config config;
13798

@@ -140,7 +101,7 @@ int sja1105_hwtstamp_get(struct dsa_switch *ds, int port, struct ifreq *ifr)
140101
config.tx_type = HWTSTAMP_TX_ON;
141102
else
142103
config.tx_type = HWTSTAMP_TX_OFF;
143-
if (tagger_data->rxtstamp_get_state(ds))
104+
if (priv->hwts_rx_en & BIT(port))
144105
config.rx_filter = HWTSTAMP_FILTER_PTP_V2_L2_EVENT;
145106
else
146107
config.rx_filter = HWTSTAMP_FILTER_NONE;
@@ -413,11 +374,10 @@ static long sja1105_rxtstamp_work(struct ptp_clock_info *ptp)
413374

414375
bool sja1105_rxtstamp(struct dsa_switch *ds, int port, struct sk_buff *skb)
415376
{
416-
struct sja1105_tagger_data *tagger_data = sja1105_tagger_data(ds);
417377
struct sja1105_private *priv = ds->priv;
418378
struct sja1105_ptp_data *ptp_data = &priv->ptp_data;
419379

420-
if (!tagger_data->rxtstamp_get_state(ds))
380+
if (!(priv->hwts_rx_en & BIT(port)))
421381
return false;
422382

423383
/* We need to read the full PTP clock to reconstruct the Rx

drivers/net/dsa/vitesse-vsc73xx-core.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1025,17 +1025,17 @@ static int vsc73xx_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
10251025
struct vsc73xx *vsc = ds->priv;
10261026

10271027
return vsc73xx_write(vsc, VSC73XX_BLOCK_MAC, port,
1028-
VSC73XX_MAXLEN, new_mtu);
1028+
VSC73XX_MAXLEN, new_mtu + ETH_HLEN + ETH_FCS_LEN);
10291029
}
10301030

10311031
/* According to application not "VSC7398 Jumbo Frames" setting
1032-
* up the MTU to 9.6 KB does not affect the performance on standard
1032+
* up the frame size to 9.6 KB does not affect the performance on standard
10331033
* frames. It is clear from the application note that
10341034
* "9.6 kilobytes" == 9600 bytes.
10351035
*/
10361036
static int vsc73xx_get_max_mtu(struct dsa_switch *ds, int port)
10371037
{
1038-
return 9600;
1038+
return 9600 - ETH_HLEN - ETH_FCS_LEN;
10391039
}
10401040

10411041
static const struct dsa_switch_ops vsc73xx_ds_ops = {

drivers/net/ethernet/broadcom/tg3.c

+1
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ MODULE_AUTHOR("David S. Miller ([email protected]) and Jeff Garzik (jgarzik@pobox
225225
MODULE_DESCRIPTION("Broadcom Tigon3 ethernet driver");
226226
MODULE_LICENSE("GPL");
227227
MODULE_FIRMWARE(FIRMWARE_TG3);
228+
MODULE_FIRMWARE(FIRMWARE_TG357766);
228229
MODULE_FIRMWARE(FIRMWARE_TG3TSO);
229230
MODULE_FIRMWARE(FIRMWARE_TG3TSO5);
230231

drivers/net/ethernet/ibm/ibmvnic.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -1816,7 +1816,14 @@ static int __ibmvnic_open(struct net_device *netdev)
18161816
if (prev_state == VNIC_CLOSED)
18171817
enable_irq(adapter->tx_scrq[i]->irq);
18181818
enable_scrq_irq(adapter, adapter->tx_scrq[i]);
1819-
netdev_tx_reset_queue(netdev_get_tx_queue(netdev, i));
1819+
/* netdev_tx_reset_queue will reset dql stats. During NON_FATAL
1820+
* resets, don't reset the stats because there could be batched
1821+
* skb's waiting to be sent. If we reset dql stats, we risk
1822+
* num_completed being greater than num_queued. This will cause
1823+
* a BUG_ON in dql_completed().
1824+
*/
1825+
if (adapter->reset_reason != VNIC_RESET_NON_FATAL)
1826+
netdev_tx_reset_queue(netdev_get_tx_queue(netdev, i));
18201827
}
18211828

18221829
rc = set_link_state(adapter, IBMVNIC_LOGICAL_LNK_UP);

0 commit comments

Comments
 (0)