Skip to content

Commit ec66244

Browse files
committed
Merge branch 'linus'
2 parents e9ac503 + 4c61282 commit ec66244

File tree

112 files changed

+971
-450
lines changed

Some content is hidden

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

112 files changed

+971
-450
lines changed

Documentation/admin-guide/sysctl/net.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ poll cycle or the number of packets processed reaches netdev_budget.
271271
netdev_max_backlog
272272
------------------
273273

274-
Maximum number of packets, queued on the INPUT side, when the interface
274+
Maximum number of packets, queued on the INPUT side, when the interface
275275
receives packets faster than kernel can process them.
276276

277277
netdev_rss_key

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3679,6 +3679,7 @@ F: Documentation/networking/bonding.rst
36793679
F: drivers/net/bonding/
36803680
F: include/net/bond*
36813681
F: include/uapi/linux/if_bonding.h
3682+
F: tools/testing/selftests/drivers/net/bonding/
36823683

36833684
BOSCH SENSORTEC BMA400 ACCELEROMETER IIO DRIVER
36843685
M: Dan Robertson <[email protected]>

drivers/firmware/dmi_scan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ static int __init dmi_smbios3_present(const u8 *buf)
630630
{
631631
if (memcmp(buf, "_SM3_", 5) == 0 &&
632632
buf[6] < 32 && dmi_checksum(buf, buf[6])) {
633-
dmi_ver = get_unaligned_be32(buf + 6) & 0xFFFFFF;
633+
dmi_ver = get_unaligned_be24(buf + 7);
634634
dmi_num = 0; /* No longer specified */
635635
dmi_len = get_unaligned_le32(buf + 12);
636636
dmi_base = get_unaligned_le64(buf + 16);

drivers/net/bonding/bond_3ad.c

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ enum ad_link_speed_type {
8484
static const u8 null_mac_addr[ETH_ALEN + 2] __long_aligned = {
8585
0, 0, 0, 0, 0, 0
8686
};
87-
static u16 ad_ticks_per_sec;
87+
88+
static const u16 ad_ticks_per_sec = 1000 / AD_TIMER_INTERVAL;
8889
static const int ad_delta_in_ticks = (AD_TIMER_INTERVAL * HZ) / 1000;
8990

9091
static const u8 lacpdu_mcast_addr[ETH_ALEN + 2] __long_aligned =
@@ -2001,36 +2002,24 @@ void bond_3ad_initiate_agg_selection(struct bonding *bond, int timeout)
20012002
/**
20022003
* bond_3ad_initialize - initialize a bond's 802.3ad parameters and structures
20032004
* @bond: bonding struct to work on
2004-
* @tick_resolution: tick duration (millisecond resolution)
20052005
*
20062006
* Can be called only after the mac address of the bond is set.
20072007
*/
2008-
void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution)
2008+
void bond_3ad_initialize(struct bonding *bond)
20092009
{
2010-
/* check that the bond is not initialized yet */
2011-
if (!MAC_ADDRESS_EQUAL(&(BOND_AD_INFO(bond).system.sys_mac_addr),
2012-
bond->dev->dev_addr)) {
2013-
2014-
BOND_AD_INFO(bond).aggregator_identifier = 0;
2015-
2016-
BOND_AD_INFO(bond).system.sys_priority =
2017-
bond->params.ad_actor_sys_prio;
2018-
if (is_zero_ether_addr(bond->params.ad_actor_system))
2019-
BOND_AD_INFO(bond).system.sys_mac_addr =
2020-
*((struct mac_addr *)bond->dev->dev_addr);
2021-
else
2022-
BOND_AD_INFO(bond).system.sys_mac_addr =
2023-
*((struct mac_addr *)bond->params.ad_actor_system);
2024-
2025-
/* initialize how many times this module is called in one
2026-
* second (should be about every 100ms)
2027-
*/
2028-
ad_ticks_per_sec = tick_resolution;
2010+
BOND_AD_INFO(bond).aggregator_identifier = 0;
2011+
BOND_AD_INFO(bond).system.sys_priority =
2012+
bond->params.ad_actor_sys_prio;
2013+
if (is_zero_ether_addr(bond->params.ad_actor_system))
2014+
BOND_AD_INFO(bond).system.sys_mac_addr =
2015+
*((struct mac_addr *)bond->dev->dev_addr);
2016+
else
2017+
BOND_AD_INFO(bond).system.sys_mac_addr =
2018+
*((struct mac_addr *)bond->params.ad_actor_system);
20292019

2030-
bond_3ad_initiate_agg_selection(bond,
2031-
AD_AGGREGATOR_SELECTION_TIMER *
2032-
ad_ticks_per_sec);
2033-
}
2020+
bond_3ad_initiate_agg_selection(bond,
2021+
AD_AGGREGATOR_SELECTION_TIMER *
2022+
ad_ticks_per_sec);
20342023
}
20352024

20362025
/**

drivers/net/bonding/bond_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2081,7 +2081,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,
20812081
/* Initialize AD with the number of times that the AD timer is called in 1 second
20822082
* can be called only after the mac address of the bond is set
20832083
*/
2084-
bond_3ad_initialize(bond, 1000/AD_TIMER_INTERVAL);
2084+
bond_3ad_initialize(bond);
20852085
} else {
20862086
SLAVE_AD_INFO(new_slave)->id =
20872087
SLAVE_AD_INFO(prev_slave)->id + 1;

drivers/net/dsa/microchip/ksz_common.c

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -803,9 +803,15 @@ static void ksz_phylink_get_caps(struct dsa_switch *ds, int port,
803803
if (dev->info->supports_rgmii[port])
804804
phy_interface_set_rgmii(config->supported_interfaces);
805805

806-
if (dev->info->internal_phy[port])
806+
if (dev->info->internal_phy[port]) {
807807
__set_bit(PHY_INTERFACE_MODE_INTERNAL,
808808
config->supported_interfaces);
809+
/* Compatibility for phylib's default interface type when the
810+
* phy-mode property is absent
811+
*/
812+
__set_bit(PHY_INTERFACE_MODE_GMII,
813+
config->supported_interfaces);
814+
}
809815

810816
if (dev->dev_ops->get_caps)
811817
dev->dev_ops->get_caps(dev, port, config);
@@ -962,6 +968,7 @@ static void ksz_update_port_member(struct ksz_device *dev, int port)
962968
static int ksz_setup(struct dsa_switch *ds)
963969
{
964970
struct ksz_device *dev = ds->priv;
971+
struct ksz_port *p;
965972
const u16 *regs;
966973
int ret;
967974

@@ -1001,6 +1008,14 @@ static int ksz_setup(struct dsa_switch *ds)
10011008
return ret;
10021009
}
10031010

1011+
/* Start with learning disabled on standalone user ports, and enabled
1012+
* on the CPU port. In lack of other finer mechanisms, learning on the
1013+
* CPU port will avoid flooding bridge local addresses on the network
1014+
* in some cases.
1015+
*/
1016+
p = &dev->ports[dev->cpu_port];
1017+
p->learning = true;
1018+
10041019
/* start switch */
10051020
regmap_update_bits(dev->regmap[0], regs[S_START_CTRL],
10061021
SW_START, SW_START);
@@ -1277,6 +1292,8 @@ void ksz_port_stp_state_set(struct dsa_switch *ds, int port, u8 state)
12771292
ksz_pread8(dev, port, regs[P_STP_CTRL], &data);
12781293
data &= ~(PORT_TX_ENABLE | PORT_RX_ENABLE | PORT_LEARN_DISABLE);
12791294

1295+
p = &dev->ports[port];
1296+
12801297
switch (state) {
12811298
case BR_STATE_DISABLED:
12821299
data |= PORT_LEARN_DISABLE;
@@ -1286,9 +1303,13 @@ void ksz_port_stp_state_set(struct dsa_switch *ds, int port, u8 state)
12861303
break;
12871304
case BR_STATE_LEARNING:
12881305
data |= PORT_RX_ENABLE;
1306+
if (!p->learning)
1307+
data |= PORT_LEARN_DISABLE;
12891308
break;
12901309
case BR_STATE_FORWARDING:
12911310
data |= (PORT_TX_ENABLE | PORT_RX_ENABLE);
1311+
if (!p->learning)
1312+
data |= PORT_LEARN_DISABLE;
12921313
break;
12931314
case BR_STATE_BLOCKING:
12941315
data |= PORT_LEARN_DISABLE;
@@ -1300,12 +1321,38 @@ void ksz_port_stp_state_set(struct dsa_switch *ds, int port, u8 state)
13001321

13011322
ksz_pwrite8(dev, port, regs[P_STP_CTRL], data);
13021323

1303-
p = &dev->ports[port];
13041324
p->stp_state = state;
13051325

13061326
ksz_update_port_member(dev, port);
13071327
}
13081328

1329+
static int ksz_port_pre_bridge_flags(struct dsa_switch *ds, int port,
1330+
struct switchdev_brport_flags flags,
1331+
struct netlink_ext_ack *extack)
1332+
{
1333+
if (flags.mask & ~BR_LEARNING)
1334+
return -EINVAL;
1335+
1336+
return 0;
1337+
}
1338+
1339+
static int ksz_port_bridge_flags(struct dsa_switch *ds, int port,
1340+
struct switchdev_brport_flags flags,
1341+
struct netlink_ext_ack *extack)
1342+
{
1343+
struct ksz_device *dev = ds->priv;
1344+
struct ksz_port *p = &dev->ports[port];
1345+
1346+
if (flags.mask & BR_LEARNING) {
1347+
p->learning = !!(flags.val & BR_LEARNING);
1348+
1349+
/* Make the change take effect immediately */
1350+
ksz_port_stp_state_set(ds, port, p->stp_state);
1351+
}
1352+
1353+
return 0;
1354+
}
1355+
13091356
static enum dsa_tag_protocol ksz_get_tag_protocol(struct dsa_switch *ds,
13101357
int port,
13111358
enum dsa_tag_protocol mp)
@@ -1719,6 +1766,8 @@ static const struct dsa_switch_ops ksz_switch_ops = {
17191766
.port_bridge_join = ksz_port_bridge_join,
17201767
.port_bridge_leave = ksz_port_bridge_leave,
17211768
.port_stp_state_set = ksz_port_stp_state_set,
1769+
.port_pre_bridge_flags = ksz_port_pre_bridge_flags,
1770+
.port_bridge_flags = ksz_port_bridge_flags,
17221771
.port_fast_age = ksz_port_fast_age,
17231772
.port_vlan_filtering = ksz_port_vlan_filtering,
17241773
.port_vlan_add = ksz_port_vlan_add,

drivers/net/dsa/microchip/ksz_common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ struct ksz_chip_data {
6565

6666
struct ksz_port {
6767
bool remove_tag; /* Remove Tag flag set, for ksz8795 only */
68+
bool learning;
6869
int stp_state;
6970
struct phy_device phydev;
7071

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11178,10 +11178,7 @@ static netdev_features_t bnxt_fix_features(struct net_device *dev,
1117811178
if ((features & NETIF_F_NTUPLE) && !bnxt_rfs_capable(bp))
1117911179
features &= ~NETIF_F_NTUPLE;
1118011180

11181-
if (bp->flags & BNXT_FLAG_NO_AGG_RINGS)
11182-
features &= ~(NETIF_F_LRO | NETIF_F_GRO_HW);
11183-
11184-
if (!(bp->flags & BNXT_FLAG_TPA))
11181+
if ((bp->flags & BNXT_FLAG_NO_AGG_RINGS) || bp->xdp_prog)
1118511182
features &= ~(NETIF_F_LRO | NETIF_F_GRO_HW);
1118611183

1118711184
if (!(features & NETIF_F_GRO))

drivers/net/ethernet/broadcom/bnxt/bnxt.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2130,6 +2130,7 @@ struct bnxt {
21302130
#define BNXT_DUMP_CRASH 1
21312131

21322132
struct bpf_prog *xdp_prog;
2133+
u8 xdp_has_frags;
21332134

21342135
struct bnxt_ptp_cfg *ptp_cfg;
21352136
u8 ptp_all_rx_tstamp;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,6 +1306,7 @@ int bnxt_dl_register(struct bnxt *bp)
13061306
if (rc)
13071307
goto err_dl_port_unreg;
13081308

1309+
devlink_set_features(dl, DEVLINK_F_RELOAD);
13091310
out:
13101311
devlink_register(dl);
13111312
return 0;

0 commit comments

Comments
 (0)