Skip to content

Commit db7c953

Browse files
committed
Merge tag 'net-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Current release - regressions: - arm64: dts: fsl-ls1028a-kontron-sl28: specify in-band mode for ENETC Current release - bugs in new features: - mptcp: provide rmem[0] limit offset to fix oops Previous release - regressions: - IPv6: Set SIT tunnel hard_header_len to zero to fix path MTU calculations - lan743x: correctly handle chips with internal PHY - bpf: Don't rely on GCC __attribute__((optimize)) to disable GCSE - mlx5e: Fix VXLAN port table synchronization after function reload Previous release - always broken: - bpf: Zero-fill re-used per-cpu map element - fix out-of-order UDP packets when forwarding with UDP GSO fraglists turned on: - fix UDP header access on Fast/frag0 UDP GRO - fix IP header access and skb lookup on Fast/frag0 UDP GRO - ethtool: netlink: add missing netdev_features_change() call - net: Update window_clamp if SOCK_RCVBUF is set - igc: Fix returning wrong statistics - ch_ktls: fix multiple leaks and corner cases in Chelsio TLS offload - tunnels: Fix off-by-one in lower MTU bounds for ICMP/ICMPv6 replies - r8169: disable hw csum for short packets on all chip versions - vrf: Fix fast path output packet handling with async Netfilter rules" * tag 'net-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (65 commits) lan743x: fix use of uninitialized variable net: udp: fix IP header access and skb lookup on Fast/frag0 UDP GRO net: udp: fix UDP header access on Fast/frag0 UDP GRO devlink: Avoid overwriting port attributes of registered port vrf: Fix fast path output packet handling with async Netfilter rules cosa: Add missing kfree in error path of cosa_write net: switch to the kernel.org patchwork instance ch_ktls: stop the txq if reaches threshold ch_ktls: tcb update fails sometimes ch_ktls/cxgb4: handle partial tag alone SKBs ch_ktls: don't free skb before sending FIN ch_ktls: packet handling prior to start marker ch_ktls: Correction in middle record handling ch_ktls: missing handling of header alone ch_ktls: Correction in trimmed_len calculation cxgb4/ch_ktls: creating skbs causes panic ch_ktls: Update cheksum information ch_ktls: Correction in finding correct length cxgb4/ch_ktls: decrypted bit is not enough net/x25: Fix null-ptr-deref in x25_connect ...
2 parents 200f9d2 + edbc211 commit db7c953

Some content is hidden

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

76 files changed

+1138
-439
lines changed

Documentation/networking/netdev-FAQ.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Q: I sent a patch and I'm wondering what happened to it?
110110
Q: How can I tell whether it got merged?
111111
A: Start by looking at the main patchworks queue for netdev:
112112

113-
http://patchwork.ozlabs.org/project/netdev/list/
113+
https://patchwork.kernel.org/project/netdevbpf/list/
114114

115115
The "State" field will tell you exactly where things are at with your
116116
patch.
@@ -152,7 +152,7 @@ networking subsystem, and then hands them off to Greg.
152152

153153
There is a patchworks queue that you can see here:
154154

155-
http://patchwork.ozlabs.org/bundle/davem/stable/?state=*
155+
https://patchwork.kernel.org/bundle/netdev/stable/?state=*
156156

157157
It contains the patches which Dave has selected, but not yet handed off
158158
to Greg. If Greg already has the patch, then it will be here:

Documentation/networking/phy.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ Some of the interface modes are described below:
247247
speeds (see below.)
248248

249249
``PHY_INTERFACE_MODE_2500BASEX``
250-
This defines a variant of 1000BASE-X which is clocked 2.5 times faster,
251-
than the 802.3 standard giving a fixed bit rate of 3.125Gbaud.
250+
This defines a variant of 1000BASE-X which is clocked 2.5 times as fast
251+
as the 802.3 standard, giving a fixed bit rate of 3.125Gbaud.
252252

253253
``PHY_INTERFACE_MODE_SGMII``
254254
This is used for Cisco SGMII, which is a modification of 1000BASE-X

Documentation/process/stable-kernel-rules.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Procedure for submitting patches to the -stable tree
3939
submission guidelines as described in
4040
:ref:`Documentation/networking/netdev-FAQ.rst <netdev-FAQ>`
4141
after first checking the stable networking queue at
42-
https://patchwork.ozlabs.org/bundle/davem/stable/?series=&submitter=&state=*&q=&archive=
42+
https://patchwork.kernel.org/bundle/netdev/stable/?state=*
4343
to ensure the requested patch is not already queued up.
4444
- Security patches should not be handled (solely) by the -stable review
4545
process but should follow the procedures in

Documentation/translations/it_IT/process/stable-kernel-rules.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Procedura per sottomettere patch per i sorgenti -stable
4646
:ref:`Documentation/translations/it_IT/networking/netdev-FAQ.rst <it_netdev-FAQ>`;
4747
ma solo dopo aver verificato al seguente indirizzo che la patch non sia
4848
già in coda:
49-
https://patchwork.ozlabs.org/bundle/davem/stable/?series=&submitter=&state=*&q=&archive=
49+
https://patchwork.kernel.org/bundle/netdev/stable/?state=*
5050
- Una patch di sicurezza non dovrebbero essere gestite (solamente) dal processo
5151
di revisione -stable, ma dovrebbe seguire le procedure descritte in
5252
:ref:`Documentation/translations/it_IT/admin-guide/security-bugs.rst <it_securitybugs>`.

MAINTAINERS

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,7 +1279,7 @@ M: Igor Russkikh <[email protected]>
12791279
12801280
S: Supported
12811281
W: https://www.marvell.com/
1282-
Q: http://patchwork.ozlabs.org/project/netdev/list/
1282+
Q: https://patchwork.kernel.org/project/netdevbpf/list/
12831283
F: Documentation/networking/device_drivers/ethernet/aquantia/atlantic.rst
12841284
F: drivers/net/ethernet/aquantia/atlantic/
12851285

@@ -8830,8 +8830,8 @@ S: Supported
88308830
W: http://www.intel.com/support/feedback.htm
88318831
W: http://e1000.sourceforge.net/
88328832
Q: http://patchwork.ozlabs.org/project/intel-wired-lan/list/
8833-
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue.git
8834-
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
8833+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue.git
8834+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git
88358835
F: Documentation/networking/device_drivers/ethernet/intel/
88368836
F: drivers/net/ethernet/intel/
88378837
F: drivers/net/ethernet/intel/*/
@@ -11174,23 +11174,23 @@ M: Tariq Toukan <[email protected]>
1117411174
1117511175
S: Supported
1117611176
W: http://www.mellanox.com
11177-
Q: http://patchwork.ozlabs.org/project/netdev/list/
11177+
Q: https://patchwork.kernel.org/project/netdevbpf/list/
1117811178
F: drivers/net/ethernet/mellanox/mlx4/en_*
1117911179

1118011180
MELLANOX ETHERNET DRIVER (mlx5e)
1118111181
M: Saeed Mahameed <[email protected]>
1118211182
1118311183
S: Supported
1118411184
W: http://www.mellanox.com
11185-
Q: http://patchwork.ozlabs.org/project/netdev/list/
11185+
Q: https://patchwork.kernel.org/project/netdevbpf/list/
1118611186
F: drivers/net/ethernet/mellanox/mlx5/core/en_*
1118711187

1118811188
MELLANOX ETHERNET INNOVA DRIVERS
1118911189
R: Boris Pismenny <[email protected]>
1119011190
1119111191
S: Supported
1119211192
W: http://www.mellanox.com
11193-
Q: http://patchwork.ozlabs.org/project/netdev/list/
11193+
Q: https://patchwork.kernel.org/project/netdevbpf/list/
1119411194
F: drivers/net/ethernet/mellanox/mlx5/core/accel/*
1119511195
F: drivers/net/ethernet/mellanox/mlx5/core/en_accel/*
1119611196
F: drivers/net/ethernet/mellanox/mlx5/core/fpga/*
@@ -11202,7 +11202,7 @@ M: Ido Schimmel <[email protected]>
1120211202
1120311203
S: Supported
1120411204
W: http://www.mellanox.com
11205-
Q: http://patchwork.ozlabs.org/project/netdev/list/
11205+
Q: https://patchwork.kernel.org/project/netdevbpf/list/
1120611206
F: drivers/net/ethernet/mellanox/mlxsw/
1120711207
F: tools/testing/selftests/drivers/net/mlxsw/
1120811208

@@ -11211,7 +11211,7 @@ M: [email protected]
1121111211
1121211212
S: Supported
1121311213
W: http://www.mellanox.com
11214-
Q: http://patchwork.ozlabs.org/project/netdev/list/
11214+
Q: https://patchwork.kernel.org/project/netdevbpf/list/
1121511215
F: drivers/net/ethernet/mellanox/mlxfw/
1121611216

1121711217
MELLANOX HARDWARE PLATFORM SUPPORT
@@ -11230,7 +11230,7 @@ L: [email protected]
1123011230
1123111231
S: Supported
1123211232
W: http://www.mellanox.com
11233-
Q: http://patchwork.ozlabs.org/project/netdev/list/
11233+
Q: https://patchwork.kernel.org/project/netdevbpf/list/
1123411234
F: drivers/net/ethernet/mellanox/mlx4/
1123511235
F: include/linux/mlx4/
1123611236

@@ -11251,7 +11251,7 @@ L: [email protected]
1125111251
1125211252
S: Supported
1125311253
W: http://www.mellanox.com
11254-
Q: http://patchwork.ozlabs.org/project/netdev/list/
11254+
Q: https://patchwork.kernel.org/project/netdevbpf/list/
1125511255
F: Documentation/networking/device_drivers/ethernet/mellanox/
1125611256
F: drivers/net/ethernet/mellanox/mlx5/core/
1125711257
F: include/linux/mlx5/
@@ -12131,7 +12131,7 @@ M: Jakub Kicinski <[email protected]>
1213112131
1213212132
S: Maintained
1213312133
W: http://www.linuxfoundation.org/en/Net
12134-
Q: http://patchwork.ozlabs.org/project/netdev/list/
12134+
Q: https://patchwork.kernel.org/project/netdevbpf/list/
1213512135
T: git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
1213612136
T: git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
1213712137
F: Documentation/devicetree/bindings/net/
@@ -12176,7 +12176,7 @@ M: Jakub Kicinski <[email protected]>
1217612176
1217712177
S: Maintained
1217812178
W: http://www.linuxfoundation.org/en/Net
12179-
Q: http://patchwork.ozlabs.org/project/netdev/list/
12179+
Q: https://patchwork.kernel.org/project/netdevbpf/list/
1218012180
1218112181
T: git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
1218212182
T: git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
@@ -15247,7 +15247,6 @@ F: drivers/iommu/s390-iommu.c
1524715247
S390 IUCV NETWORK LAYER
1524815248
M: Julian Wiedmann <[email protected]>
1524915249
M: Karsten Graul <[email protected]>
15250-
M: Ursula Braun <[email protected]>
1525115250
1525215251
S: Supported
1525315252
W: http://www.ibm.com/developerworks/linux/linux390/
@@ -15258,7 +15257,6 @@ F: net/iucv/
1525815257
S390 NETWORK DRIVERS
1525915258
M: Julian Wiedmann <[email protected]>
1526015259
M: Karsten Graul <[email protected]>
15261-
M: Ursula Braun <[email protected]>
1526215260
1526315261
S: Supported
1526415262
W: http://www.ibm.com/developerworks/linux/linux390/
@@ -15829,7 +15827,6 @@ S: Maintained
1582915827
F: drivers/misc/sgi-xp/
1583015828

1583115829
SHARED MEMORY COMMUNICATIONS (SMC) SOCKETS
15832-
M: Ursula Braun <[email protected]>
1583315830
M: Karsten Graul <[email protected]>
1583415831
1583515832
S: Supported

arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
&enetc_port0 {
7676
phy-handle = <&phy0>;
7777
phy-connection-type = "sgmii";
78+
managed = "in-band-status";
7879
status = "okay";
7980

8081
mdio {

drivers/net/dsa/mv88e6xxx/devlink.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,10 @@ static int mv88e6xxx_region_atu_snapshot(struct devlink *dl,
393393
mv88e6xxx_reg_lock(chip);
394394

395395
err = mv88e6xxx_fid_map(chip, fid_bitmap);
396-
if (err)
396+
if (err) {
397+
kfree(table);
397398
goto out;
399+
}
398400

399401
while (1) {
400402
fid = find_next_bit(fid_bitmap, MV88E6XXX_N_FID, fid + 1);

drivers/net/ethernet/chelsio/cxgb4/cxgb4.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2124,6 +2124,9 @@ void cxgb4_inline_tx_skb(const struct sk_buff *skb, const struct sge_txq *q,
21242124
void cxgb4_write_sgl(const struct sk_buff *skb, struct sge_txq *q,
21252125
struct ulptx_sgl *sgl, u64 *end, unsigned int start,
21262126
const dma_addr_t *addr);
2127+
void cxgb4_write_partial_sgl(const struct sk_buff *skb, struct sge_txq *q,
2128+
struct ulptx_sgl *sgl, u64 *end,
2129+
const dma_addr_t *addr, u32 start, u32 send_len);
21272130
void cxgb4_ring_tx_db(struct adapter *adap, struct sge_txq *q, int n);
21282131
int t4_set_vlan_acl(struct adapter *adap, unsigned int mbox, unsigned int vf,
21292132
u16 vlan);

drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3573,6 +3573,8 @@ static int chcr_stats_show(struct seq_file *seq, void *v)
35733573
atomic64_read(&adap->ch_ktls_stats.ktls_tx_complete_pkts));
35743574
seq_printf(seq, "TX trim pkts : %20llu\n",
35753575
atomic64_read(&adap->ch_ktls_stats.ktls_tx_trimmed_pkts));
3576+
seq_printf(seq, "TX sw fallback : %20llu\n",
3577+
atomic64_read(&adap->ch_ktls_stats.ktls_tx_fallback));
35763578
while (i < MAX_NPORTS) {
35773579
ktls_port = &adap->ch_ktls_stats.ktls_port[i];
35783580
seq_printf(seq, "Port %d\n", i);

drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,6 +1176,7 @@ static u16 cxgb_select_queue(struct net_device *dev, struct sk_buff *skb,
11761176
txq = netdev_pick_tx(dev, skb, sb_dev);
11771177
if (xfrm_offload(skb) || is_ptp_enabled(skb, dev) ||
11781178
skb->encapsulation ||
1179+
cxgb4_is_ktls_skb(skb) ||
11791180
(proto != IPPROTO_TCP && proto != IPPROTO_UDP))
11801181
txq = txq % pi->nqsets;
11811182

drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,7 @@ struct ch_ktls_stats_debug {
388388
atomic64_t ktls_tx_retransmit_pkts;
389389
atomic64_t ktls_tx_complete_pkts;
390390
atomic64_t ktls_tx_trimmed_pkts;
391+
atomic64_t ktls_tx_fallback;
391392
};
392393
#endif
393394

@@ -493,6 +494,11 @@ struct cxgb4_uld_info {
493494
#endif
494495
};
495496

497+
static inline bool cxgb4_is_ktls_skb(struct sk_buff *skb)
498+
{
499+
return skb->sk && tls_is_sk_tx_device_offloaded(skb->sk);
500+
}
501+
496502
void cxgb4_uld_enable(struct adapter *adap);
497503
void cxgb4_register_uld(enum cxgb4_uld type, const struct cxgb4_uld_info *p);
498504
int cxgb4_unregister_uld(enum cxgb4_uld type);

drivers/net/ethernet/chelsio/cxgb4/sge.c

Lines changed: 110 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,114 @@ void cxgb4_write_sgl(const struct sk_buff *skb, struct sge_txq *q,
890890
}
891891
EXPORT_SYMBOL(cxgb4_write_sgl);
892892

893+
/* cxgb4_write_partial_sgl - populate SGL for partial packet
894+
* @skb: the packet
895+
* @q: the Tx queue we are writing into
896+
* @sgl: starting location for writing the SGL
897+
* @end: points right after the end of the SGL
898+
* @addr: the list of bus addresses for the SGL elements
899+
* @start: start offset in the SKB where partial data starts
900+
* @len: length of data from @start to send out
901+
*
902+
* This API will handle sending out partial data of a skb if required.
903+
* Unlike cxgb4_write_sgl, @start can be any offset into the skb data,
904+
* and @len will decide how much data after @start offset to send out.
905+
*/
906+
void cxgb4_write_partial_sgl(const struct sk_buff *skb, struct sge_txq *q,
907+
struct ulptx_sgl *sgl, u64 *end,
908+
const dma_addr_t *addr, u32 start, u32 len)
909+
{
910+
struct ulptx_sge_pair buf[MAX_SKB_FRAGS / 2 + 1] = {0}, *to;
911+
u32 frag_size, skb_linear_data_len = skb_headlen(skb);
912+
struct skb_shared_info *si = skb_shinfo(skb);
913+
u8 i = 0, frag_idx = 0, nfrags = 0;
914+
skb_frag_t *frag;
915+
916+
/* Fill the first SGL either from linear data or from partial
917+
* frag based on @start.
918+
*/
919+
if (unlikely(start < skb_linear_data_len)) {
920+
frag_size = min(len, skb_linear_data_len - start);
921+
sgl->len0 = htonl(frag_size);
922+
sgl->addr0 = cpu_to_be64(addr[0] + start);
923+
len -= frag_size;
924+
nfrags++;
925+
} else {
926+
start -= skb_linear_data_len;
927+
frag = &si->frags[frag_idx];
928+
frag_size = skb_frag_size(frag);
929+
/* find the first frag */
930+
while (start >= frag_size) {
931+
start -= frag_size;
932+
frag_idx++;
933+
frag = &si->frags[frag_idx];
934+
frag_size = skb_frag_size(frag);
935+
}
936+
937+
frag_size = min(len, skb_frag_size(frag) - start);
938+
sgl->len0 = cpu_to_be32(frag_size);
939+
sgl->addr0 = cpu_to_be64(addr[frag_idx + 1] + start);
940+
len -= frag_size;
941+
nfrags++;
942+
frag_idx++;
943+
}
944+
945+
/* If the entire partial data fit in one SGL, then send it out
946+
* now.
947+
*/
948+
if (!len)
949+
goto done;
950+
951+
/* Most of the complexity below deals with the possibility we hit the
952+
* end of the queue in the middle of writing the SGL. For this case
953+
* only we create the SGL in a temporary buffer and then copy it.
954+
*/
955+
to = (u8 *)end > (u8 *)q->stat ? buf : sgl->sge;
956+
957+
/* If the skb couldn't fit in first SGL completely, fill the
958+
* rest of the frags in subsequent SGLs. Note that each SGL
959+
* pair can store 2 frags.
960+
*/
961+
while (len) {
962+
frag_size = min(len, skb_frag_size(&si->frags[frag_idx]));
963+
to->len[i & 1] = cpu_to_be32(frag_size);
964+
to->addr[i & 1] = cpu_to_be64(addr[frag_idx + 1]);
965+
if (i && (i & 1))
966+
to++;
967+
nfrags++;
968+
frag_idx++;
969+
i++;
970+
len -= frag_size;
971+
}
972+
973+
/* If we ended in an odd boundary, then set the second SGL's
974+
* length in the pair to 0.
975+
*/
976+
if (i & 1)
977+
to->len[1] = cpu_to_be32(0);
978+
979+
/* Copy from temporary buffer to Tx ring, in case we hit the
980+
* end of the queue in the middle of writing the SGL.
981+
*/
982+
if (unlikely((u8 *)end > (u8 *)q->stat)) {
983+
u32 part0 = (u8 *)q->stat - (u8 *)sgl->sge, part1;
984+
985+
if (likely(part0))
986+
memcpy(sgl->sge, buf, part0);
987+
part1 = (u8 *)end - (u8 *)q->stat;
988+
memcpy(q->desc, (u8 *)buf + part0, part1);
989+
end = (void *)q->desc + part1;
990+
}
991+
992+
/* 0-pad to multiple of 16 */
993+
if ((uintptr_t)end & 8)
994+
*end = 0;
995+
done:
996+
sgl->cmd_nsge = htonl(ULPTX_CMD_V(ULP_TX_SC_DSGL) |
997+
ULPTX_NSGE_V(nfrags));
998+
}
999+
EXPORT_SYMBOL(cxgb4_write_partial_sgl);
1000+
8931001
/* This function copies 64 byte coalesced work request to
8941002
* memory mapped BAR2 space. For coalesced WR SGE fetches
8951003
* data from the FIFO instead of from Host.
@@ -1422,7 +1530,8 @@ static netdev_tx_t cxgb4_eth_xmit(struct sk_buff *skb, struct net_device *dev)
14221530
#endif /* CHELSIO_IPSEC_INLINE */
14231531

14241532
#if IS_ENABLED(CONFIG_CHELSIO_TLS_DEVICE)
1425-
if (skb->decrypted)
1533+
if (cxgb4_is_ktls_skb(skb) &&
1534+
(skb->len - (skb_transport_offset(skb) + tcp_hdrlen(skb))))
14261535
return adap->uld[CXGB4_ULD_KTLS].tx_handler(skb, dev);
14271536
#endif /* CHELSIO_TLS_DEVICE */
14281537

0 commit comments

Comments
 (0)