Skip to content

Commit 023b1e9

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Merge in late fixes to prepare for the 6.15 net-next PR. No conflicts, adjacent changes: drivers/net/ethernet/broadcom/bnxt/bnxt.c 919f9f4 ("eth: bnxt: fix out-of-range access of vnic_info array") fe96d71 ("bnxt_en: Extend queue stop/start for TX rings") Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 705094f + 70facbf commit 023b1e9

File tree

42 files changed

+356
-498
lines changed

Some content is hidden

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

42 files changed

+356
-498
lines changed

CREDITS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3233,6 +3233,10 @@ N: Rui Prior
32333233
32343234
D: ATM device driver for NICStAR based cards
32353235

3236+
N: Roopa Prabhu
3237+
3238+
D: Bridge co-maintainer, vxlan and networking contributor
3239+
32363240
N: Stefan Probst
32373241
32383242
D: The Linux Support Team Erlangen, 1993-97

MAINTAINERS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8593,12 +8593,14 @@ F: Documentation/networking/devlink/etas_es58x.rst
85938593
F: drivers/net/can/usb/etas_es58x/
85948594

85958595
ETHERNET BRIDGE
8596-
M: Roopa Prabhu <[email protected]>
85978596
M: Nikolay Aleksandrov <[email protected]>
8597+
M: Ido Schimmel <[email protected]>
85988598
85998599
86008600
S: Maintained
86018601
W: http://www.linuxfoundation.org/en/Net:Bridge
8602+
F: include/linux/if_bridge.h
8603+
F: include/uapi/linux/if_bridge.h
86028604
F: include/linux/netfilter_bridge/
86038605
F: net/bridge/
86048606

arch/parisc/include/uapi/asm/socket.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,16 @@
132132
#define SO_PASSPIDFD 0x404A
133133
#define SO_PEERPIDFD 0x404B
134134

135-
#define SO_DEVMEM_LINEAR 78
136-
#define SCM_DEVMEM_LINEAR SO_DEVMEM_LINEAR
137-
#define SO_DEVMEM_DMABUF 79
138-
#define SCM_DEVMEM_DMABUF SO_DEVMEM_DMABUF
139-
#define SO_DEVMEM_DONTNEED 80
140-
141135
#define SCM_TS_OPT_ID 0x404C
142136

143137
#define SO_RCVPRIORITY 0x404D
144138

139+
#define SO_DEVMEM_LINEAR 0x404E
140+
#define SCM_DEVMEM_LINEAR SO_DEVMEM_LINEAR
141+
#define SO_DEVMEM_DMABUF 0x404F
142+
#define SCM_DEVMEM_DMABUF SO_DEVMEM_DMABUF
143+
#define SO_DEVMEM_DONTNEED 0x4050
144+
145145
#if !defined(__KERNEL__)
146146

147147
#if __BITS_PER_LONG == 64

drivers/net/bonding/bond_main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,9 @@ static bool bond_sk_check(struct bonding *bond)
323323
}
324324
}
325325

326-
static bool bond_xdp_check(struct bonding *bond)
326+
bool bond_xdp_check(struct bonding *bond, int mode)
327327
{
328-
switch (BOND_MODE(bond)) {
328+
switch (mode) {
329329
case BOND_MODE_ROUNDROBIN:
330330
case BOND_MODE_ACTIVEBACKUP:
331331
return true;
@@ -1928,7 +1928,7 @@ void bond_xdp_set_features(struct net_device *bond_dev)
19281928

19291929
ASSERT_RTNL();
19301930

1931-
if (!bond_xdp_check(bond) || !bond_has_slaves(bond)) {
1931+
if (!bond_xdp_check(bond, BOND_MODE(bond)) || !bond_has_slaves(bond)) {
19321932
xdp_clear_features_flag(bond_dev);
19331933
return;
19341934
}
@@ -5693,7 +5693,7 @@ static int bond_xdp_set(struct net_device *dev, struct bpf_prog *prog,
56935693

56945694
ASSERT_RTNL();
56955695

5696-
if (!bond_xdp_check(bond)) {
5696+
if (!bond_xdp_check(bond, BOND_MODE(bond))) {
56975697
BOND_NL_ERR(dev, extack,
56985698
"No native XDP support for the current bonding mode");
56995699
return -EOPNOTSUPP;

drivers/net/bonding/bond_options.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,9 @@ static bool bond_set_xfrm_features(struct bonding *bond)
868868
static int bond_option_mode_set(struct bonding *bond,
869869
const struct bond_opt_value *newval)
870870
{
871+
if (bond->xdp_prog && !bond_xdp_check(bond, newval->value))
872+
return -EOPNOTSUPP;
873+
871874
if (!bond_mode_uses_arp(newval->value)) {
872875
if (bond->params.arp_interval) {
873876
netdev_dbg(bond->dev, "%s mode is incompatible with arp monitoring, start mii monitoring\n",

drivers/net/dsa/microchip/ksz8.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,23 +1625,14 @@ void ksz8_port_setup(struct ksz_device *dev, int port, bool cpu_port)
16251625
const u16 *regs = dev->info->regs;
16261626
struct dsa_switch *ds = dev->ds;
16271627
const u32 *masks;
1628-
int queues;
16291628
u8 member;
16301629

16311630
masks = dev->info->masks;
16321631

16331632
/* enable broadcast storm limit */
16341633
ksz_port_cfg(dev, port, P_BCAST_STORM_CTRL, PORT_BROADCAST_STORM, true);
16351634

1636-
/* For KSZ88x3 enable only one queue by default, otherwise we won't
1637-
* be able to get rid of PCP prios on Port 2.
1638-
*/
1639-
if (ksz_is_ksz88x3(dev))
1640-
queues = 1;
1641-
else
1642-
queues = dev->info->num_tx_queues;
1643-
1644-
ksz8_port_queue_split(dev, port, queues);
1635+
ksz8_port_queue_split(dev, port, dev->info->num_tx_queues);
16451636

16461637
/* replace priority */
16471638
ksz_port_cfg(dev, port, P_802_1P_CTRL,

drivers/net/dsa/microchip/ksz_dcb.c

Lines changed: 8 additions & 223 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@
1010
#include "ksz_dcb.h"
1111
#include "ksz8.h"
1212

13-
#define KSZ8_REG_PORT_1_CTRL_0 0x10
13+
/* Port X Control 0 register.
14+
* The datasheet specifies: Port 1 - 0x10, Port 2 - 0x20, Port 3 - 0x30.
15+
* However, the driver uses get_port_addr(), which maps Port 1 to offset 0.
16+
* Therefore, we define the base offset as 0x00 here to align with that logic.
17+
*/
18+
#define KSZ8_REG_PORT_1_CTRL_0 0x00
1419
#define KSZ8_PORT_DIFFSERV_ENABLE BIT(6)
1520
#define KSZ8_PORT_802_1P_ENABLE BIT(5)
1621
#define KSZ8_PORT_BASED_PRIO_M GENMASK(4, 3)
@@ -181,49 +186,6 @@ int ksz_port_get_default_prio(struct dsa_switch *ds, int port)
181186
return (data & mask) >> shift;
182187
}
183188

184-
/**
185-
* ksz88x3_port_set_default_prio_quirks - Quirks for default priority
186-
* @dev: Pointer to the KSZ switch device structure
187-
* @port: Port number for which to set the default priority
188-
* @prio: Priority value to set
189-
*
190-
* This function implements quirks for setting the default priority on KSZ88x3
191-
* devices. On Port 2, no other priority providers are working
192-
* except of PCP. So, configuring default priority on Port 2 is not possible.
193-
* On Port 1, it is not possible to configure port priority if PCP
194-
* apptrust on Port 2 is disabled. Since we disable multiple queues on the
195-
* switch to disable PCP on Port 2, we need to ensure that the default priority
196-
* configuration on Port 1 is in agreement with the configuration on Port 2.
197-
*
198-
* Return: 0 on success, or a negative error code on failure
199-
*/
200-
static int ksz88x3_port_set_default_prio_quirks(struct ksz_device *dev, int port,
201-
u8 prio)
202-
{
203-
if (!prio)
204-
return 0;
205-
206-
if (port == KSZ_PORT_2) {
207-
dev_err(dev->dev, "Port priority configuration is not working on Port 2\n");
208-
return -EINVAL;
209-
} else if (port == KSZ_PORT_1) {
210-
u8 port2_data;
211-
int ret;
212-
213-
ret = ksz_pread8(dev, KSZ_PORT_2, KSZ8_REG_PORT_1_CTRL_0,
214-
&port2_data);
215-
if (ret)
216-
return ret;
217-
218-
if (!(port2_data & KSZ8_PORT_802_1P_ENABLE)) {
219-
dev_err(dev->dev, "Not possible to configure port priority on Port 1 if PCP apptrust on Port 2 is disabled\n");
220-
return -EINVAL;
221-
}
222-
}
223-
224-
return 0;
225-
}
226-
227189
/**
228190
* ksz_port_set_default_prio - Sets the default priority for a port on a KSZ
229191
* switch
@@ -239,18 +201,12 @@ static int ksz88x3_port_set_default_prio_quirks(struct ksz_device *dev, int port
239201
int ksz_port_set_default_prio(struct dsa_switch *ds, int port, u8 prio)
240202
{
241203
struct ksz_device *dev = ds->priv;
242-
int reg, shift, ret;
204+
int reg, shift;
243205
u8 mask;
244206

245207
if (prio >= dev->info->num_ipms)
246208
return -EINVAL;
247209

248-
if (ksz_is_ksz88x3(dev)) {
249-
ret = ksz88x3_port_set_default_prio_quirks(dev, port, prio);
250-
if (ret)
251-
return ret;
252-
}
253-
254210
ksz_get_default_port_prio_reg(dev, &reg, &mask, &shift);
255211

256212
return ksz_prmw8(dev, port, reg, mask, (prio << shift) & mask);
@@ -518,155 +474,6 @@ static int ksz_port_set_apptrust_validate(struct ksz_device *dev, int port,
518474
return -EINVAL;
519475
}
520476

521-
/**
522-
* ksz88x3_port1_apptrust_quirk - Quirk for apptrust configuration on Port 1
523-
* of KSZ88x3 devices
524-
* @dev: Pointer to the KSZ switch device structure
525-
* @port: Port number for which to set the apptrust selectors
526-
* @reg: Register address for the apptrust configuration
527-
* @port1_data: Data to set for the apptrust configuration
528-
*
529-
* This function implements a quirk for apptrust configuration on Port 1 of
530-
* KSZ88x3 devices. It ensures that apptrust configuration on Port 1 is not
531-
* possible if PCP apptrust on Port 2 is disabled. This is because the Port 2
532-
* seems to be permanently hardwired to PCP classification, so we need to
533-
* do Port 1 configuration always in agreement with Port 2 configuration.
534-
*
535-
* Return: 0 on success, or a negative error code on failure
536-
*/
537-
static int ksz88x3_port1_apptrust_quirk(struct ksz_device *dev, int port,
538-
int reg, u8 port1_data)
539-
{
540-
u8 port2_data;
541-
int ret;
542-
543-
/* If no apptrust is requested for Port 1, no need to care about Port 2
544-
* configuration.
545-
*/
546-
if (!(port1_data & (KSZ8_PORT_802_1P_ENABLE | KSZ8_PORT_DIFFSERV_ENABLE)))
547-
return 0;
548-
549-
/* We got request to enable any apptrust on Port 1. To make it possible,
550-
* we need to enable multiple queues on the switch. If we enable
551-
* multiqueue support, PCP classification on Port 2 will be
552-
* automatically activated by HW.
553-
*/
554-
ret = ksz_pread8(dev, KSZ_PORT_2, reg, &port2_data);
555-
if (ret)
556-
return ret;
557-
558-
/* If KSZ8_PORT_802_1P_ENABLE bit is set on Port 2, the driver showed
559-
* the interest in PCP classification on Port 2. In this case,
560-
* multiqueue support is enabled and we can enable any apptrust on
561-
* Port 1.
562-
* If KSZ8_PORT_802_1P_ENABLE bit is not set on Port 2, the PCP
563-
* classification on Port 2 is still active, but the driver disabled
564-
* multiqueue support and made frame prioritization inactive for
565-
* all ports. In this case, we can't enable any apptrust on Port 1.
566-
*/
567-
if (!(port2_data & KSZ8_PORT_802_1P_ENABLE)) {
568-
dev_err(dev->dev, "Not possible to enable any apptrust on Port 1 if PCP apptrust on Port 2 is disabled\n");
569-
return -EINVAL;
570-
}
571-
572-
return 0;
573-
}
574-
575-
/**
576-
* ksz88x3_port2_apptrust_quirk - Quirk for apptrust configuration on Port 2
577-
* of KSZ88x3 devices
578-
* @dev: Pointer to the KSZ switch device structure
579-
* @port: Port number for which to set the apptrust selectors
580-
* @reg: Register address for the apptrust configuration
581-
* @port2_data: Data to set for the apptrust configuration
582-
*
583-
* This function implements a quirk for apptrust configuration on Port 2 of
584-
* KSZ88x3 devices. It ensures that DSCP apptrust is not working on Port 2 and
585-
* that it is not possible to disable PCP on Port 2. The only way to disable PCP
586-
* on Port 2 is to disable multiple queues on the switch.
587-
*
588-
* Return: 0 on success, or a negative error code on failure
589-
*/
590-
static int ksz88x3_port2_apptrust_quirk(struct ksz_device *dev, int port,
591-
int reg, u8 port2_data)
592-
{
593-
struct dsa_switch *ds = dev->ds;
594-
u8 port1_data;
595-
int ret;
596-
597-
/* First validate Port 2 configuration. DiffServ/DSCP is not working
598-
* on this port.
599-
*/
600-
if (port2_data & KSZ8_PORT_DIFFSERV_ENABLE) {
601-
dev_err(dev->dev, "DSCP apptrust is not working on Port 2\n");
602-
return -EINVAL;
603-
}
604-
605-
/* If PCP support is requested, we need to enable all queues on the
606-
* switch to make PCP priority working on Port 2.
607-
*/
608-
if (port2_data & KSZ8_PORT_802_1P_ENABLE)
609-
return ksz8_all_queues_split(dev, dev->info->num_tx_queues);
610-
611-
/* We got request to disable PCP priority on Port 2.
612-
* Now, we need to compare Port 2 configuration with Port 1
613-
* configuration.
614-
*/
615-
ret = ksz_pread8(dev, KSZ_PORT_1, reg, &port1_data);
616-
if (ret)
617-
return ret;
618-
619-
/* If Port 1 has any apptrust enabled, we can't disable multiple queues
620-
* on the switch, so we can't disable PCP on Port 2.
621-
*/
622-
if (port1_data & (KSZ8_PORT_802_1P_ENABLE | KSZ8_PORT_DIFFSERV_ENABLE)) {
623-
dev_err(dev->dev, "Not possible to disable PCP on Port 2 if any apptrust is enabled on Port 1\n");
624-
return -EINVAL;
625-
}
626-
627-
/* Now we need to ensure that default priority on Port 1 is set to 0
628-
* otherwise we can't disable multiqueue support on the switch.
629-
*/
630-
ret = ksz_port_get_default_prio(ds, KSZ_PORT_1);
631-
if (ret < 0) {
632-
return ret;
633-
} else if (ret) {
634-
dev_err(dev->dev, "Not possible to disable PCP on Port 2 if non zero default priority is set on Port 1\n");
635-
return -EINVAL;
636-
}
637-
638-
/* Port 1 has no apptrust or default priority set and we got request to
639-
* disable PCP on Port 2. We can disable multiqueue support to disable
640-
* PCP on Port 2.
641-
*/
642-
return ksz8_all_queues_split(dev, 1);
643-
}
644-
645-
/**
646-
* ksz88x3_port_apptrust_quirk - Quirk for apptrust configuration on KSZ88x3
647-
* devices
648-
* @dev: Pointer to the KSZ switch device structure
649-
* @port: Port number for which to set the apptrust selectors
650-
* @reg: Register address for the apptrust configuration
651-
* @data: Data to set for the apptrust configuration
652-
*
653-
* This function implements a quirk for apptrust configuration on KSZ88x3
654-
* devices. It ensures that apptrust configuration on Port 1 and
655-
* Port 2 is done in agreement with each other.
656-
*
657-
* Return: 0 on success, or a negative error code on failure
658-
*/
659-
static int ksz88x3_port_apptrust_quirk(struct ksz_device *dev, int port,
660-
int reg, u8 data)
661-
{
662-
if (port == KSZ_PORT_1)
663-
return ksz88x3_port1_apptrust_quirk(dev, port, reg, data);
664-
else if (port == KSZ_PORT_2)
665-
return ksz88x3_port2_apptrust_quirk(dev, port, reg, data);
666-
667-
return 0;
668-
}
669-
670477
/**
671478
* ksz_port_set_apptrust - Sets the apptrust selectors for a port on a KSZ
672479
* switch
@@ -707,12 +514,6 @@ int ksz_port_set_apptrust(struct dsa_switch *ds, int port,
707514
}
708515
}
709516

710-
if (ksz_is_ksz88x3(dev)) {
711-
ret = ksz88x3_port_apptrust_quirk(dev, port, reg, data);
712-
if (ret)
713-
return ret;
714-
}
715-
716517
return ksz_prmw8(dev, port, reg, mask, data);
717518
}
718519

@@ -799,21 +600,5 @@ int ksz_dcb_init_port(struct ksz_device *dev, int port)
799600
*/
800601
int ksz_dcb_init(struct ksz_device *dev)
801602
{
802-
int ret;
803-
804-
ret = ksz_init_global_dscp_map(dev);
805-
if (ret)
806-
return ret;
807-
808-
/* Enable 802.1p priority control on Port 2 during switch initialization.
809-
* This setup is critical for the apptrust functionality on Port 1, which
810-
* relies on the priority settings of Port 2. Note: Port 1 is naturally
811-
* configured before Port 2, necessitating this configuration order.
812-
*/
813-
if (ksz_is_ksz88x3(dev))
814-
return ksz_prmw8(dev, KSZ_PORT_2, KSZ8_REG_PORT_1_CTRL_0,
815-
KSZ8_PORT_802_1P_ENABLE,
816-
KSZ8_PORT_802_1P_ENABLE);
817-
818-
return 0;
603+
return ksz_init_global_dscp_map(dev);
819604
}

0 commit comments

Comments
 (0)