OpenCloudOS-Kernel/drivers/net/ethernet
Petr Machata c6b36bdd04 mlxsw: spectrum_ptp: Increase parsing depth when PTP is enabled
Spectrum systems have a configurable limit on how far into the packet they
parse. By default, the limit is 96 bytes.

An IPv6 PTP packet is layered as Ethernet/IPv6/UDP (14+40+8 bytes), and
sequence ID of a PTP event is only available 32 bytes into payload, for a
total of 94 bytes. When an additional 802.1q header is present as
well (such as when ptp4l is running on a VLAN port), the parsing limit is
exceeded. Such packets are not recognized as PTP, and are not timestamped.

Therefore generalize the current VXLAN-specific parsing depth setting to
allow reference-counted requests from other modules as well. Keep it in the
VXLAN module, because the MPRS register also configures UDP destination
port number used for VXLAN, and is thus closely tied to the VXLAN code
anyway.

Then invoke the new interfaces from both VXLAN (in obvious places), as well
as from PTP code, when the (global) timestamping configuration changes from
disabled to enabled or vice versa.

Fixes: 8748642751 ("mlxsw: spectrum: PTP: Support SIOCGHWTSTAMP, SIOCSHWTSTAMP ioctls")
Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-07-29 13:55:05 -07:00
..
3com
8390 SPDX update for 5.2-rc6 2019-06-21 09:58:42 -07:00
adaptec
aeroflex
agere
alacritech treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
allwinner Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-07-08 19:48:57 -07:00
alteon
altera
amazon Revert "net: ena: ethtool: add extra properties retrieval via get_priv_flags" 2019-06-26 09:07:39 -07:00
amd treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
apm
apple
aquantia Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-06-27 21:06:39 -07:00
arc treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
atheros ag71xx: fix return value check in ag71xx_probe() 2019-07-18 20:33:48 -07:00
aurora
broadcom bnx2x: Disable multi-cos feature. 2019-07-25 17:09:26 -07:00
brocade treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 292 2019-06-05 17:36:38 +02:00
cadence Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-07-08 19:48:57 -07:00
calxeda net/ethernet: using dev_get_drvdata directly 2019-07-05 15:25:04 -07:00
cavium net: thunderx: Use fwnode_get_mac_address() 2019-07-23 14:09:21 -07:00
chelsio cxgb4: Prefer pcie_capability_read_word() 2019-07-21 13:29:47 -07:00
cirrus
cisco
cortina
davicom
dec
dlink
emulex be2net: Synchronize be_update_queues with dev_watchdog 2019-07-21 13:22:03 -07:00
ezchip treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 291 2019-06-05 17:36:38 +02:00
faraday Linux 5.2-rc4 2019-06-14 14:18:53 -06:00
freescale fsl/fman: Remove comment referring to non-existent function 2019-07-25 11:53:37 -07:00
fujitsu
google gve: replace kfree with kvfree 2019-07-18 16:31:27 -07:00
hisilicon Revert "net: hns: fix LED configuration for marvell phy" 2019-07-22 20:44:48 -07:00
hp
huawei hinic: add fw version query 2019-07-07 22:15:12 -07:00
i825xx treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ibm net: ehea: Mark expected switch fall-through 2019-07-29 11:11:51 -07:00
intel igc: Prefer pcie_capability_read_word() 2019-07-21 13:29:47 -07:00
marvell mvpp2: refactor the HW checksum setup 2019-07-29 11:08:43 -07:00
mediatek net: ethernet: mediatek: mtk_eth_soc: Add of_node_put() before goto 2019-07-16 12:38:37 -07:00
mellanox mlxsw: spectrum_ptp: Increase parsing depth when PTP is enabled 2019-07-29 13:55:05 -07:00
micrel treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
microchip treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
moxa
mscc ocelot: Cancel delayed work before wq destruction 2019-07-26 14:11:30 -07:00
myricom
natsemi
neterion ethernet: remove redundant memset 2019-07-15 11:06:27 -07:00
netronome mlx5-fixes-2019-07-25 2019-07-26 14:26:41 -07:00
ni net: nixge: Fix misuse of strlcpy 2019-07-07 19:23:05 -07:00
nuvoton treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
nvidia
nxp
oki-semi treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 340 2019-06-05 17:37:07 +02:00
packetengines
pasemi net: pasemi: fix an use-after-free in pasemi_mac_phy_init() 2019-07-08 16:33:02 -07:00
qlogic qed: RDMA - Fix the hw_ver returned in device attributes 2019-07-26 14:05:41 -07:00
qualcomm net: qualcomm: rmnet: Fix incorrect UL checksum offload logic 2019-07-26 14:20:06 -07:00
rdc
realtek r8169: don't use MSI before RTL8168d 2019-07-27 14:30:13 -07:00
renesas
rocker rocker: fix memory leaks of fib_work on two error return paths 2019-07-29 10:58:06 -07:00
samsung treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
seeq treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sfc sfc: Remove 'PCIE error reporting unavailable' 2019-07-08 12:16:48 -07:00
sgi
silan
sis sis900: correct a few typos 2019-07-14 12:22:11 -07:00
smsc docs: kbuild: convert docs to ReST and rename to *.rst 2019-06-14 14:21:21 -06:00
socionext net: netsec: remove static declaration for netsec_set_tx_de() 2019-07-09 14:46:40 -07:00
stmicro net: stmmac: manage errors returned by of_get_mac_address() 2019-07-29 10:57:10 -07:00
sun net: ethernet: sun: remove redundant assignment to variable err 2019-07-04 12:12:13 -07:00
synopsys
tehuti
ti net: ethernet: ti: cpsw: Add of_node_put() before return and break 2019-07-16 12:37:30 -07:00
toshiba net: spider_net: Mark expected switch fall-through 2019-07-29 11:12:21 -07:00
tundra
via net: ipv4: provide __rcu annotation for ifa_list 2019-06-02 18:08:36 -07:00
wiznet net: ethernet: wiznet: w5X00 add device tree support 2019-06-12 09:52:04 -07:00
xilinx net: axienet: fix a potential double free in axienet_probe() 2019-07-08 16:28:32 -07:00
xircom
xscale
Kconfig gve: Add basic driver framework for Compute Engine Virtual NIC 2019-07-01 19:36:35 -07:00
Makefile gve: Add basic driver framework for Compute Engine Virtual NIC 2019-07-01 19:36:35 -07:00
dnet.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
dnet.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ec_bhf.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
ethoc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fealnx.c
jme.c ethernet: remove redundant memset 2019-07-15 11:06:27 -07:00
jme.h
korina.c
lantiq_etop.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
lantiq_xrx200.c
netx-eth.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00