Skip to content

Commit 7475e51

Browse files
committed
Merge tag 'net-6.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni: "Including fixes from BPF and netfilter. Current release - regressions: - core: fix undefined behavior in netdev name allocation - bpf: do not allocate percpu memory at init stage - netfilter: nf_tables: split async and sync catchall in two functions - mptcp: fix possible NULL pointer dereference on close Current release - new code bugs: - eth: ice: dpll: fix initial lock status of dpll Previous releases - regressions: - bpf: fix precision backtracking instruction iteration - af_unix: fix use-after-free in unix_stream_read_actor() - tipc: fix kernel-infoleak due to uninitialized TLV value - eth: bonding: stop the device in bond_setup_by_slave() - eth: mlx5: - fix double free of encap_header - avoid referencing skb after free-ing in drop path - eth: hns3: fix VF reset - eth: mvneta: fix calls to page_pool_get_stats Previous releases - always broken: - core: set SOCK_RCU_FREE before inserting socket into hashtable - bpf: fix control-flow graph checking in privileged mode - eth: ppp: limit MRU to 64K - eth: stmmac: avoid rx queue overrun - eth: icssg-prueth: fix error cleanup on failing initialization - eth: hns3: fix out-of-bounds access may occur when coalesce info is read via debugfs - eth: cortina: handle large frames Misc: - selftests: gso: support CONFIG_MAX_SKB_FRAGS up to 45" * tag 'net-6.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (78 commits) macvlan: Don't propagate promisc change to lower dev in passthru net: sched: do not offload flows with a helper in act_ct net/mlx5e: Check return value of snprintf writing to fw_version buffer for representors net/mlx5e: Check return value of snprintf writing to fw_version buffer net/mlx5e: Reduce the size of icosq_str net/mlx5: Increase size of irq name buffer net/mlx5e: Update doorbell for port timestamping CQ before the software counter net/mlx5e: Track xmit submission to PTP WQ after populating metadata map net/mlx5e: Avoid referencing skb after free-ing in drop path of mlx5e_sq_xmit_wqe net/mlx5e: Don't modify the peer sent-to-vport rules for IPSec offload net/mlx5e: Fix pedit endianness net/mlx5e: fix double free of encap_header in update funcs net/mlx5e: fix double free of encap_header net/mlx5: Decouple PHC .adjtime and .adjphase implementations net/mlx5: DR, Allow old devices to use multi destination FTE net/mlx5: Free used cpus mask when an IRQ is released Revert "net/mlx5: DR, Supporting inline WQE when possible" bpf: Do not allocate percpu memory at init stage net: Fix undefined behavior in netdev name allocation dt-bindings: net: ethernet-controller: Fix formatting error ...
2 parents 6eb1acd + cff088d commit 7475e51

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

+860
-457
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,12 +275,12 @@ allOf:
275275
properties:
276276
rx-internal-delay-ps:
277277
description:
278-
RGMII Receive Clock Delay defined in pico seconds.This is used for
278+
RGMII Receive Clock Delay defined in pico seconds. This is used for
279279
controllers that have configurable RX internal delays. If this
280280
property is present then the MAC applies the RX delay.
281281
tx-internal-delay-ps:
282282
description:
283-
RGMII Transmit Clock Delay defined in pico seconds.This is used for
283+
RGMII Transmit Clock Delay defined in pico seconds. This is used for
284284
controllers that have configurable TX internal delays. If this
285285
property is present then the MAC applies the TX delay.
286286

MAINTAINERS

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21768,7 +21768,9 @@ F: Documentation/devicetree/bindings/counter/ti-eqep.yaml
2176821768
F: drivers/counter/ti-eqep.c
2176921769

2177021770
TI ETHERNET SWITCH DRIVER (CPSW)
21771-
R: Grygorii Strashko <[email protected]>
21771+
R: Siddharth Vadapalli <[email protected]>
21772+
R: Ravi Gunasekaran <[email protected]>
21773+
R: Roger Quadros <[email protected]>
2177221774
2177321775
2177421776
S: Maintained
@@ -21792,6 +21794,15 @@ F: Documentation/devicetree/bindings/media/i2c/ti,ds90*
2179221794
F: drivers/media/i2c/ds90*
2179321795
F: include/media/i2c/ds90*
2179421796

21797+
TI ICSSG ETHERNET DRIVER (ICSSG)
21798+
R: MD Danish Anwar <[email protected]>
21799+
R: Roger Quadros <[email protected]>
21800+
L: [email protected] (moderated for non-subscribers)
21801+
21802+
S: Maintained
21803+
F: Documentation/devicetree/bindings/net/ti,icss*.yaml
21804+
F: drivers/net/ethernet/ti/icssg/*
21805+
2179521806
TI J721E CSI2RX DRIVER
2179621807
M: Jai Luthra <[email protected]>
2179721808

drivers/net/bonding/bond_main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,6 +1500,10 @@ static void bond_compute_features(struct bonding *bond)
15001500
static void bond_setup_by_slave(struct net_device *bond_dev,
15011501
struct net_device *slave_dev)
15021502
{
1503+
bool was_up = !!(bond_dev->flags & IFF_UP);
1504+
1505+
dev_close(bond_dev);
1506+
15031507
bond_dev->header_ops = slave_dev->header_ops;
15041508

15051509
bond_dev->type = slave_dev->type;
@@ -1514,6 +1518,8 @@ static void bond_setup_by_slave(struct net_device *bond_dev,
15141518
bond_dev->flags &= ~(IFF_BROADCAST | IFF_MULTICAST);
15151519
bond_dev->flags |= (IFF_POINTOPOINT | IFF_NOARP);
15161520
}
1521+
if (was_up)
1522+
dev_open(bond_dev, NULL);
15171523
}
15181524

15191525
/* On bonding slaves other than the currently active slave, suppress

drivers/net/ethernet/amd/pds_core/adminq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ irqreturn_t pdsc_adminq_isr(int irq, void *data)
146146
}
147147

148148
queue_work(pdsc->wq, &qcq->work);
149-
pds_core_intr_mask(&pdsc->intr_ctrl[irq], PDS_CORE_INTR_MASK_CLEAR);
149+
pds_core_intr_mask(&pdsc->intr_ctrl[qcq->intx], PDS_CORE_INTR_MASK_CLEAR);
150150

151151
return IRQ_HANDLED;
152152
}

drivers/net/ethernet/amd/pds_core/core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#define PDSC_DRV_DESCRIPTION "AMD/Pensando Core Driver"
1616

1717
#define PDSC_WATCHDOG_SECS 5
18-
#define PDSC_QUEUE_NAME_MAX_SZ 32
18+
#define PDSC_QUEUE_NAME_MAX_SZ 16
1919
#define PDSC_ADMINQ_MIN_LENGTH 16 /* must be a power of two */
2020
#define PDSC_NOTIFYQ_LENGTH 64 /* must be a power of two */
2121
#define PDSC_TEARDOWN_RECOVERY false

drivers/net/ethernet/amd/pds_core/dev.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,14 @@ static int pdsc_identify(struct pdsc *pdsc)
261261
struct pds_core_drv_identity drv = {};
262262
size_t sz;
263263
int err;
264+
int n;
264265

265266
drv.drv_type = cpu_to_le32(PDS_DRIVER_LINUX);
266-
snprintf(drv.driver_ver_str, sizeof(drv.driver_ver_str),
267-
"%s %s", PDS_CORE_DRV_NAME, utsname()->release);
267+
/* Catching the return quiets a Wformat-truncation complaint */
268+
n = snprintf(drv.driver_ver_str, sizeof(drv.driver_ver_str),
269+
"%s %s", PDS_CORE_DRV_NAME, utsname()->release);
270+
if (n > sizeof(drv.driver_ver_str))
271+
dev_dbg(pdsc->dev, "release name truncated, don't care\n");
268272

269273
/* Next let's get some info about the device
270274
* We use the devcmd_lock at this level in order to

drivers/net/ethernet/amd/pds_core/devlink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ int pdsc_dl_info_get(struct devlink *dl, struct devlink_info_req *req,
104104
struct pds_core_fw_list_info fw_list;
105105
struct pdsc *pdsc = devlink_priv(dl);
106106
union pds_core_dev_comp comp;
107-
char buf[16];
107+
char buf[32];
108108
int listlen;
109109
int err;
110110
int i;

drivers/net/ethernet/broadcom/tg3.c

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6889,7 +6889,7 @@ static int tg3_rx(struct tg3_napi *tnapi, int budget)
68896889
desc_idx, *post_ptr);
68906890
drop_it_no_recycle:
68916891
/* Other statistics kept track of by card. */
6892-
tp->rx_dropped++;
6892+
tnapi->rx_dropped++;
68936893
goto next_pkt;
68946894
}
68956895

@@ -7918,8 +7918,10 @@ static int tg3_tso_bug(struct tg3 *tp, struct tg3_napi *tnapi,
79187918

79197919
segs = skb_gso_segment(skb, tp->dev->features &
79207920
~(NETIF_F_TSO | NETIF_F_TSO6));
7921-
if (IS_ERR(segs) || !segs)
7921+
if (IS_ERR(segs) || !segs) {
7922+
tnapi->tx_dropped++;
79227923
goto tg3_tso_bug_end;
7924+
}
79237925

79247926
skb_list_walk_safe(segs, seg, next) {
79257927
skb_mark_not_on_list(seg);
@@ -8190,7 +8192,7 @@ static netdev_tx_t __tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
81908192
drop:
81918193
dev_kfree_skb_any(skb);
81928194
drop_nofree:
8193-
tp->tx_dropped++;
8195+
tnapi->tx_dropped++;
81948196
return NETDEV_TX_OK;
81958197
}
81968198

@@ -9405,7 +9407,7 @@ static void __tg3_set_rx_mode(struct net_device *);
94059407
/* tp->lock is held. */
94069408
static int tg3_halt(struct tg3 *tp, int kind, bool silent)
94079409
{
9408-
int err;
9410+
int err, i;
94099411

94109412
tg3_stop_fw(tp);
94119413

@@ -9426,6 +9428,13 @@ static int tg3_halt(struct tg3 *tp, int kind, bool silent)
94269428

94279429
/* And make sure the next sample is new data */
94289430
memset(tp->hw_stats, 0, sizeof(struct tg3_hw_stats));
9431+
9432+
for (i = 0; i < TG3_IRQ_MAX_VECS; ++i) {
9433+
struct tg3_napi *tnapi = &tp->napi[i];
9434+
9435+
tnapi->rx_dropped = 0;
9436+
tnapi->tx_dropped = 0;
9437+
}
94299438
}
94309439

94319440
return err;
@@ -11975,6 +11984,9 @@ static void tg3_get_nstats(struct tg3 *tp, struct rtnl_link_stats64 *stats)
1197511984
{
1197611985
struct rtnl_link_stats64 *old_stats = &tp->net_stats_prev;
1197711986
struct tg3_hw_stats *hw_stats = tp->hw_stats;
11987+
unsigned long rx_dropped;
11988+
unsigned long tx_dropped;
11989+
int i;
1197811990

1197911991
stats->rx_packets = old_stats->rx_packets +
1198011992
get_stat64(&hw_stats->rx_ucast_packets) +
@@ -12021,8 +12033,26 @@ static void tg3_get_nstats(struct tg3 *tp, struct rtnl_link_stats64 *stats)
1202112033
stats->rx_missed_errors = old_stats->rx_missed_errors +
1202212034
get_stat64(&hw_stats->rx_discards);
1202312035

12024-
stats->rx_dropped = tp->rx_dropped;
12025-
stats->tx_dropped = tp->tx_dropped;
12036+
/* Aggregate per-queue counters. The per-queue counters are updated
12037+
* by a single writer, race-free. The result computed by this loop
12038+
* might not be 100% accurate (counters can be updated in the middle of
12039+
* the loop) but the next tg3_get_nstats() will recompute the current
12040+
* value so it is acceptable.
12041+
*
12042+
* Note that these counters wrap around at 4G on 32bit machines.
12043+
*/
12044+
rx_dropped = (unsigned long)(old_stats->rx_dropped);
12045+
tx_dropped = (unsigned long)(old_stats->tx_dropped);
12046+
12047+
for (i = 0; i < tp->irq_cnt; i++) {
12048+
struct tg3_napi *tnapi = &tp->napi[i];
12049+
12050+
rx_dropped += tnapi->rx_dropped;
12051+
tx_dropped += tnapi->tx_dropped;
12052+
}
12053+
12054+
stats->rx_dropped = rx_dropped;
12055+
stats->tx_dropped = tx_dropped;
1202612056
}
1202712057

1202812058
static int tg3_get_regs_len(struct net_device *dev)

drivers/net/ethernet/broadcom/tg3.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3018,6 +3018,7 @@ struct tg3_napi {
30183018
u16 *rx_rcb_prod_idx;
30193019
struct tg3_rx_prodring_set prodring;
30203020
struct tg3_rx_buffer_desc *rx_rcb;
3021+
unsigned long rx_dropped;
30213022

30223023
u32 tx_prod ____cacheline_aligned;
30233024
u32 tx_cons;
@@ -3026,6 +3027,7 @@ struct tg3_napi {
30263027
u32 prodmbox;
30273028
struct tg3_tx_buffer_desc *tx_ring;
30283029
struct tg3_tx_ring_info *tx_buffers;
3030+
unsigned long tx_dropped;
30293031

30303032
dma_addr_t status_mapping;
30313033
dma_addr_t rx_rcb_mapping;
@@ -3220,8 +3222,6 @@ struct tg3 {
32203222

32213223

32223224
/* begin "everything else" cacheline(s) section */
3223-
unsigned long rx_dropped;
3224-
unsigned long tx_dropped;
32253225
struct rtnl_link_stats64 net_stats_prev;
32263226
struct tg3_ethtool_stats estats_prev;
32273227

drivers/net/ethernet/cortina/gemini.c

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,8 @@ static const struct gmac_max_framelen gmac_maxlens[] = {
432432
.val = CONFIG0_MAXLEN_1536,
433433
},
434434
{
435-
.max_l3_len = 1542,
436-
.val = CONFIG0_MAXLEN_1542,
435+
.max_l3_len = 1548,
436+
.val = CONFIG0_MAXLEN_1548,
437437
},
438438
{
439439
.max_l3_len = 9212,
@@ -1145,6 +1145,7 @@ static int gmac_map_tx_bufs(struct net_device *netdev, struct sk_buff *skb,
11451145
dma_addr_t mapping;
11461146
unsigned short mtu;
11471147
void *buffer;
1148+
int ret;
11481149

11491150
mtu = ETH_HLEN;
11501151
mtu += netdev->mtu;
@@ -1159,9 +1160,30 @@ static int gmac_map_tx_bufs(struct net_device *netdev, struct sk_buff *skb,
11591160
word3 |= mtu;
11601161
}
11611162

1162-
if (skb->ip_summed != CHECKSUM_NONE) {
1163+
if (skb->len >= ETH_FRAME_LEN) {
1164+
/* Hardware offloaded checksumming isn't working on frames
1165+
* bigger than 1514 bytes. A hypothesis about this is that the
1166+
* checksum buffer is only 1518 bytes, so when the frames get
1167+
* bigger they get truncated, or the last few bytes get
1168+
* overwritten by the FCS.
1169+
*
1170+
* Just use software checksumming and bypass on bigger frames.
1171+
*/
1172+
if (skb->ip_summed == CHECKSUM_PARTIAL) {
1173+
ret = skb_checksum_help(skb);
1174+
if (ret)
1175+
return ret;
1176+
}
1177+
word1 |= TSS_BYPASS_BIT;
1178+
} else if (skb->ip_summed == CHECKSUM_PARTIAL) {
11631179
int tcp = 0;
11641180

1181+
/* We do not switch off the checksumming on non TCP/UDP
1182+
* frames: as is shown from tests, the checksumming engine
1183+
* is smart enough to see that a frame is not actually TCP
1184+
* or UDP and then just pass it through without any changes
1185+
* to the frame.
1186+
*/
11651187
if (skb->protocol == htons(ETH_P_IP)) {
11661188
word1 |= TSS_IP_CHKSUM_BIT;
11671189
tcp = ip_hdr(skb)->protocol == IPPROTO_TCP;
@@ -1978,15 +2000,6 @@ static int gmac_change_mtu(struct net_device *netdev, int new_mtu)
19782000
return 0;
19792001
}
19802002

1981-
static netdev_features_t gmac_fix_features(struct net_device *netdev,
1982-
netdev_features_t features)
1983-
{
1984-
if (netdev->mtu + ETH_HLEN + VLAN_HLEN > MTU_SIZE_BIT_MASK)
1985-
features &= ~GMAC_OFFLOAD_FEATURES;
1986-
1987-
return features;
1988-
}
1989-
19902003
static int gmac_set_features(struct net_device *netdev,
19912004
netdev_features_t features)
19922005
{
@@ -2212,7 +2225,6 @@ static const struct net_device_ops gmac_351x_ops = {
22122225
.ndo_set_mac_address = gmac_set_mac_address,
22132226
.ndo_get_stats64 = gmac_get_stats64,
22142227
.ndo_change_mtu = gmac_change_mtu,
2215-
.ndo_fix_features = gmac_fix_features,
22162228
.ndo_set_features = gmac_set_features,
22172229
};
22182230

@@ -2464,11 +2476,12 @@ static int gemini_ethernet_port_probe(struct platform_device *pdev)
24642476

24652477
netdev->hw_features = GMAC_OFFLOAD_FEATURES;
24662478
netdev->features |= GMAC_OFFLOAD_FEATURES | NETIF_F_GRO;
2467-
/* We can handle jumbo frames up to 10236 bytes so, let's accept
2468-
* payloads of 10236 bytes minus VLAN and ethernet header
2479+
/* We can receive jumbo frames up to 10236 bytes but only
2480+
* transmit 2047 bytes so, let's accept payloads of 2047
2481+
* bytes minus VLAN and ethernet header
24692482
*/
24702483
netdev->min_mtu = ETH_MIN_MTU;
2471-
netdev->max_mtu = 10236 - VLAN_ETH_HLEN;
2484+
netdev->max_mtu = MTU_SIZE_BIT_MASK - VLAN_ETH_HLEN;
24722485

24732486
port->freeq_refill = 0;
24742487
netif_napi_add(netdev, &port->napi, gmac_napi_poll);

0 commit comments

Comments
 (0)