Skip to content

Commit 7d0ae23

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Fix endless loop in nf_tables, from Phil Sutter. 2) Fix cross namespace ip6_gre tunnel hash list corruption, from Olivier Matz. 3) Don't be too strict in phy_start_aneg() otherwise we might not allow restarting auto negotiation. From Heiner Kallweit. 4) Fix various KMSAN uninitialized value cases in tipc, from Ying Xue. 5) Memory leak in act_tunnel_key, from Davide Caratti. 6) Handle chip errata of mv88e6390 PHY, from Andrew Lunn. 7) Remove linear SKB assumption in fou/fou6, from Eric Dumazet. 8) Missing udplite rehash callbacks, from Alexey Kodanev. 9) Log dirty pages properly in vhost, from Jason Wang. 10) Use consume_skb() in neigh_probe() as this is a normal free not a drop, from Yang Wei. Likewise in macvlan_process_broadcast(). 11) Missing device_del() in mdiobus_register() error paths, from Thomas Petazzoni. 12) Fix checksum handling of short packets in mlx5, from Cong Wang. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (96 commits) bpf: in __bpf_redirect_no_mac pull mac only if present virtio_net: bulk free tx skbs net: phy: phy driver features are mandatory isdn: avm: Fix string plus integer warning from Clang net/mlx5e: Fix cb_ident duplicate in indirect block register net/mlx5e: Fix wrong (zero) TX drop counter indication for representor net/mlx5e: Fix wrong error code return on FEC query failure net/mlx5e: Force CHECKSUM_UNNECESSARY for short ethernet frames tools: bpftool: Cleanup license mess bpf: fix inner map masking to prevent oob under speculation bpf: pull in pkt_sched.h header for tooling to fix bpftool build selftests: forwarding: Add a test case for externally learned FDB entries selftests: mlxsw: Test FDB offload indication mlxsw: spectrum_switchdev: Do not treat static FDB entries as sticky net: bridge: Mark FDB entries that were added by user as such mlxsw: spectrum_fid: Update dummy FID index mlxsw: pci: Return error on PCI reset timeout mlxsw: pci: Increase PCI SW reset timeout mlxsw: pci: Ring CQ's doorbell before RDQ's MAINTAINERS: update email addresses of liquidio driver maintainers ...
2 parents bb617b9 + 6436408 commit 7d0ae23

File tree

114 files changed

+2090
-602
lines changed

Some content is hidden

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

114 files changed

+2090
-602
lines changed

Documentation/networking/index.rst

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ Contents:
1111
batman-adv
1212
can
1313
can_ucan_protocol
14-
dpaa2/index
15-
e100
16-
e1000
17-
e1000e
18-
fm10k
19-
igb
20-
igbvf
21-
ixgb
22-
ixgbe
23-
ixgbevf
24-
i40e
25-
iavf
26-
ice
14+
device_drivers/freescale/dpaa2/index
15+
device_drivers/intel/e100
16+
device_drivers/intel/e1000
17+
device_drivers/intel/e1000e
18+
device_drivers/intel/fm10k
19+
device_drivers/intel/igb
20+
device_drivers/intel/igbvf
21+
device_drivers/intel/ixgb
22+
device_drivers/intel/ixgbe
23+
device_drivers/intel/ixgbevf
24+
device_drivers/intel/i40e
25+
device_drivers/intel/iavf
26+
device_drivers/intel/ice
2727
kapi
2828
z8530book
2929
msg_zerocopy

Documentation/networking/rxrpc.txt

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,51 +1000,6 @@ The kernel interface functions are as follows:
10001000
size should be set when the call is begun. tx_total_len may not be less
10011001
than zero.
10021002

1003-
(*) Check to see the completion state of a call so that the caller can assess
1004-
whether it needs to be retried.
1005-
1006-
enum rxrpc_call_completion {
1007-
RXRPC_CALL_SUCCEEDED,
1008-
RXRPC_CALL_REMOTELY_ABORTED,
1009-
RXRPC_CALL_LOCALLY_ABORTED,
1010-
RXRPC_CALL_LOCAL_ERROR,
1011-
RXRPC_CALL_NETWORK_ERROR,
1012-
};
1013-
1014-
int rxrpc_kernel_check_call(struct socket *sock, struct rxrpc_call *call,
1015-
enum rxrpc_call_completion *_compl,
1016-
u32 *_abort_code);
1017-
1018-
On return, -EINPROGRESS will be returned if the call is still ongoing; if
1019-
it is finished, *_compl will be set to indicate the manner of completion,
1020-
*_abort_code will be set to any abort code that occurred. 0 will be
1021-
returned on a successful completion, -ECONNABORTED will be returned if the
1022-
client failed due to a remote abort and anything else will return an
1023-
appropriate error code.
1024-
1025-
The caller should look at this information to decide if it's worth
1026-
retrying the call.
1027-
1028-
(*) Retry a client call.
1029-
1030-
int rxrpc_kernel_retry_call(struct socket *sock,
1031-
struct rxrpc_call *call,
1032-
struct sockaddr_rxrpc *srx,
1033-
struct key *key);
1034-
1035-
This attempts to partially reinitialise a call and submit it again while
1036-
reusing the original call's Tx queue to avoid the need to repackage and
1037-
re-encrypt the data to be sent. call indicates the call to retry, srx the
1038-
new address to send it to and key the encryption key to use for signing or
1039-
encrypting the packets.
1040-
1041-
For this to work, the first Tx data packet must still be in the transmit
1042-
queue, and currently this is only permitted for local and network errors
1043-
and the call must not have been aborted. Any partially constructed Tx
1044-
packet is left as is and can continue being filled afterwards.
1045-
1046-
It returns 0 if the call was requeued and an error otherwise.
1047-
10481003
(*) Get call RTT.
10491004

10501005
u64 rxrpc_kernel_get_rtt(struct socket *sock, struct rxrpc_call *call);

Documentation/networking/snmp_counter.rst

Lines changed: 125 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,26 @@ time client replies ACK, this socket will get another chance to move
336336
to the accept queue.
337337

338338

339-
TCP Fast Open
339+
* TcpEstabResets
340+
Defined in `RFC1213 tcpEstabResets`_.
341+
342+
.. _RFC1213 tcpEstabResets: https://tools.ietf.org/html/rfc1213#page-48
343+
344+
* TcpAttemptFails
345+
Defined in `RFC1213 tcpAttemptFails`_.
346+
347+
.. _RFC1213 tcpAttemptFails: https://tools.ietf.org/html/rfc1213#page-48
348+
349+
* TcpOutRsts
350+
Defined in `RFC1213 tcpOutRsts`_. The RFC says this counter indicates
351+
the 'segments sent containing the RST flag', but in linux kernel, this
352+
couner indicates the segments kerenl tried to send. The sending
353+
process might be failed due to some errors (e.g. memory alloc failed).
354+
355+
.. _RFC1213 tcpOutRsts: https://tools.ietf.org/html/rfc1213#page-52
356+
357+
358+
TCP Fast Path
340359
============
341360
When kernel receives a TCP packet, it has two paths to handler the
342361
packet, one is fast path, another is slow path. The comment in kernel
@@ -383,8 +402,6 @@ increase 1.
383402

384403
TCP abort
385404
========
386-
387-
388405
* TcpExtTCPAbortOnData
389406
It means TCP layer has data in flight, but need to close the
390407
connection. So TCP layer sends a RST to the other side, indicate the
@@ -545,7 +562,6 @@ packet yet, the sender would know packet 4 is out of order. The TCP
545562
stack of kernel will increase TcpExtTCPSACKReorder for both of the
546563
above scenarios.
547564

548-
549565
DSACK
550566
=====
551567
The DSACK is defined in `RFC2883`_. The receiver uses DSACK to report
@@ -566,13 +582,63 @@ The TCP stack receives an out of order duplicate packet, so it sends a
566582
DSACK to the sender.
567583

568584
* TcpExtTCPDSACKRecv
569-
The TCP stack receives a DSACK, which indicate an acknowledged
585+
The TCP stack receives a DSACK, which indicates an acknowledged
570586
duplicate packet is received.
571587

572588
* TcpExtTCPDSACKOfoRecv
573589
The TCP stack receives a DSACK, which indicate an out of order
574590
duplicate packet is received.
575591

592+
invalid SACK and DSACK
593+
====================
594+
When a SACK (or DSACK) block is invalid, a corresponding counter would
595+
be updated. The validation method is base on the start/end sequence
596+
number of the SACK block. For more details, please refer the comment
597+
of the function tcp_is_sackblock_valid in the kernel source code. A
598+
SACK option could have up to 4 blocks, they are checked
599+
individually. E.g., if 3 blocks of a SACk is invalid, the
600+
corresponding counter would be updated 3 times. The comment of the
601+
`Add counters for discarded SACK blocks`_ patch has additional
602+
explaination:
603+
604+
.. _Add counters for discarded SACK blocks: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=18f02545a9a16c9a89778b91a162ad16d510bb32
605+
606+
* TcpExtTCPSACKDiscard
607+
This counter indicates how many SACK blocks are invalid. If the invalid
608+
SACK block is caused by ACK recording, the TCP stack will only ignore
609+
it and won't update this counter.
610+
611+
* TcpExtTCPDSACKIgnoredOld and TcpExtTCPDSACKIgnoredNoUndo
612+
When a DSACK block is invalid, one of these two counters would be
613+
updated. Which counter will be updated depends on the undo_marker flag
614+
of the TCP socket. If the undo_marker is not set, the TCP stack isn't
615+
likely to re-transmit any packets, and we still receive an invalid
616+
DSACK block, the reason might be that the packet is duplicated in the
617+
middle of the network. In such scenario, TcpExtTCPDSACKIgnoredNoUndo
618+
will be updated. If the undo_marker is set, TcpExtTCPDSACKIgnoredOld
619+
will be updated. As implied in its name, it might be an old packet.
620+
621+
SACK shift
622+
=========
623+
The linux networking stack stores data in sk_buff struct (skb for
624+
short). If a SACK block acrosses multiple skb, the TCP stack will try
625+
to re-arrange data in these skb. E.g. if a SACK block acknowledges seq
626+
10 to 15, skb1 has seq 10 to 13, skb2 has seq 14 to 20. The seq 14 and
627+
15 in skb2 would be moved to skb1. This operation is 'shift'. If a
628+
SACK block acknowledges seq 10 to 20, skb1 has seq 10 to 13, skb2 has
629+
seq 14 to 20. All data in skb2 will be moved to skb1, and skb2 will be
630+
discard, this operation is 'merge'.
631+
632+
* TcpExtTCPSackShifted
633+
A skb is shifted
634+
635+
* TcpExtTCPSackMerged
636+
A skb is merged
637+
638+
* TcpExtTCPSackShiftFallback
639+
A skb should be shifted or merged, but the TCP stack doesn't do it for
640+
some reasons.
641+
576642
TCP out of order
577643
===============
578644
* TcpExtTCPOFOQueue
@@ -662,6 +728,60 @@ unacknowledged number (more strict than `RFC 5961 section 5.2`_).
662728
.. _RFC 5961 section 4.2: https://tools.ietf.org/html/rfc5961#page-9
663729
.. _RFC 5961 section 5.2: https://tools.ietf.org/html/rfc5961#page-11
664730

731+
TCP receive window
732+
=================
733+
* TcpExtTCPWantZeroWindowAdv
734+
Depending on current memory usage, the TCP stack tries to set receive
735+
window to zero. But the receive window might still be a no-zero
736+
value. For example, if the previous window size is 10, and the TCP
737+
stack receives 3 bytes, the current window size would be 7 even if the
738+
window size calculated by the memory usage is zero.
739+
740+
* TcpExtTCPToZeroWindowAdv
741+
The TCP receive window is set to zero from a no-zero value.
742+
743+
* TcpExtTCPFromZeroWindowAdv
744+
The TCP receive window is set to no-zero value from zero.
745+
746+
747+
Delayed ACK
748+
==========
749+
The TCP Delayed ACK is a technique which is used for reducing the
750+
packet count in the network. For more details, please refer the
751+
`Delayed ACK wiki`_
752+
753+
.. _Delayed ACK wiki: https://en.wikipedia.org/wiki/TCP_delayed_acknowledgment
754+
755+
* TcpExtDelayedACKs
756+
A delayed ACK timer expires. The TCP stack will send a pure ACK packet
757+
and exit the delayed ACK mode.
758+
759+
* TcpExtDelayedACKLocked
760+
A delayed ACK timer expires, but the TCP stack can't send an ACK
761+
immediately due to the socket is locked by a userspace program. The
762+
TCP stack will send a pure ACK later (after the userspace program
763+
unlock the socket). When the TCP stack sends the pure ACK later, the
764+
TCP stack will also update TcpExtDelayedACKs and exit the delayed ACK
765+
mode.
766+
767+
* TcpExtDelayedACKLost
768+
It will be updated when the TCP stack receives a packet which has been
769+
ACKed. A Delayed ACK loss might cause this issue, but it would also be
770+
triggered by other reasons, such as a packet is duplicated in the
771+
network.
772+
773+
Tail Loss Probe (TLP)
774+
===================
775+
TLP is an algorithm which is used to detect TCP packet loss. For more
776+
details, please refer the `TLP paper`_.
777+
778+
.. _TLP paper: https://tools.ietf.org/html/draft-dukkipati-tcpm-tcp-loss-probe-01
779+
780+
* TcpExtTCPLossProbes
781+
A TLP probe packet is sent.
782+
783+
* TcpExtTCPLossProbeRecovery
784+
A packet loss is detected and recovered by TLP.
665785

666786
examples
667787
=======

Documentation/networking/timestamping.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ is again deprecated and ts[2] holds a hardware timestamp if set.
417417

418418
Hardware time stamping must also be initialized for each device driver
419419
that is expected to do hardware time stamping. The parameter is defined in
420-
/include/linux/net_tstamp.h as:
420+
include/uapi/linux/net_tstamp.h as:
421421

422422
struct hwtstamp_config {
423423
int flags; /* no flags defined right now, must be zero */
@@ -487,7 +487,7 @@ enum {
487487
HWTSTAMP_FILTER_PTP_V1_L4_EVENT,
488488

489489
/* for the complete list of values, please check
490-
* the include file /include/linux/net_tstamp.h
490+
* the include file include/uapi/linux/net_tstamp.h
491491
*/
492492
};
493493

MAINTAINERS

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3471,10 +3471,9 @@ F: drivers/i2c/busses/i2c-octeon*
34713471
F: drivers/i2c/busses/i2c-thunderx*
34723472

34733473
CAVIUM LIQUIDIO NETWORK DRIVER
3474-
M: Derek Chickles <derek.chickles@caviumnetworks.com>
3475-
M: Satanand Burla <satananda.burla@caviumnetworks.com>
3476-
M: Felix Manlunas <felix.manlunas@caviumnetworks.com>
3477-
M: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com>
3474+
M: Derek Chickles <dchickles@marvell.com>
3475+
M: Satanand Burla <sburla@marvell.com>
3476+
M: Felix Manlunas <fmanlunas@marvell.com>
34783477
L: netdev@vger.kernel.org
34793478
W: http://www.cavium.com
34803479
S: Supported

drivers/atm/he.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ static int he_init_cs_block_rcm(struct he_dev *he_dev)
718718
instead of '/ 512', use '>> 9' to prevent a call
719719
to divdu3 on x86 platforms
720720
*/
721-
rate_cps = (unsigned long long) (1 << exp) * (man + 512) >> 9;
721+
rate_cps = (unsigned long long) (1UL << exp) * (man + 512) >> 9;
722722

723723
if (rate_cps < 10)
724724
rate_cps = 10; /* 2.2.1 minimum payload rate is 10 cps */

drivers/isdn/hardware/avm/b1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ void b1_parse_version(avmctrl_info *cinfo)
423423
int i, j;
424424

425425
for (j = 0; j < AVM_MAXVERSION; j++)
426-
cinfo->version[j] = "\0\0" + 1;
426+
cinfo->version[j] = "";
427427
for (i = 0, j = 0;
428428
j < AVM_MAXVERSION && i < cinfo->versionlen;
429429
j++, i += cinfo->versionbuf[i] + 1)

drivers/net/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ config NET_FAILOVER
519519
and destroy a failover master netdev and manages a primary and
520520
standby slave netdevs that get registered via the generic failover
521521
infrastructure. This can be used by paravirtual drivers to enable
522-
an alternate low latency datapath. It alsoenables live migration of
522+
an alternate low latency datapath. It also enables live migration of
523523
a VM with direct attached VF by failing over to the paravirtual
524524
datapath when the VF is unplugged.
525525

drivers/net/dsa/realtek-smi.c

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -347,16 +347,17 @@ int realtek_smi_setup_mdio(struct realtek_smi *smi)
347347
struct device_node *mdio_np;
348348
int ret;
349349

350-
mdio_np = of_find_compatible_node(smi->dev->of_node, NULL,
351-
"realtek,smi-mdio");
350+
mdio_np = of_get_compatible_child(smi->dev->of_node, "realtek,smi-mdio");
352351
if (!mdio_np) {
353352
dev_err(smi->dev, "no MDIO bus node\n");
354353
return -ENODEV;
355354
}
356355

357356
smi->slave_mii_bus = devm_mdiobus_alloc(smi->dev);
358-
if (!smi->slave_mii_bus)
359-
return -ENOMEM;
357+
if (!smi->slave_mii_bus) {
358+
ret = -ENOMEM;
359+
goto err_put_node;
360+
}
360361
smi->slave_mii_bus->priv = smi;
361362
smi->slave_mii_bus->name = "SMI slave MII";
362363
smi->slave_mii_bus->read = realtek_smi_mdio_read;
@@ -371,10 +372,15 @@ int realtek_smi_setup_mdio(struct realtek_smi *smi)
371372
if (ret) {
372373
dev_err(smi->dev, "unable to register MDIO bus %s\n",
373374
smi->slave_mii_bus->id);
374-
of_node_put(mdio_np);
375+
goto err_put_node;
375376
}
376377

377378
return 0;
379+
380+
err_put_node:
381+
of_node_put(mdio_np);
382+
383+
return ret;
378384
}
379385

380386
static int realtek_smi_probe(struct platform_device *pdev)
@@ -457,6 +463,8 @@ static int realtek_smi_remove(struct platform_device *pdev)
457463
struct realtek_smi *smi = dev_get_drvdata(&pdev->dev);
458464

459465
dsa_unregister_switch(smi->ds);
466+
if (smi->slave_mii_bus)
467+
of_node_put(smi->slave_mii_bus->dev.of_node);
460468
gpiod_set_value(smi->reset, 1);
461469

462470
return 0;

drivers/net/ethernet/amd/xgbe/xgbe-common.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,6 @@
431431
#define MAC_MDIOSCAR_PA_WIDTH 5
432432
#define MAC_MDIOSCAR_RA_INDEX 0
433433
#define MAC_MDIOSCAR_RA_WIDTH 16
434-
#define MAC_MDIOSCAR_REG_INDEX 0
435-
#define MAC_MDIOSCAR_REG_WIDTH 21
436434
#define MAC_MDIOSCCDR_BUSY_INDEX 22
437435
#define MAC_MDIOSCCDR_BUSY_WIDTH 1
438436
#define MAC_MDIOSCCDR_CMD_INDEX 16

0 commit comments

Comments
 (0)