The following commit has been merged in the master branch: commit 11a3f577a7c4404f9e72ad1b0c6696a5aba544e3 Merge: d0ee1bc6b6df5adef0113369b1db2093f33901e1 550cbea0b0f0c1d619a9d43d68d646db17964c36 Author: Stephen Rothwell sfr@canb.auug.org.au Date: Fri May 1 13:09:58 2020 +1000
Merge remote-tracking branch 'net-next/master'
# Conflicts: # drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c # drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c # include/linux/mlx5/mlx5_ifc.h # include/net/mptcp.h
diff --combined Documentation/admin-guide/kernel-parameters.txt index 554240da88c7,398c34804bb8..d2d2dd5a9ad0 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@@ -356,7 -356,7 +356,7 @@@ shot down by NMI
autoconf= [IPV6] - See Documentation/networking/ipv6.txt. + See Documentation/networking/ipv6.rst.
show_lapic= [APIC,X86] Advanced Programmable Interrupt Controller Limit apic dumping. The parameter defines the maximal @@@ -458,7 -458,7 +458,7 @@@ bttv.card= [HW,V4L] bttv (bt848 + bt878 based grabber cards) bttv.radio= Most important insmod options are available as kernel args too. - bttv.pll= See Documentation/media/v4l-drivers/bttv.rst + bttv.pll= See Documentation/admin-guide/media/bttv.rst bttv.tuner=
bulk_remove=off [PPC] This parameter disables the use of the pSeries @@@ -638,7 -638,7 +638,7 @@@
See Documentation/admin-guide/serial-console.rst for more information. See - Documentation/networking/netconsole.txt for an + Documentation/networking/netconsole.rst for an alternative.
uart[8250],io,<addr>[,options] @@@ -831,7 -831,7 +831,7 @@@
decnet.addr= [HW,NET] Format: <area>[,<node>] - See also Documentation/networking/decnet.txt. + See also Documentation/networking/decnet.rst.
default_hugepagesz= [same as hugepagesz=] The size of the default @@@ -872,7 -872,7 +872,7 @@@ miss to occur.
disable= [IPV6] - See Documentation/networking/ipv6.txt. + See Documentation/networking/ipv6.rst.
hardened_usercopy= [KNL] Under CONFIG_HARDENED_USERCOPY, whether @@@ -912,7 -912,7 +912,7 @@@ to workaround buggy firmware.
disable_ipv6= [IPV6] - See Documentation/networking/ipv6.txt. + See Documentation/networking/ipv6.rst.
disable_mtrr_cleanup [X86] The kernel tries to adjust MTRR layout from continuous @@@ -2705,7 -2705,7 +2705,7 @@@ See Documentation/admin-guide/pm/sleep-states.rst.
meye.*= [HW] Set MotionEye Camera parameters - See Documentation/media/v4l-drivers/meye.rst. + See Documentation/admin-guide/media/meye.rst.
mfgpt_irq= [IA-32] Specify the IRQ to use for the Multi-Function General Purpose Timers on AMD Geode @@@ -3669,8 -3669,6 +3669,8 @@@ may put more devices in an IOMMU group. force_floating [S390] Force usage of floating interrupts. nomio [S390] Do not use MIO instructions. + norid [S390] ignore the RID field and force use of + one PCI domain per PCI function
pcie_aspm= [PCIE] Forcibly enable or disable PCIe Active State Power Management. @@@ -4912,7 -4910,7 +4912,7 @@@ Set the number of tcp_metrics_hash slots. Default value is 8192 or 16384 depending on total ram pages. This is used to specify the TCP metrics - cache size. See Documentation/networking/ip-sysctl.txt + cache size. See Documentation/networking/ip-sysctl.rst "tcp_no_metrics_save" section for more details.
tdfx= [HW,DRM] @@@ -5189,7 -5187,8 +5189,7 @@@
usbcore.old_scheme_first= [USB] Start with the old device initialization - scheme, applies only to low and full-speed devices - (default 0 = off). + scheme (default 0 = off).
usbcore.usbfs_memory_mb= [USB] Memory limit (in MB) for buffers allocated by diff --combined MAINTAINERS index d14a31627fae,0ac9cec0bce6..a1fdc1f88076 --- a/MAINTAINERS +++ b/MAINTAINERS @@@ -193,7 -193,7 +193,7 @@@ W: https://wireless.wiki.kernel.org T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git F: Documentation/driver-api/80211/cfg80211.rst - F: Documentation/networking/regulatory.txt + F: Documentation/networking/regulatory.rst F: include/linux/ieee80211.h F: include/net/cfg80211.h F: include/net/ieee80211_radiotap.h @@@ -570,7 -570,7 +570,7 @@@ F: Documentation/devicetree/bindings/ii F: drivers/input/misc/adxl34x.c
ADXL372 THREE-AXIS DIGITAL ACCELEROMETER DRIVER -M: Stefan Popa stefan.popa@analog.com +M: Michael Hennerich michael.hennerich@analog.com S: Supported W: http://ez.analog.com/community/linux-device-drivers F: Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml @@@ -922,7 -922,7 +922,7 @@@ F: arch/arm64/boot/dts/amd/amd-seattle- F: drivers/net/ethernet/amd/xgbe/
ANALOG DEVICES INC AD5686 DRIVER -M: Stefan Popa stefan.popa@analog.com +M: Michael Hennerich Michael.Hennerich@analog.com L: linux-pm@vger.kernel.org S: Supported W: http://ez.analog.com/community/linux-device-drivers @@@ -930,7 -930,7 +930,7 @@@ F: drivers/iio/dac/ad5686 F: drivers/iio/dac/ad5696*
ANALOG DEVICES INC AD5758 DRIVER -M: Stefan Popa stefan.popa@analog.com +M: Michael Hennerich Michael.Hennerich@analog.com L: linux-iio@vger.kernel.org S: Supported W: http://ez.analog.com/community/linux-device-drivers @@@ -946,7 -946,7 +946,7 @@@ F: Documentation/devicetree/bindings/ii F: drivers/iio/adc/ad7091r5.c
ANALOG DEVICES INC AD7124 DRIVER -M: Stefan Popa stefan.popa@analog.com +M: Michael Hennerich Michael.Hennerich@analog.com L: linux-iio@vger.kernel.org S: Supported W: http://ez.analog.com/community/linux-device-drivers @@@ -970,7 -970,7 +970,7 @@@ F: Documentation/devicetree/bindings/ii F: drivers/iio/adc/ad7292.c
ANALOG DEVICES INC AD7606 DRIVER -M: Stefan Popa stefan.popa@analog.com +M: Michael Hennerich Michael.Hennerich@analog.com M: Beniamin Bia beniamin.bia@analog.com L: linux-iio@vger.kernel.org S: Supported @@@ -979,7 -979,7 +979,7 @@@ F: Documentation/devicetree/bindings/ii F: drivers/iio/adc/ad7606.c
ANALOG DEVICES INC AD7768-1 DRIVER -M: Stefan Popa stefan.popa@analog.com +M: Michael Hennerich Michael.Hennerich@analog.com L: linux-iio@vger.kernel.org S: Supported W: http://ez.analog.com/community/linux-device-drivers @@@ -1040,7 -1040,7 +1040,7 @@@ F: Documentation/devicetree/bindings/hw F: drivers/hwmon/adm1177.c
ANALOG DEVICES INC ADP5061 DRIVER -M: Stefan Popa stefan.popa@analog.com +M: Michael Hennerich Michael.Hennerich@analog.com L: linux-pm@vger.kernel.org S: Supported W: http://ez.analog.com/community/linux-device-drivers @@@ -1109,6 -1109,7 +1109,6 @@@ F: drivers/iio/amplifiers/hmc425a. ANALOG DEVICES INC IIO DRIVERS M: Lars-Peter Clausen lars@metafoo.de M: Michael Hennerich Michael.Hennerich@analog.com -M: Stefan Popa stefan.popa@analog.com S: Supported W: http://wiki.analog.com/ W: http://ez.analog.com/community/linux-device-drivers @@@ -2272,8 -2273,6 +2272,8 @@@ L: linux-arm-kernel@lists.infradead.or L: linux-realtek-soc@lists.infradead.org (moderated for non-subscribers) S: Maintained F: Documentation/devicetree/bindings/arm/realtek.yaml +F: arch/arm/boot/dts/rtd* +F: arch/arm/mach-realtek/ F: arch/arm64/boot/dts/realtek/
ARM/RENESAS ARM64 ARCHITECTURE @@@ -3193,7 -3192,7 +3193,7 @@@ Q: https://patchwork.ozlabs.org/project T: git git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git F: Documentation/bpf/ - F: Documentation/networking/filter.txt + F: Documentation/networking/filter.rst F: arch/*/net/* F: include/linux/bpf* F: include/linux/filter.h @@@ -3671,7 -3670,7 +3671,7 @@@ L: linux-media@vger.kernel.or S: Odd fixes W: https://linuxtv.org T: git git://linuxtv.org/media_tree.git -F: Documentation/media/v4l-drivers/bttv* +F: Documentation/driver-api/media/drivers/bttv* F: drivers/media/pci/bt8xx/bttv*
BUS FREQUENCY DRIVER FOR SAMSUNG EXYNOS @@@ -3762,7 -3761,7 +3762,7 @@@ M: Jonathan Corbet <corbet@lwn.net L: linux-media@vger.kernel.org S: Maintained T: git git://linuxtv.org/media_tree.git -F: Documentation/media/v4l-drivers/cafe_ccic* +F: Documentation/admin-guide/media/cafe_ccic* F: drivers/media/platform/marvell-ccic/
CAIF NETWORK LAYER @@@ -3906,8 -3905,8 +3906,8 @@@ W: http://linuxtv.or T: git git://linuxtv.org/media_tree.git F: Documentation/ABI/testing/debugfs-cec-error-inj F: Documentation/devicetree/bindings/media/cec.txt -F: Documentation/media/kapi/cec-core.rst -F: Documentation/media/uapi/cec +F: Documentation/driver-api/media/cec-core.rst +F: Documentation/userspace-api/media/cec F: drivers/media/cec/ F: drivers/media/rc/keymaps/rc-cec.c F: include/media/cec-notifier.h @@@ -4543,7 -4542,7 +4543,7 @@@ L: linux-media@vger.kernel.or S: Odd fixes W: https://linuxtv.org T: git git://linuxtv.org/media_tree.git -F: Documentation/media/v4l-drivers/cx88* +F: Documentation/driver-api/media/drivers/cx88* F: drivers/media/pci/cx88/
CXD2820R MEDIA DRIVER @@@ -4729,7 -4728,7 +4729,7 @@@ DECnet NETWORK LAYE L: linux-decnet-user@lists.sourceforge.net S: Orphan W: http://linux-decnet.sourceforge.net - F: Documentation/networking/decnet.txt + F: Documentation/networking/decnet.rst F: net/decnet/
DECSTATION PLATFORM SUPPORT @@@ -5126,14 -5125,12 +5126,14 @@@ F: scripts/documentation-file-ref-chec F: scripts/kernel-doc F: scripts/sphinx-pre-install X: Documentation/ABI/ +X: Documentation/admin-guide/media/ X: Documentation/devicetree/ +X: Documentation/driver-api/media/ X: Documentation/firmware-guide/acpi/ X: Documentation/i2c/ -X: Documentation/media/ X: Documentation/power/ X: Documentation/spi/ +X: Documentation/userspace-api/media/
DOCUMENTATION SCRIPTS M: Mauro Carvalho Chehab mchehab@kernel.org @@@ -6240,7 -6237,7 +6240,7 @@@ L: linux-media@vger.kernel.or S: Maintained W: https://linuxtv.org T: git git://linuxtv.org/media_tree.git -F: Documentation/media/v4l-drivers/em28xx* +F: Documentation/admin-guide/media/em28xx* F: drivers/media/usb/em28xx/
EMBEDDED LINUX @@@ -7123,10 -7120,9 +7123,10 @@@ F: include/uapi/asm-generic
GENERIC PHY FRAMEWORK M: Kishon Vijay Abraham I kishon@ti.com +M: Vinod Koul vkoul@kernel.org L: linux-kernel@vger.kernel.org S: Supported -T: git git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git +T: git git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git F: Documentation/devicetree/bindings/phy/ F: drivers/phy/ F: include/linux/phy/ @@@ -7463,7 -7459,7 +7463,7 @@@ L: linux-media@vger.kernel.or L: linux-rockchip@lists.infradead.org S: Maintained F: Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml -F: Documentation/devicetree/bindings/media/rockchip-vpu.txt +F: Documentation/devicetree/bindings/media/rockchip-vpu.yaml F: drivers/staging/media/hantro/
HARD DRIVE ACTIVE PROTECTION SYSTEM (HDAPS) DRIVER @@@ -7751,6 -7747,11 +7751,6 @@@ L: platform-driver-x86@vger.kernel.or S: Orphan F: drivers/platform/x86/tc1100-wmi.c
-HP100: Driver for HP 10/100 Mbit/s Voice Grade Network Adapter Series -M: Jaroslav Kysela perex@perex.cz -S: Obsolete -F: drivers/staging/hp/hp100.* - HPET: High Precision Event Timers driver M: Clemens Ladisch clemens@ladisch.de S: Maintained @@@ -7814,7 -7815,7 +7814,7 @@@ HUAWEI ETHERNET DRIVE M: Aviad Krawczyk aviad.krawczyk@huawei.com L: netdev@vger.kernel.org S: Supported - F: Documentation/networking/hinic.txt + F: Documentation/networking/hinic.rst F: drivers/net/ethernet/huawei/hinic/
HUGETLB FILESYSTEM @@@ -8645,16 -8646,16 +8645,16 @@@ M: Bingbu Cao <bingbu.cao@intel.com R: Tian Shu Qiu tian.shu.qiu@intel.com L: linux-media@vger.kernel.org S: Maintained -F: Documentation/media/uapi/v4l/pixfmt-srggb10-ipu3.rst +F: Documentation/userspace-api/media/v4l/pixfmt-srggb10-ipu3.rst F: drivers/media/pci/intel/ipu3/
INTEL IPU3 CSI-2 IMGU DRIVER M: Sakari Ailus sakari.ailus@linux.intel.com L: linux-media@vger.kernel.org S: Maintained -F: Documentation/media/uapi/v4l/pixfmt-meta-intel-ipu3.rst -F: Documentation/media/v4l-drivers/ipu3.rst -F: Documentation/media/v4l-drivers/ipu3_rcb.svg +F: Documentation/admin-guide/media/ipu3.rst +F: Documentation/admin-guide/media/ipu3_rcb.svg +F: Documentation/userspace-api/media/v4l/pixfmt-meta-intel-ipu3.rst F: drivers/staging/media/ipu3/
INTEL IXP4XX QMGR, NPE, ETHERNET and HSS SUPPORT @@@ -8933,7 -8934,7 +8933,7 @@@ L: lvs-devel@vger.kernel.or S: Maintained T: git git://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git - F: Documentation/networking/ipvs-sysctl.txt + F: Documentation/networking/ipvs-sysctl.rst F: include/net/ip_vs.h F: include/uapi/linux/ip_vs.h F: net/netfilter/ipvs/ @@@ -9078,7 -9079,7 +9078,7 @@@ L: linux-media@vger.kernel.or S: Maintained W: https://linuxtv.org T: git git://linuxtv.org/media_tree.git -F: Documentation/media/v4l-drivers/ivtv* +F: Documentation/admin-guide/media/ivtv* F: drivers/media/pci/ivtv/ F: include/uapi/linux/ivtv*
@@@ -9514,7 -9515,7 +9514,7 @@@ F: drivers/soc/lanti LAPB module L: linux-x25@vger.kernel.org S: Orphan - F: Documentation/networking/lapb-module.txt + F: Documentation/networking/lapb-module.rst F: include/*/lapb.h F: net/lapb/
@@@ -10078,7 -10079,7 +10078,7 @@@ S: Maintaine W: https://wireless.wiki.kernel.org/ T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git - F: Documentation/networking/mac80211-injection.txt + F: Documentation/networking/mac80211-injection.rst F: Documentation/networking/mac80211_hwsim/mac80211_hwsim.rst F: drivers/net/wireless/mac80211_hwsim.[ch] F: include/net/mac80211.h @@@ -10259,7 -10260,7 +10259,7 @@@ L: linux-media@vger.kernel.or S: Maintained T: git git://linuxtv.org/media_tree.git F: Documentation/devicetree/bindings/media/i2c/max2175.txt -F: Documentation/media/v4l-drivers/max2175.rst +F: Documentation/userspace-api/media/drivers/max2175.rst F: drivers/media/i2c/max2175* F: include/uapi/linux/max2175.h
@@@ -10459,8 -10460,8 +10459,8 @@@ M: Philipp Zabel <p.zabel@pengutronix.d L: linux-media@vger.kernel.org S: Maintained T: git git://linuxtv.org/media_tree.git +F: Documentation/admin-guide/media/imx.rst F: Documentation/devicetree/bindings/media/imx.txt -F: Documentation/media/v4l-drivers/imx.rst F: drivers/staging/media/imx/ F: include/linux/imx-media.h F: include/media/imx.h @@@ -10470,9 -10471,9 +10470,9 @@@ M: Rui Miguel Silva <rmfrfs@gmail.com L: linux-media@vger.kernel.org S: Maintained T: git git://linuxtv.org/media_tree.git +F: Documentation/admin-guide/media/imx7.rst F: Documentation/devicetree/bindings/media/imx7-csi.txt F: Documentation/devicetree/bindings/media/imx7-mipi-csi2.txt -F: Documentation/media/v4l-drivers/imx7.rst F: drivers/staging/media/imx/imx7-media-csi.c F: drivers/staging/media/imx/imx7-mipi-csis.c
@@@ -10618,10 -10619,8 +10618,10 @@@ S: Maintaine W: https://linuxtv.org Q: http://patchwork.kernel.org/project/linux-media/list/ T: git git://linuxtv.org/media_tree.git +F: Documentation/admin-guide/media/ F: Documentation/devicetree/bindings/media/ -F: Documentation/media/ +F: Documentation/driver-api/media/ +F: Documentation/userspace-api/media/ F: drivers/media/ F: drivers/staging/media/ F: include/linux/platform_data/media/ @@@ -11398,7 -11397,7 +11398,7 @@@ F: drivers/regulator/mpq7920. MOTION EYE VAIO PICTUREBOOK CAMERA DRIVER S: Orphan W: http://popies.net/meye/ -F: Documentation/media/v4l-drivers/meye* +F: Documentation/userspace-api/media/drivers/meye* F: drivers/media/pci/meye/ F: include/uapi/linux/meye.h
@@@ -13263,7 -13262,7 +13263,7 @@@ F: drivers/input/joystick/pxrc. PHONET PROTOCOL M: Remi Denis-Courmont courmisch@gmail.com S: Supported - F: Documentation/networking/phonet.txt + F: Documentation/networking/phonet.rst F: include/linux/phonet.h F: include/net/phonet/ F: include/uapi/linux/phonet.h @@@ -13710,8 -13709,8 +13710,8 @@@ M: Hans Verkuil <hverkuil@xs4all.nl L: linux-media@vger.kernel.org S: Maintained T: git git://linuxtv.org/media_tree.git -F: Documentation/media/cec-drivers/pulse8-cec.rst -F: drivers/media/usb/pulse8-cec/* +F: Documentation/admin-guide/media/pulse8-cec.rst +F: drivers/media/cec/usb/pulse8/
PVRUSB2 VIDEO4LINUX DRIVER M: Mike Isely isely@pobox.com @@@ -13720,7 -13719,7 +13720,7 @@@ L: linux-media@vger.kernel.or S: Maintained W: http://www.isely.net/pvrusb2/ T: git git://linuxtv.org/media_tree.git -F: Documentation/media/v4l-drivers/pvrusb2* +F: Documentation/driver-api/media/drivers/pvrusb2* F: drivers/media/usb/pvrusb2/
PWC WEBCAM DRIVER @@@ -13967,8 -13966,8 +13967,8 @@@ QUALCOMM CAMERA SUBSYSTEM DRIVE M: Todor Tomov todor.too@gmail.com L: linux-media@vger.kernel.org S: Maintained +F: Documentation/admin-guide/media/qcom_camss.rst F: Documentation/devicetree/bindings/media/qcom,camss.txt -F: Documentation/media/v4l-drivers/qcom_camss.rst F: drivers/media/platform/qcom/camss/
QUALCOMM CORE POWER REDUCTION (CPR) AVS DRIVER @@@ -14126,7 -14125,7 +14126,7 @@@ M: Hans Verkuil <hverkuil@xs4all.nl L: linux-media@vger.kernel.org S: Maintained T: git git://linuxtv.org/media_tree.git -F: drivers/media/usb/rainshadow-cec/* +F: drivers/media/cec/usb/rainshadow/
RALINK MIPS ARCHITECTURE M: John Crispin john@phrozen.org @@@ -14220,7 -14219,7 +14220,7 @@@ L: linux-rdma@vger.kernel.or L: rds-devel@oss.oracle.com (moderated for non-subscribers) S: Supported W: https://oss.oracle.com/projects/rds/ - F: Documentation/networking/rds.txt + F: Documentation/networking/rds.rst F: net/rds/
RDT - RESOURCE ALLOCATION @@@ -14479,19 -14478,10 +14479,19 @@@ ROCKCHIP RASTER 2D GRAPHIC ACCELERATIO M: Jacob Chen jacob-chen@iotwrt.com M: Ezequiel Garcia ezequiel@collabora.com L: linux-media@vger.kernel.org +L: linux-rockchip@lists.infradead.org S: Maintained -F: Documentation/devicetree/bindings/media/rockchip-rga.txt +F: Documentation/devicetree/bindings/media/rockchip-rga.yaml F: drivers/media/platform/rockchip/rga/
+ROCKCHIP VIDEO DECODER DRIVER +M: Ezequiel Garcia ezequiel@collabora.com +L: linux-media@vger.kernel.org +L: linux-rockchip@lists.infradead.org +S: Maintained +F: Documentation/devicetree/bindings/media/rockchip,vdec.yaml +F: drivers/staging/media/rkvdec/ + ROCKER DRIVER M: Jiri Pirko jiri@resnulli.us L: netdev@vger.kernel.org @@@ -14603,7 -14593,7 +14603,7 @@@ M: David Howells <dhowells@redhat.com L: linux-afs@lists.infradead.org S: Supported W: https://www.infradead.org/~dhowells/kafs/ - F: Documentation/networking/rxrpc.txt + F: Documentation/networking/rxrpc.rst F: include/keys/rxrpc-type.h F: include/net/af_rxrpc.h F: include/trace/events/rxrpc.h @@@ -14679,7 -14669,6 +14679,7 @@@ S: Supporte W: http://www.ibm.com/developerworks/linux/linux390/ F: arch/s390/pci/ F: drivers/pci/hotplug/s390_pci_hpc.c +F: Documentation/s390/pci.rst
S390 VFIO AP DRIVER M: Tony Krowiak akrowiak@linux.ibm.com @@@ -14739,7 -14728,7 +14739,7 @@@ L: linux-media@vger.kernel.or S: Odd fixes W: https://linuxtv.org T: git git://linuxtv.org/media_tree.git -F: Documentation/media/v4l-drivers/saa7134* +F: Documentation/driver-api/media/drivers/saa7134* F: drivers/media/pci/saa7134/
SAA7146 VIDEO4LINUX-2 DRIVER @@@ -15010,7 -14999,7 +15010,7 @@@ M: Marcelo Ricardo Leitner <marcelo.lei L: linux-sctp@vger.kernel.org S: Maintained W: http://lksctp.sourceforge.net - F: Documentation/networking/sctp.txt + F: Documentation/networking/sctp.rst F: include/linux/sctp.h F: include/net/sctp/ F: include/uapi/linux/sctp.h @@@ -16991,7 -16980,7 +16991,7 @@@ L: linux-media@vger.kernel.or S: Odd fixes W: https://linuxtv.org T: git git://linuxtv.org/media_tree.git -F: Documentation/media/v4l-drivers/tm6000* +F: Documentation/admin-guide/media/tm6000* F: drivers/media/usb/tm6000/
TMIO/SDHI MMC DRIVER @@@ -17672,7 -17661,7 +17672,7 @@@ L: linux-media@vger.kernel.or S: Maintained W: http://royale.zerezo.com/zr364xx/ T: git git://linuxtv.org/media_tree.git -F: Documentation/media/v4l-drivers/zr364xx* +F: Documentation/admin-guide/media/zr364xx* F: drivers/media/usb/zr364xx/
USER-MODE LINUX (UML) @@@ -17821,7 -17810,7 +17821,7 @@@ L: linux-media@vger.kernel.or S: Maintained W: https://linuxtv.org T: git git://linuxtv.org/media_tree.git -F: drivers/media/platform/vicodec/* +F: drivers/media/test-drivers/vicodec/*
VIDEO I2C POLLING DRIVER M: Matt Ranostay matt.ranostay@konsulko.com @@@ -17852,7 -17841,7 +17852,7 @@@ L: linux-media@vger.kernel.or S: Maintained W: https://linuxtv.org T: git git://linuxtv.org/media_tree.git -F: drivers/media/platform/vimc/* +F: drivers/media/test-drivers/vimc/*
VIRT LIB M: Alex Williamson alex.williamson@redhat.com @@@ -18019,7 -18008,7 +18019,7 @@@ L: linux-media@vger.kernel.or S: Maintained W: https://linuxtv.org T: git git://linuxtv.org/media_tree.git -F: drivers/media/platform/vivid/* +F: drivers/media/test-drivers/vivid/*
VLYNQ BUS M: Florian Fainelli f.fainelli@gmail.com diff --combined arch/arm/boot/dts/qcom-ipq4019.dtsi index c6956015dedc,b9839f86e703..74d8e2c8e4b3 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi @@@ -166,7 -166,6 +166,7 @@@ <1 4 0xf08>, <1 1 0xf08>; clock-frequency = <48000000>; + always-on; };
soc { @@@ -577,5 -576,33 +577,33 @@@ "legacy"; status = "disabled"; }; + + mdio: mdio@90000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "qcom,ipq4019-mdio"; + reg = <0x90000 0x64>; + status = "disabled"; + + ethphy0: ethernet-phy@0 { + reg = <0>; + }; + + ethphy1: ethernet-phy@1 { + reg = <1>; + }; + + ethphy2: ethernet-phy@2 { + reg = <2>; + }; + + ethphy3: ethernet-phy@3 { + reg = <3>; + }; + + ethphy4: ethernet-phy@4 { + reg = <4>; + }; + }; }; }; diff --combined drivers/infiniband/hw/mlx5/qp.c index 2210759843ba,af599c8b88aa..d93eec5d3277 --- a/drivers/infiniband/hw/mlx5/qp.c +++ b/drivers/infiniband/hw/mlx5/qp.c @@@ -39,6 -39,7 +39,7 @@@ #include "mlx5_ib.h" #include "ib_rep.h" #include "cmd.h" + #include "qp.h"
/* not supported currently */ static int wq_signature; @@@ -1254,7 -1255,7 +1255,7 @@@ static int create_raw_packet_qp_tis(str struct mlx5_ib_sq *sq, u32 tdn, struct ib_pd *pd) { - u32 in[MLX5_ST_SZ_DW(create_tis_in)] = {0}; + u32 in[MLX5_ST_SZ_DW(create_tis_in)] = {}; void *tisc = MLX5_ADDR_OF(create_tis_in, in, ctx);
MLX5_SET(create_tis_in, in, uid, to_mpd(pd)->uid); @@@ -1262,7 -1263,7 +1263,7 @@@ if (qp->flags & MLX5_IB_QP_UNDERLAY) MLX5_SET(tisc, tisc, underlay_qpn, qp->underlay_qpn);
- return mlx5_core_create_tis(dev->mdev, in, sizeof(in), &sq->tisn); + return mlx5_core_create_tis(dev->mdev, in, &sq->tisn); }
static void destroy_raw_packet_qp_tis(struct mlx5_ib_dev *dev, @@@ -1336,7 -1337,7 +1337,7 @@@ static int create_raw_packet_qp_sq(stru pas = (__be64 *)MLX5_ADDR_OF(wq, wq, pas); mlx5_ib_populate_pas(dev, sq->ubuffer.umem, page_shift, pas, 0);
- err = mlx5_core_create_sq_tracked(dev->mdev, in, inlen, &sq->base.mqp); + err = mlx5_core_create_sq_tracked(dev, in, inlen, &sq->base.mqp);
kvfree(in);
@@@ -1356,7 -1357,7 +1357,7 @@@ static void destroy_raw_packet_qp_sq(st struct mlx5_ib_sq *sq) { destroy_flow_rule_vport_sq(sq); - mlx5_core_destroy_sq_tracked(dev->mdev, &sq->base.mqp); + mlx5_core_destroy_sq_tracked(dev, &sq->base.mqp); ib_umem_release(sq->ubuffer.umem); }
@@@ -1426,7 -1427,7 +1427,7 @@@ static int create_raw_packet_qp_rq(stru qp_pas = (__be64 *)MLX5_ADDR_OF(create_qp_in, qpin, pas); memcpy(pas, qp_pas, rq_pas_size);
- err = mlx5_core_create_rq_tracked(dev->mdev, in, inlen, &rq->base.mqp); + err = mlx5_core_create_rq_tracked(dev, in, inlen, &rq->base.mqp);
kvfree(in);
@@@ -1436,7 -1437,7 +1437,7 @@@ static void destroy_raw_packet_qp_rq(struct mlx5_ib_dev *dev, struct mlx5_ib_rq *rq) { - mlx5_core_destroy_rq_tracked(dev->mdev, &rq->base.mqp); + mlx5_core_destroy_rq_tracked(dev, &rq->base.mqp); }
static bool tunnel_offload_supported(struct mlx5_core_dev *dev) @@@ -1459,9 -1460,8 +1460,8 @@@ static void destroy_raw_packet_qp_tir(s
static int create_raw_packet_qp_tir(struct mlx5_ib_dev *dev, struct mlx5_ib_rq *rq, u32 tdn, - u32 *qp_flags_en, - struct ib_pd *pd, - u32 *out, int outlen) + u32 *qp_flags_en, struct ib_pd *pd, + u32 *out) { u8 lb_flag = 0; u32 *in; @@@ -1494,9 -1494,8 +1494,8 @@@ }
MLX5_SET(tirc, tirc, self_lb_block, lb_flag); - - err = mlx5_core_create_tir_out(dev->mdev, in, inlen, out, outlen); - + MLX5_SET(create_tir_in, in, opcode, MLX5_CMD_OP_CREATE_TIR); + err = mlx5_cmd_exec_inout(dev->mdev, create_tir, in, out); rq->tirn = MLX5_GET(create_tir_out, out, tirn); if (!err && MLX5_GET(tirc, tirc, self_lb_block)) { err = mlx5_ib_enable_lb(dev, false, true); @@@ -1556,9 -1555,8 +1555,8 @@@ static int create_raw_packet_qp(struct if (err) goto err_destroy_sq;
- err = create_raw_packet_qp_tir( - dev, rq, tdn, &qp->flags_en, pd, out, - MLX5_ST_SZ_BYTES(create_tir_out)); + err = create_raw_packet_qp_tir(dev, rq, tdn, &qp->flags_en, pd, + out); if (err) goto err_destroy_rq;
@@@ -1853,7 -1851,8 +1851,8 @@@ static int create_rss_raw_qp_tir(struc MLX5_SET(rx_hash_field_select, hfso, selected_fields, selected_fields);
create_tir: - err = mlx5_core_create_tir_out(dev->mdev, in, inlen, out, outlen); + MLX5_SET(create_tir_in, in, opcode, MLX5_CMD_OP_CREATE_TIR); + err = mlx5_cmd_exec_inout(dev->mdev, create_tir, in, out);
qp->rss_qp.tirn = MLX5_GET(create_tir_out, out, tirn); if (!err && MLX5_GET(tirc, tirc, self_lb_block)) { @@@ -2347,7 -2346,7 +2346,7 @@@ static int create_qp_common(struct mlx5 err = create_raw_packet_qp(dev, qp, in, inlen, pd, udata, &resp); } else { - err = mlx5_core_create_qp(dev->mdev, &base->mqp, in, inlen); + err = mlx5_core_create_qp(dev, &base->mqp, in, inlen); }
if (err) { @@@ -2513,8 -2512,7 +2512,7 @@@ static void destroy_qp_common(struct ml if (qp->state != IB_QPS_RESET) { if (qp->ibqp.qp_type != IB_QPT_RAW_PACKET && !(qp->flags & MLX5_IB_QP_UNDERLAY)) { - err = mlx5_core_qp_modify(dev->mdev, - MLX5_CMD_OP_2RST_QP, 0, + err = mlx5_core_qp_modify(dev, MLX5_CMD_OP_2RST_QP, 0, NULL, &base->mqp); } else { struct mlx5_modify_raw_qp_param raw_qp_param = { @@@ -2555,7 -2553,7 +2553,7 @@@ qp->flags & MLX5_IB_QP_UNDERLAY) { destroy_raw_packet_qp(dev, qp); } else { - err = mlx5_core_destroy_qp(dev->mdev, &base->mqp); + err = mlx5_core_destroy_qp(dev, &base->mqp); if (err) mlx5_ib_warn(dev, "failed to destroy QP 0x%x\n", base->mqp.qpn); @@@ -2818,7 -2816,7 +2816,7 @@@ static int mlx5_ib_destroy_dct(struct m if (mqp->state == IB_QPS_RTR) { int err;
- err = mlx5_core_destroy_dct(dev->mdev, &mqp->dct.mdct); + err = mlx5_core_destroy_dct(dev, &mqp->dct.mdct); if (err) { mlx5_ib_warn(dev, "failed to destroy DCT %d\n", err); return err; @@@ -2933,7 -2931,7 +2931,7 @@@ static int modify_raw_packet_eth_prio(s tisc = MLX5_ADDR_OF(modify_tis_in, in, ctx); MLX5_SET(tisc, tisc, prio, ((sl & 0x7) << 1));
- err = mlx5_core_modify_tis(dev, sq->tisn, in, inlen); + err = mlx5_core_modify_tis(dev, sq->tisn, in);
kvfree(in);
@@@ -2960,7 -2958,7 +2958,7 @@@ static int modify_raw_packet_tx_affinit tisc = MLX5_ADDR_OF(modify_tis_in, in, ctx); MLX5_SET(tisc, tisc, lag_tx_port_affinity, tx_affinity);
- err = mlx5_core_modify_tis(dev, sq->tisn, in, inlen); + err = mlx5_core_modify_tis(dev, sq->tisn, in);
kvfree(in);
@@@ -3240,7 -3238,7 +3238,7 @@@ static int modify_raw_packet_qp_rq "RAW PACKET QP counters are not supported on current FW\n"); }
- err = mlx5_core_modify_rq(dev->mdev, rq->base.mqp.qpn, in, inlen); + err = mlx5_core_modify_rq(dev->mdev, rq->base.mqp.qpn, in); if (err) goto out;
@@@ -3303,7 -3301,7 +3301,7 @@@ static int modify_raw_packet_qp_sq MLX5_SET(sqc, sqc, packet_pacing_rate_limit_index, rl_index); }
- err = mlx5_core_modify_sq(dev, sq->base.mqp.qpn, in, inlen); + err = mlx5_core_modify_sq(dev, sq->base.mqp.qpn, in); if (err) { /* Remove new rate from table if failed */ if (new_rate_added) @@@ -3462,10 -3460,9 +3460,9 @@@ static int __mlx5_ib_qp_set_counter(str base = &mqp->trans_qp.base; context.qp_counter_set_usr_page &= cpu_to_be32(0xffffff); context.qp_counter_set_usr_page |= cpu_to_be32(set_id << 24); - return mlx5_core_qp_modify(dev->mdev, - MLX5_CMD_OP_RTS2RTS_QP, - MLX5_QP_OPTPAR_COUNTER_SET_ID, - &context, &base->mqp); + return mlx5_core_qp_modify(dev, MLX5_CMD_OP_RTS2RTS_QP, + MLX5_QP_OPTPAR_COUNTER_SET_ID, &context, + &base->mqp); }
static int __mlx5_ib_modify_qp(struct ib_qp *ibqp, @@@ -3752,8 -3749,7 +3749,7 @@@
err = modify_raw_packet_qp(dev, qp, &raw_qp_param, tx_affinity); } else { - err = mlx5_core_qp_modify(dev->mdev, op, optpar, context, - &base->mqp); + err = mlx5_core_qp_modify(dev, op, optpar, context, &base->mqp); }
if (err) @@@ -3927,7 -3923,7 +3923,7 @@@ static int mlx5_ib_modify_dct(struct ib MLX5_SET(dctc, dctc, my_addr_index, attr->ah_attr.grh.sgid_index); MLX5_SET(dctc, dctc, hop_limit, attr->ah_attr.grh.hop_limit);
- err = mlx5_core_create_dct(dev->mdev, &qp->dct.mdct, qp->dct.in, + err = mlx5_core_create_dct(dev, &qp->dct.mdct, qp->dct.in, MLX5_ST_SZ_BYTES(create_dct_in), out, sizeof(out)); if (err) @@@ -3935,7 -3931,7 +3931,7 @@@ resp.dctn = qp->dct.mdct.mqp.qpn; err = ib_copy_to_udata(udata, &resp, resp.response_length); if (err) { - mlx5_core_destroy_dct(dev->mdev, &qp->dct.mdct); + mlx5_core_destroy_dct(dev, &qp->dct.mdct); return err; } } else { @@@ -5558,9 -5554,7 +5554,9 @@@ static void to_rdma_ah_attr(struct mlx5 rdma_ah_set_path_bits(ah_attr, path->grh_mlid & 0x7f); rdma_ah_set_static_rate(ah_attr, path->static_rate ? path->static_rate - 5 : 0); - if (path->grh_mlid & (1 << 7)) { + + if (path->grh_mlid & (1 << 7) || + ah_attr->type == RDMA_AH_ATTR_TYPE_ROCE) { u32 tc_fl = be32_to_cpu(path->tclass_flowlabel);
rdma_ah_set_grh(ah_attr, NULL, @@@ -5699,8 -5693,7 +5695,7 @@@ static int query_qp_attr(struct mlx5_ib if (!outb) return -ENOMEM;
- err = mlx5_core_qp_query(dev->mdev, &qp->trans_qp.base.mqp, outb, - outlen); + err = mlx5_core_qp_query(dev, &qp->trans_qp.base.mqp, outb, outlen); if (err) goto out;
@@@ -5778,7 -5771,7 +5773,7 @@@ static int mlx5_ib_dct_query_qp(struct if (!out) return -ENOMEM;
- err = mlx5_core_dct_query(dev->mdev, dct, out, outlen); + err = mlx5_core_dct_query(dev, dct, out, outlen); if (err) goto out;
@@@ -5964,7 -5957,7 +5959,7 @@@ static int set_delay_drop(struct mlx5_i if (dev->delay_drop.activate) goto out;
- err = mlx5_core_set_delay_drop(dev->mdev, dev->delay_drop.timeout); + err = mlx5_core_set_delay_drop(dev, dev->delay_drop.timeout); if (err) goto out;
@@@ -6070,13 -6063,13 +6065,13 @@@ static int create_rq(struct mlx5_ib_rw } rq_pas0 = (__be64 *)MLX5_ADDR_OF(wq, wq, pas); mlx5_ib_populate_pas(dev, rwq->umem, rwq->page_shift, rq_pas0, 0); - err = mlx5_core_create_rq_tracked(dev->mdev, in, inlen, &rwq->core_qp); + err = mlx5_core_create_rq_tracked(dev, in, inlen, &rwq->core_qp); if (!err && init_attr->create_flags & IB_WQ_FLAGS_DELAY_DROP) { err = set_delay_drop(dev); if (err) { mlx5_ib_warn(dev, "Failed to enable delay drop err=%d\n", err); - mlx5_core_destroy_rq_tracked(dev->mdev, &rwq->core_qp); + mlx5_core_destroy_rq_tracked(dev, &rwq->core_qp); } else { rwq->create_flags |= MLX5_IB_WQ_FLAGS_DELAY_DROP; } @@@ -6258,7 -6251,7 +6253,7 @@@ struct ib_wq *mlx5_ib_create_wq(struct return &rwq->ibwq;
err_copy: - mlx5_core_destroy_rq_tracked(dev->mdev, &rwq->core_qp); + mlx5_core_destroy_rq_tracked(dev, &rwq->core_qp); err_user_rq: destroy_user_rq(dev, pd, rwq, udata); err: @@@ -6271,7 -6264,7 +6266,7 @@@ void mlx5_ib_destroy_wq(struct ib_wq *w struct mlx5_ib_dev *dev = to_mdev(wq->device); struct mlx5_ib_rwq *rwq = to_mrwq(wq);
- mlx5_core_destroy_rq_tracked(dev->mdev, &rwq->core_qp); + mlx5_core_destroy_rq_tracked(dev, &rwq->core_qp); destroy_user_rq(dev, wq->pd, rwq, udata); kfree(rwq); } @@@ -6449,7 -6442,7 +6444,7 @@@ int mlx5_ib_modify_wq(struct ib_wq *wq "Receive WQ counters are not supported on current FW\n"); }
- err = mlx5_core_modify_rq(dev->mdev, rwq->core_qp.qpn, in, inlen); + err = mlx5_core_modify_rq(dev->mdev, rwq->core_qp.qpn, in); if (!err) rwq->ibwq.state = (wq_state == MLX5_RQC_STATE_ERR) ? IB_WQS_ERR : wq_state;
diff --combined drivers/net/ethernet/intel/e1000e/netdev.c index 2730b1c7dddb,e0b074820b47..53e53164188f --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@@ -6404,6 -6404,31 +6404,31 @@@ static void e1000e_s0ix_entry_flow(stru mac_data |= BIT(3); ew32(CTRL_EXT, mac_data);
+ /* Disable disconnected cable conditioning for Power Gating */ + mac_data = er32(DPGFR); + mac_data |= BIT(2); + ew32(DPGFR, mac_data); + + /* Don't wake from dynamic Power Gating with clock request */ + mac_data = er32(FEXTNVM12); + mac_data |= BIT(12); + ew32(FEXTNVM12, mac_data); + + /* Ungate PGCB clock */ + mac_data = er32(FEXTNVM9); + mac_data |= BIT(28); + ew32(FEXTNVM9, mac_data); + + /* Enable K1 off to enable mPHY Power Gating */ + mac_data = er32(FEXTNVM6); + mac_data |= BIT(31); + ew32(FEXTNVM12, mac_data); + + /* Enable mPHY power gating for any link and speed */ + mac_data = er32(FEXTNVM8); + mac_data |= BIT(9); + ew32(FEXTNVM8, mac_data); + /* Enable the Dynamic Clock Gating in the DMA and MAC */ mac_data = er32(CTRL_EXT); mac_data |= E1000_CTRL_EXT_DMA_DYN_CLK_EN; @@@ -6433,6 -6458,35 +6458,35 @@@ static void e1000e_s0ix_exit_flow(struc mac_data |= BIT(0); ew32(FEXTNVM7, mac_data);
+ /* Disable mPHY power gating for any link and speed */ + mac_data = er32(FEXTNVM8); + mac_data &= ~BIT(9); + ew32(FEXTNVM8, mac_data); + + /* Disable K1 off */ + mac_data = er32(FEXTNVM6); + mac_data &= ~BIT(31); + ew32(FEXTNVM12, mac_data); + + /* Disable Ungate PGCB clock */ + mac_data = er32(FEXTNVM9); + mac_data &= ~BIT(28); + ew32(FEXTNVM9, mac_data); + + /* Cancel not waking from dynamic + * Power Gating with clock request + */ + mac_data = er32(FEXTNVM12); + mac_data &= ~BIT(12); + ew32(FEXTNVM12, mac_data); + + /* Cancel disable disconnected cable conditioning + * for Power Gating + */ + mac_data = er32(DPGFR); + mac_data &= ~BIT(2); + ew32(DPGFR, mac_data); + /* Disable Dynamic Power Gating */ mac_data = er32(CTRL_EXT); mac_data &= 0xFFFFFFF7; @@@ -7549,7 -7603,7 +7603,7 @@@ static int e1000_probe(struct pci_dev *
e1000_print_device_info(adapter);
- dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NEVER_SKIP); + dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NO_DIRECT_COMPLETE);
if (pci_dev_run_wake(pdev) && hw->mac.type < e1000_pch_cnp) pm_runtime_put_noidle(&pdev->dev); diff --combined drivers/net/ethernet/intel/igc/igc_main.c index 59fc0097438f,9d5f8287c704..927fc95c5684 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@@ -9,11 -9,13 +9,13 @@@ #include <linux/udp.h> #include <linux/ip.h> #include <linux/pm_runtime.h> + #include <net/pkt_sched.h>
#include <net/ipv6.h>
#include "igc.h" #include "igc_hw.h" + #include "igc_tsn.h"
#define DRV_VERSION "0.0.1-k" #define DRV_SUMMARY "Intel(R) 2.5G Ethernet Linux Driver" @@@ -45,6 -47,9 +47,9 @@@ static const struct pci_device_id igc_p { PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_I), board_base }, { PCI_VDEVICE(INTEL, IGC_DEV_ID_I220_V), board_base }, { PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_K), board_base }, + { PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_K2), board_base }, + { PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_LMVP), board_base }, + { PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_IT), board_base }, { PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_BLANK_NVM), board_base }, /* required last entry */ {0, } @@@ -106,6 -111,9 +111,9 @@@ void igc_reset(struct igc_adapter *adap /* Re-enable PTP, where applicable. */ igc_ptp_reset(adapter);
+ /* Re-enable TSN offloading, where applicable. */ + igc_tsn_offload_apply(adapter); + igc_get_phy_info(hw); }
@@@ -757,48 -765,74 +765,74 @@@ static void igc_setup_tctl(struct igc_a }
/** - * igc_rar_set_index - Sync RAL[index] and RAH[index] registers with MAC table - * @adapter: address of board private structure - * @index: Index of the RAR entry which need to be synced with MAC table + * igc_set_mac_filter_hw() - Set MAC address filter in hardware + * @adapter: Pointer to adapter where the filter should be set + * @index: Filter index + * @addr: Destination MAC address + * @queue: If non-negative, queue assignment feature is enabled and frames + * matching the filter are enqueued onto 'queue'. Otherwise, queue + * assignment is disabled. */ - static void igc_rar_set_index(struct igc_adapter *adapter, u32 index) + static void igc_set_mac_filter_hw(struct igc_adapter *adapter, int index, + const u8 *addr, int queue) { - u8 *addr = adapter->mac_table[index].addr; + struct net_device *dev = adapter->netdev; struct igc_hw *hw = &adapter->hw; - u32 rar_low, rar_high; + u32 ral, rah;
- /* HW expects these to be in network order when they are plugged - * into the registers which are little endian. In order to guarantee - * that ordering we need to do an leXX_to_cpup here in order to be - * ready for the byteswap that occurs with writel - */ - rar_low = le32_to_cpup((__le32 *)(addr)); - rar_high = le16_to_cpup((__le16 *)(addr + 4)); + if (WARN_ON(index >= hw->mac.rar_entry_count)) + return;
- /* Indicate to hardware the Address is Valid. */ - if (adapter->mac_table[index].state & IGC_MAC_STATE_IN_USE) { - if (is_valid_ether_addr(addr)) - rar_high |= IGC_RAH_AV; + ral = le32_to_cpup((__le32 *)(addr)); + rah = le16_to_cpup((__le16 *)(addr + 4));
- rar_high |= IGC_RAH_POOL_1 << - adapter->mac_table[index].queue; + if (queue >= 0) { + rah &= ~IGC_RAH_QSEL_MASK; + rah |= (queue << IGC_RAH_QSEL_SHIFT); + rah |= IGC_RAH_QSEL_ENABLE; }
- wr32(IGC_RAL(index), rar_low); - wrfl(); - wr32(IGC_RAH(index), rar_high); - wrfl(); + rah |= IGC_RAH_AV; + + wr32(IGC_RAL(index), ral); + wr32(IGC_RAH(index), rah); + + netdev_dbg(dev, "MAC address filter set in HW: index %d", index); + } + + /** + * igc_clear_mac_filter_hw() - Clear MAC address filter in hardware + * @adapter: Pointer to adapter where the filter should be cleared + * @index: Filter index + */ + static void igc_clear_mac_filter_hw(struct igc_adapter *adapter, int index) + { + struct net_device *dev = adapter->netdev; + struct igc_hw *hw = &adapter->hw; + + if (WARN_ON(index >= hw->mac.rar_entry_count)) + return; + + wr32(IGC_RAL(index), 0); + wr32(IGC_RAH(index), 0); + + netdev_dbg(dev, "MAC address filter cleared in HW: index %d", index); }
/* Set default MAC address for the PF in the first RAR entry */ static void igc_set_default_mac_filter(struct igc_adapter *adapter) { struct igc_mac_addr *mac_table = &adapter->mac_table[0]; + struct net_device *dev = adapter->netdev; + u8 *addr = adapter->hw.mac.addr;
- ether_addr_copy(mac_table->addr, adapter->hw.mac.addr); + netdev_dbg(dev, "Set default MAC address filter: address %pM", addr); + + ether_addr_copy(mac_table->addr, addr); mac_table->state = IGC_MAC_STATE_DEFAULT | IGC_MAC_STATE_IN_USE; + mac_table->queue = -1;
- igc_rar_set_index(adapter, 0); + igc_set_mac_filter_hw(adapter, 0, addr, mac_table->queue); }
/** @@@ -864,6 -898,23 +898,23 @@@ static int igc_write_mc_addr_list(struc return netdev_mc_count(netdev); }
+ static __le32 igc_tx_launchtime(struct igc_adapter *adapter, ktime_t txtime) + { + ktime_t cycle_time = adapter->cycle_time; + ktime_t base_time = adapter->base_time; + u32 launchtime; + + /* FIXME: when using ETF together with taprio, we may have a + * case where 'delta' is larger than the cycle_time, this may + * cause problems if we don't read the current value of + * IGC_BASET, as the value writen into the launchtime + * descriptor field may be misinterpreted. + */ + div_s64_rem(ktime_sub_ns(txtime, base_time), cycle_time, &launchtime); + + return cpu_to_le32(launchtime); + } + static void igc_tx_ctxtdesc(struct igc_ring *tx_ring, struct igc_tx_buffer *first, u32 vlan_macip_lens, u32 type_tucmd, @@@ -871,7 -922,6 +922,6 @@@ { struct igc_adv_tx_context_desc *context_desc; u16 i = tx_ring->next_to_use; - struct timespec64 ts;
context_desc = IGC_TX_CTXTDESC(tx_ring, i);
@@@ -893,9 -943,12 +943,12 @@@ * should have been handled by the upper layers. */ if (tx_ring->launchtime_enable) { - ts = ktime_to_timespec64(first->skb->tstamp); + struct igc_adapter *adapter = netdev_priv(tx_ring->netdev); + ktime_t txtime = first->skb->tstamp; + first->skb->tstamp = ktime_set(0, 0); - context_desc->launch_time = cpu_to_le32(ts.tv_nsec / 32); + context_desc->launch_time = igc_tx_launchtime(adapter, + txtime); } else { context_desc->launch_time = 0; } @@@ -2133,129 -2186,148 +2186,148 @@@ static void igc_nfc_filter_restore(stru spin_unlock(&adapter->nfc_lock); }
- /* If the filter to be added and an already existing filter express - * the same address and address type, it should be possible to only - * override the other configurations, for example the queue to steer - * traffic. - */ - static bool igc_mac_entry_can_be_used(const struct igc_mac_addr *entry, - const u8 *addr, const u8 flags) + static int igc_find_mac_filter(struct igc_adapter *adapter, const u8 *addr, + u8 flags) { - if (!(entry->state & IGC_MAC_STATE_IN_USE)) - return true; + int max_entries = adapter->hw.mac.rar_entry_count; + struct igc_mac_addr *entry; + int i;
- if ((entry->state & IGC_MAC_STATE_SRC_ADDR) != - (flags & IGC_MAC_STATE_SRC_ADDR)) - return false; + for (i = 0; i < max_entries; i++) { + entry = &adapter->mac_table[i];
- if (!ether_addr_equal(addr, entry->addr)) - return false; + if (!(entry->state & IGC_MAC_STATE_IN_USE)) + continue; + if (!ether_addr_equal(addr, entry->addr)) + continue; + if ((entry->state & IGC_MAC_STATE_SRC_ADDR) != + (flags & IGC_MAC_STATE_SRC_ADDR)) + continue;
- return true; + return i; + } + + return -1; }
- /* Add a MAC filter for 'addr' directing matching traffic to 'queue', - * 'flags' is used to indicate what kind of match is made, match is by - * default for the destination address, if matching by source address - * is desired the flag IGC_MAC_STATE_SRC_ADDR can be used. - */ - static int igc_add_mac_filter(struct igc_adapter *adapter, - const u8 *addr, const u8 queue) + static int igc_get_avail_mac_filter_slot(struct igc_adapter *adapter) { - struct igc_hw *hw = &adapter->hw; - int rar_entries = hw->mac.rar_entry_count; + int max_entries = adapter->hw.mac.rar_entry_count; + struct igc_mac_addr *entry; int i;
- if (is_zero_ether_addr(addr)) + for (i = 0; i < max_entries; i++) { + entry = &adapter->mac_table[i]; + + if (!(entry->state & IGC_MAC_STATE_IN_USE)) + return i; + } + + return -1; + } + + /** + * igc_add_mac_filter() - Add MAC address filter + * @adapter: Pointer to adapter where the filter should be added + * @addr: MAC address + * @queue: If non-negative, queue assignment feature is enabled and frames + * matching the filter are enqueued onto 'queue'. Otherwise, queue + * assignment is disabled. + * @flags: Set IGC_MAC_STATE_SRC_ADDR bit to indicate @address is a source + * address + * + * Return: 0 in case of success, negative errno code otherwise. + */ + int igc_add_mac_filter(struct igc_adapter *adapter, const u8 *addr, + const s8 queue, const u8 flags) + { + struct net_device *dev = adapter->netdev; + int index; + + if (!is_valid_ether_addr(addr)) return -EINVAL; + if (flags & IGC_MAC_STATE_SRC_ADDR) + return -ENOTSUPP;
- /* Search for the first empty entry in the MAC table. - * Do not touch entries at the end of the table reserved for the VF MAC - * addresses. - */ - for (i = 0; i < rar_entries; i++) { - if (!igc_mac_entry_can_be_used(&adapter->mac_table[i], - addr, 0)) - continue; + index = igc_find_mac_filter(adapter, addr, flags); + if (index >= 0) + goto update_queue_assignment;
- ether_addr_copy(adapter->mac_table[i].addr, addr); - adapter->mac_table[i].queue = queue; - adapter->mac_table[i].state |= IGC_MAC_STATE_IN_USE; + index = igc_get_avail_mac_filter_slot(adapter); + if (index < 0) + return -ENOSPC;
- igc_rar_set_index(adapter, i); - return i; - } + netdev_dbg(dev, "Add MAC address filter: index %d address %pM queue %d", + index, addr, queue); + + ether_addr_copy(adapter->mac_table[index].addr, addr); + adapter->mac_table[index].state |= IGC_MAC_STATE_IN_USE | flags; + update_queue_assignment: + adapter->mac_table[index].queue = queue;
- return -ENOSPC; + igc_set_mac_filter_hw(adapter, index, addr, queue); + return 0; }
- /* Remove a MAC filter for 'addr' directing matching traffic to - * 'queue', 'flags' is used to indicate what kind of match need to be - * removed, match is by default for the destination address, if - * matching by source address is to be removed the flag - * IGC_MAC_STATE_SRC_ADDR can be used. + /** + * igc_del_mac_filter() - Delete MAC address filter + * @adapter: Pointer to adapter where the filter should be deleted from + * @addr: MAC address + * @flags: Set IGC_MAC_STATE_SRC_ADDR bit to indicate @address is a source + * address + * + * Return: 0 in case of success, negative errno code otherwise. */ - static int igc_del_mac_filter(struct igc_adapter *adapter, - const u8 *addr, const u8 queue) + int igc_del_mac_filter(struct igc_adapter *adapter, const u8 *addr, + const u8 flags) { - struct igc_hw *hw = &adapter->hw; - int rar_entries = hw->mac.rar_entry_count; - int i; + struct net_device *dev = adapter->netdev; + struct igc_mac_addr *entry; + int index;
- if (is_zero_ether_addr(addr)) + if (!is_valid_ether_addr(addr)) return -EINVAL;
- /* Search for matching entry in the MAC table based on given address - * and queue. Do not touch entries at the end of the table reserved - * for the VF MAC addresses. - */ - for (i = 0; i < rar_entries; i++) { - if (!(adapter->mac_table[i].state & IGC_MAC_STATE_IN_USE)) - continue; - if (adapter->mac_table[i].state != 0) - continue; - if (adapter->mac_table[i].queue != queue) - continue; - if (!ether_addr_equal(adapter->mac_table[i].addr, addr)) - continue; + index = igc_find_mac_filter(adapter, addr, flags); + if (index < 0) + return -ENOENT;
- /* When a filter for the default address is "deleted", - * we return it to its initial configuration + entry = &adapter->mac_table[index]; + + if (entry->state & IGC_MAC_STATE_DEFAULT) { + /* If this is the default filter, we don't actually delete it. + * We just reset to its default value i.e. disable queue + * assignment. */ - if (adapter->mac_table[i].state & IGC_MAC_STATE_DEFAULT) { - adapter->mac_table[i].state = - IGC_MAC_STATE_DEFAULT | IGC_MAC_STATE_IN_USE; - adapter->mac_table[i].queue = 0; - } else { - adapter->mac_table[i].state = 0; - adapter->mac_table[i].queue = 0; - memset(adapter->mac_table[i].addr, 0, ETH_ALEN); - } + netdev_dbg(dev, "Disable default MAC filter queue assignment");
- igc_rar_set_index(adapter, i); - return 0; + entry->queue = -1; + igc_set_mac_filter_hw(adapter, 0, addr, entry->queue); + } else { + netdev_dbg(dev, "Delete MAC address filter: index %d address %pM", + index, addr); + + entry->state = 0; + entry->queue = -1; + memset(entry->addr, 0, ETH_ALEN); + igc_clear_mac_filter_hw(adapter, index); }
- return -ENOENT; + return 0; }
static int igc_uc_sync(struct net_device *netdev, const unsigned char *addr) { struct igc_adapter *adapter = netdev_priv(netdev); - int ret;
- ret = igc_add_mac_filter(adapter, addr, adapter->num_rx_queues); - - return min_t(int, ret, 0); + return igc_add_mac_filter(adapter, addr, -1, 0); }
static int igc_uc_unsync(struct net_device *netdev, const unsigned char *addr) { struct igc_adapter *adapter = netdev_priv(netdev);
- igc_del_mac_filter(adapter, addr, adapter->num_rx_queues); - - return 0; + return igc_del_mac_filter(adapter, addr, 0); }
/** @@@ -2325,7 -2397,9 +2397,9 @@@ static void igc_configure(struct igc_ad igc_setup_mrqc(adapter); igc_setup_rctl(adapter);
+ igc_set_default_mac_filter(adapter); igc_nfc_filter_restore(adapter); + igc_configure_tx(adapter); igc_configure_rx(adapter);
@@@ -3458,9 -3532,6 +3532,6 @@@ static void igc_nfc_filter_exit(struct hlist_for_each_entry(rule, &adapter->nfc_filter_list, nfc_node) igc_erase_filter(adapter, rule);
- hlist_for_each_entry(rule, &adapter->cls_flower_list, nfc_node) - igc_erase_filter(adapter, rule); - spin_unlock(&adapter->nfc_lock); }
@@@ -3689,106 -3760,6 +3760,6 @@@ igc_features_check(struct sk_buff *skb return features; }
- /* Add a MAC filter for 'addr' directing matching traffic to 'queue', - * 'flags' is used to indicate what kind of match is made, match is by - * default for the destination address, if matching by source address - * is desired the flag IGC_MAC_STATE_SRC_ADDR can be used. - */ - static int igc_add_mac_filter_flags(struct igc_adapter *adapter, - const u8 *addr, const u8 queue, - const u8 flags) - { - struct igc_hw *hw = &adapter->hw; - int rar_entries = hw->mac.rar_entry_count; - int i; - - if (is_zero_ether_addr(addr)) - return -EINVAL; - - /* Search for the first empty entry in the MAC table. - * Do not touch entries at the end of the table reserved for the VF MAC - * addresses. - */ - for (i = 0; i < rar_entries; i++) { - if (!igc_mac_entry_can_be_used(&adapter->mac_table[i], - addr, flags)) - continue; - - ether_addr_copy(adapter->mac_table[i].addr, addr); - adapter->mac_table[i].queue = queue; - adapter->mac_table[i].state |= IGC_MAC_STATE_IN_USE | flags; - - igc_rar_set_index(adapter, i); - return i; - } - - return -ENOSPC; - } - - int igc_add_mac_steering_filter(struct igc_adapter *adapter, - const u8 *addr, u8 queue, u8 flags) - { - return igc_add_mac_filter_flags(adapter, addr, queue, - IGC_MAC_STATE_QUEUE_STEERING | flags); - } - - /* Remove a MAC filter for 'addr' directing matching traffic to - * 'queue', 'flags' is used to indicate what kind of match need to be - * removed, match is by default for the destination address, if - * matching by source address is to be removed the flag - * IGC_MAC_STATE_SRC_ADDR can be used. - */ - static int igc_del_mac_filter_flags(struct igc_adapter *adapter, - const u8 *addr, const u8 queue, - const u8 flags) - { - struct igc_hw *hw = &adapter->hw; - int rar_entries = hw->mac.rar_entry_count; - int i; - - if (is_zero_ether_addr(addr)) - return -EINVAL; - - /* Search for matching entry in the MAC table based on given address - * and queue. Do not touch entries at the end of the table reserved - * for the VF MAC addresses. - */ - for (i = 0; i < rar_entries; i++) { - if (!(adapter->mac_table[i].state & IGC_MAC_STATE_IN_USE)) - continue; - if ((adapter->mac_table[i].state & flags) != flags) - continue; - if (adapter->mac_table[i].queue != queue) - continue; - if (!ether_addr_equal(adapter->mac_table[i].addr, addr)) - continue; - - /* When a filter for the default address is "deleted", - * we return it to its initial configuration - */ - if (adapter->mac_table[i].state & IGC_MAC_STATE_DEFAULT) { - adapter->mac_table[i].state = - IGC_MAC_STATE_DEFAULT | IGC_MAC_STATE_IN_USE; - } else { - adapter->mac_table[i].state = 0; - adapter->mac_table[i].queue = 0; - memset(adapter->mac_table[i].addr, 0, ETH_ALEN); - } - - igc_rar_set_index(adapter, i); - return 0; - } - - return -ENOENT; - } - - int igc_del_mac_steering_filter(struct igc_adapter *adapter, - const u8 *addr, u8 queue, u8 flags) - { - return igc_del_mac_filter_flags(adapter, addr, queue, - IGC_MAC_STATE_QUEUE_STEERING | flags); - } - static void igc_tsync_interrupt(struct igc_adapter *adapter) { struct igc_hw *hw = &adapter->hw; @@@ -4009,7 -3980,6 +3980,6 @@@ static void igc_watchdog_task(struct wo struct igc_hw *hw = &adapter->hw; struct igc_phy_info *phy = &hw->phy; u16 phy_data, retry_count = 20; - u32 connsw; u32 link; int i;
@@@ -4022,14 -3992,6 +3992,6 @@@ link = false; }
- /* Force link down if we have fiber to swap to */ - if (adapter->flags & IGC_FLAG_MAS_ENABLE) { - if (hw->phy.media_type == igc_media_type_copper) { - connsw = rd32(IGC_CONNSW); - if (!(connsw & IGC_CONNSW_AUTOSENSE_EN)) - link = 0; - } - } if (link) { /* Cancel scheduled suspend requests. */ pm_runtime_resume(netdev->dev.parent); @@@ -4491,6 -4453,158 +4453,158 @@@ static int igc_ioctl(struct net_device } }
+ static int igc_save_launchtime_params(struct igc_adapter *adapter, int queue, + bool enable) + { + struct igc_ring *ring; + int i; + + if (queue < 0 || queue >= adapter->num_tx_queues) + return -EINVAL; + + ring = adapter->tx_ring[queue]; + ring->launchtime_enable = enable; + + if (adapter->base_time) + return 0; + + adapter->cycle_time = NSEC_PER_SEC; + + for (i = 0; i < adapter->num_tx_queues; i++) { + ring = adapter->tx_ring[i]; + ring->start_time = 0; + ring->end_time = NSEC_PER_SEC; + } + + return 0; + } + + static bool validate_schedule(const struct tc_taprio_qopt_offload *qopt) + { + int queue_uses[IGC_MAX_TX_QUEUES] = { }; + size_t n; + + if (qopt->cycle_time_extension) + return false; + + for (n = 0; n < qopt->num_entries; n++) { + const struct tc_taprio_sched_entry *e; + int i; + + e = &qopt->entries[n]; + + /* i225 only supports "global" frame preemption + * settings. + */ + if (e->command != TC_TAPRIO_CMD_SET_GATES) + return false; + + for (i = 0; i < IGC_MAX_TX_QUEUES; i++) { + if (e->gate_mask & BIT(i)) + queue_uses[i]++; + + if (queue_uses[i] > 1) + return false; + } + } + + return true; + } + + static int igc_tsn_enable_launchtime(struct igc_adapter *adapter, + struct tc_etf_qopt_offload *qopt) + { + struct igc_hw *hw = &adapter->hw; + int err; + + if (hw->mac.type != igc_i225) + return -EOPNOTSUPP; + + err = igc_save_launchtime_params(adapter, qopt->queue, qopt->enable); + if (err) + return err; + + return igc_tsn_offload_apply(adapter); + } + + static int igc_save_qbv_schedule(struct igc_adapter *adapter, + struct tc_taprio_qopt_offload *qopt) + { + u32 start_time = 0, end_time = 0; + size_t n; + + if (!qopt->enable) { + adapter->base_time = 0; + return 0; + } + + if (adapter->base_time) + return -EALREADY; + + if (!validate_schedule(qopt)) + return -EINVAL; + + adapter->cycle_time = qopt->cycle_time; + adapter->base_time = qopt->base_time; + + /* FIXME: be a little smarter about cases when the gate for a + * queue stays open for more than one entry. + */ + for (n = 0; n < qopt->num_entries; n++) { + struct tc_taprio_sched_entry *e = &qopt->entries[n]; + int i; + + end_time += e->interval; + + for (i = 0; i < IGC_MAX_TX_QUEUES; i++) { + struct igc_ring *ring = adapter->tx_ring[i]; + + if (!(e->gate_mask & BIT(i))) + continue; + + ring->start_time = start_time; + ring->end_time = end_time; + } + + start_time += e->interval; + } + + return 0; + } + + static int igc_tsn_enable_qbv_scheduling(struct igc_adapter *adapter, + struct tc_taprio_qopt_offload *qopt) + { + struct igc_hw *hw = &adapter->hw; + int err; + + if (hw->mac.type != igc_i225) + return -EOPNOTSUPP; + + err = igc_save_qbv_schedule(adapter, qopt); + if (err) + return err; + + return igc_tsn_offload_apply(adapter); + } + + static int igc_setup_tc(struct net_device *dev, enum tc_setup_type type, + void *type_data) + { + struct igc_adapter *adapter = netdev_priv(dev); + + switch (type) { + case TC_SETUP_QDISC_TAPRIO: + return igc_tsn_enable_qbv_scheduling(adapter, type_data); + + case TC_SETUP_QDISC_ETF: + return igc_tsn_enable_launchtime(adapter, type_data); + + default: + return -EOPNOTSUPP; + } + } + static const struct net_device_ops igc_netdev_ops = { .ndo_open = igc_open, .ndo_stop = igc_close, @@@ -4503,6 -4617,7 +4617,7 @@@ .ndo_set_features = igc_set_features, .ndo_features_check = igc_features_check, .ndo_do_ioctl = igc_ioctl, + .ndo_setup_tc = igc_setup_tc, };
/* PCIe configuration access */ @@@ -4726,6 -4841,17 +4841,17 @@@ static int igc_probe(struct pci_dev *pd netdev->features |= NETIF_F_RXCSUM; netdev->features |= NETIF_F_HW_CSUM; netdev->features |= NETIF_F_SCTP_CRC; + netdev->features |= NETIF_F_HW_TC; + + #define IGC_GSO_PARTIAL_FEATURES (NETIF_F_GSO_GRE | \ + NETIF_F_GSO_GRE_CSUM | \ + NETIF_F_GSO_IPXIP4 | \ + NETIF_F_GSO_IPXIP6 | \ + NETIF_F_GSO_UDP_TUNNEL | \ + NETIF_F_GSO_UDP_TUNNEL_CSUM) + + netdev->gso_partial_features = IGC_GSO_PARTIAL_FEATURES; + netdev->features |= NETIF_F_GSO_PARTIAL | IGC_GSO_PARTIAL_FEATURES;
/* setup the private structure */ err = igc_sw_init(adapter); @@@ -4825,7 -4951,7 +4951,7 @@@ pcie_print_link_status(pdev); netdev_info(netdev, "MAC: %pM\n", netdev->dev_addr);
- dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NEVER_SKIP); + dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NO_DIRECT_COMPLETE);
pm_runtime_put_noidle(&pdev->dev);
diff --combined drivers/net/ethernet/mellanox/mlx5/core/en_rep.c index f372e94948fd,2de54d865dc8..1eac7a53d56f --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c @@@ -1773,14 -1773,19 +1773,14 @@@ static void mlx5e_cleanup_rep_rx(struc
static int mlx5e_init_ul_rep_rx(struct mlx5e_priv *priv) { - int err = mlx5e_init_rep_rx(priv); - - if (err) - return err; - mlx5e_create_q_counters(priv); - return 0; + return mlx5e_init_rep_rx(priv); }
static void mlx5e_cleanup_ul_rep_rx(struct mlx5e_priv *priv) { - mlx5e_destroy_q_counters(priv); mlx5e_cleanup_rep_rx(priv); + mlx5e_destroy_q_counters(priv); }
static int mlx5e_init_uplink_rep_tx(struct mlx5e_rep_priv *rpriv) @@@ -2051,26 -2056,22 +2051,22 @@@ static int register_devlink_port(struc return 0;
mlx5e_rep_get_port_parent_id(rpriv->netdev, &ppid); + dl_port_index = vport_to_devlink_port_index(dev, rep->vport); pfnum = PCI_FUNC(dev->pdev->devfn);
- if (rep->vport == MLX5_VPORT_UPLINK) { + if (rep->vport == MLX5_VPORT_UPLINK) devlink_port_attrs_set(&rpriv->dl_port, DEVLINK_PORT_FLAVOUR_PHYSICAL, pfnum, false, 0, &ppid.id[0], ppid.id_len); - dl_port_index = vport_to_devlink_port_index(dev, rep->vport); - } else if (rep->vport == MLX5_VPORT_PF) { + else if (rep->vport == MLX5_VPORT_PF) devlink_port_attrs_pci_pf_set(&rpriv->dl_port, &ppid.id[0], ppid.id_len, pfnum); - dl_port_index = rep->vport; - } else if (mlx5_eswitch_is_vf_vport(dev->priv.eswitch, - rpriv->rep->vport)) { + else if (mlx5_eswitch_is_vf_vport(dev->priv.eswitch, rpriv->rep->vport)) devlink_port_attrs_pci_vf_set(&rpriv->dl_port, &ppid.id[0], ppid.id_len, pfnum, rep->vport - 1); - dl_port_index = vport_to_devlink_port_index(dev, rep->vport); - }
return devlink_port_register(devlink, &rpriv->dl_port, dl_port_index); } diff --combined drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c index 5d9def18ae3a,781c1d184b60..57ac2ef52e80 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c @@@ -784,7 -784,8 +784,8 @@@ static bool mlx5_eswitch_reg_c1_loopbac static int esw_set_passing_vport_metadata(struct mlx5_eswitch *esw, bool enable) { u32 out[MLX5_ST_SZ_DW(query_esw_vport_context_out)] = {}; - u32 in[MLX5_ST_SZ_DW(modify_esw_vport_context_in)] = {}; + u32 min[MLX5_ST_SZ_DW(modify_esw_vport_context_in)] = {}; + u32 in[MLX5_ST_SZ_DW(query_esw_vport_context_in)] = {}; u8 curr, wanted; int err;
@@@ -792,8 -793,9 +793,9 @@@ !mlx5_eswitch_vport_match_metadata_enabled(esw)) return 0;
- err = mlx5_eswitch_query_esw_vport_context(esw->dev, 0, false, - out, sizeof(out)); + MLX5_SET(query_esw_vport_context_in, in, opcode, + MLX5_CMD_OP_QUERY_ESW_VPORT_CONTEXT); + err = mlx5_cmd_exec_inout(esw->dev, query_esw_vport_context, in, out); if (err) return err;
@@@ -808,14 -810,12 +810,12 @@@ else curr &= ~wanted;
- MLX5_SET(modify_esw_vport_context_in, in, + MLX5_SET(modify_esw_vport_context_in, min, esw_vport_context.fdb_to_vport_reg_c_id, curr); - - MLX5_SET(modify_esw_vport_context_in, in, + MLX5_SET(modify_esw_vport_context_in, min, field_select.fdb_to_vport_reg_c_id, 1);
- err = mlx5_eswitch_modify_esw_vport_context(esw->dev, 0, false, in, - sizeof(in)); + err = mlx5_eswitch_modify_esw_vport_context(esw->dev, 0, false, min); if (!err) { if (enable && (curr & MLX5_FDB_TO_VPORT_REG_C_1)) esw->flags |= MLX5_ESWITCH_REG_C1_LOOPBACK_ENABLED; @@@ -1468,7 -1468,7 +1468,7 @@@ query_vports out: *mode = mlx5_mode; return 0; - } + }
static void esw_destroy_restore_table(struct mlx5_eswitch *esw) { @@@ -1484,7 -1484,7 +1484,7 @@@
static int esw_create_restore_table(struct mlx5_eswitch *esw) { - u8 modact[MLX5_UN_SZ_BYTES(set_action_in_add_action_in_auto)] = {}; + u8 modact[MLX5_UN_SZ_BYTES(set_add_copy_action_in_auto)] = {}; int inlen = MLX5_ST_SZ_BYTES(create_flow_group_in); struct mlx5_flow_table_attr ft_attr = {}; struct mlx5_core_dev *dev = esw->dev; @@@ -1550,9 -1550,9 +1550,9 @@@ MLX5_FLOW_NAMESPACE_KERNEL, 1, modact); if (IS_ERR(mod_hdr)) { + err = PTR_ERR(mod_hdr); esw_warn(dev, "Failed to create restore mod header, err: %d\n", err); - err = PTR_ERR(mod_hdr); goto err_mod_hdr; }
@@@ -1894,7 -1894,7 +1894,7 @@@ static int esw_vport_ingress_prio_tag_c static int esw_vport_add_ingress_acl_modify_metadata(struct mlx5_eswitch *esw, struct mlx5_vport *vport) { - u8 action[MLX5_UN_SZ_BYTES(set_action_in_add_action_in_auto)] = {}; + u8 action[MLX5_UN_SZ_BYTES(set_add_copy_action_in_auto)] = {}; struct mlx5_flow_act flow_act = {}; int err = 0; u32 key; @@@ -2219,12 -2219,10 +2219,12 @@@ static int esw_offloads_steering_init(s total_vports = num_vfs + MLX5_SPECIAL_VPORTS(esw->dev);
memset(&esw->fdb_table.offloads, 0, sizeof(struct offloads_fdb)); + mutex_init(&esw->fdb_table.offloads.vports.lock); + hash_init(esw->fdb_table.offloads.vports.table);
err = esw_create_uplink_offloads_acl_tables(esw); if (err) - return err; + goto create_acl_err;
err = esw_create_offloads_table(esw, total_vports); if (err) @@@ -2242,6 -2240,9 +2242,6 @@@ if (err) goto create_fg_err;
- mutex_init(&esw->fdb_table.offloads.vports.lock); - hash_init(esw->fdb_table.offloads.vports.table); - return 0;
create_fg_err: @@@ -2252,19 -2253,18 +2252,19 @@@ create_restore_err esw_destroy_offloads_table(esw); create_offloads_err: esw_destroy_uplink_offloads_acl_tables(esw); - +create_acl_err: + mutex_destroy(&esw->fdb_table.offloads.vports.lock); return err; }
static void esw_offloads_steering_cleanup(struct mlx5_eswitch *esw) { - mutex_destroy(&esw->fdb_table.offloads.vports.lock); esw_destroy_vport_rx_group(esw); esw_destroy_offloads_fdb_tables(esw); esw_destroy_restore_table(esw); esw_destroy_offloads_table(esw); esw_destroy_uplink_offloads_acl_tables(esw); + mutex_destroy(&esw->fdb_table.offloads.vports.lock); }
static void @@@ -2377,9 -2377,9 +2377,9 @@@ int esw_offloads_enable(struct mlx5_esw err_vports: esw_offloads_unload_rep(esw, MLX5_VPORT_UPLINK); err_uplink: - esw_set_passing_vport_metadata(esw, false); -err_steering_init: esw_offloads_steering_cleanup(esw); +err_steering_init: + esw_set_passing_vport_metadata(esw, false); err_vport_metadata: mlx5_rdma_disable_roce(esw->dev); mutex_destroy(&esw->offloads.termtbl_mutex); diff --combined drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c index 18719acb7e54,c4ed25bb9ac8..b8d97d44be7b --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c @@@ -100,14 -100,10 +100,10 @@@ static int dr_poll_cq(struct mlx5dr_cq return err == CQ_POLL_ERR ? err : npolled; }
- static void dr_qp_event(struct mlx5_core_qp *mqp, int event) - { - pr_info("DR QP event %u on QP #%u\n", event, mqp->qpn); - } - static struct mlx5dr_qp *dr_create_rc_qp(struct mlx5_core_dev *mdev, struct dr_qp_init_attr *attr) { + u32 out[MLX5_ST_SZ_DW(create_qp_out)] = {}; u32 temp_qpc[MLX5_ST_SZ_DW(qpc)] = {}; struct mlx5_wq_param wqp; struct mlx5dr_qp *dr_qp; @@@ -180,14 -176,12 +176,12 @@@ (__be64 *)MLX5_ADDR_OF(create_qp_in, in, pas));
- err = mlx5_core_create_qp(mdev, &dr_qp->mqp, in, inlen); + MLX5_SET(create_qp_in, in, opcode, MLX5_CMD_OP_CREATE_QP); + err = mlx5_cmd_exec(mdev, in, inlen, out, sizeof(out)); + dr_qp->qpn = MLX5_GET(create_qp_out, out, qpn); kfree(in); - - if (err) { - mlx5_core_warn(mdev, " Can't create QP\n"); + if (err) goto err_in; - } - dr_qp->mqp.event = dr_qp_event; dr_qp->uar = attr->uar;
return dr_qp; @@@ -204,7 -198,12 +198,12 @@@ err_wq static void dr_destroy_qp(struct mlx5_core_dev *mdev, struct mlx5dr_qp *dr_qp) { - mlx5_core_destroy_qp(mdev, &dr_qp->mqp); + u32 in[MLX5_ST_SZ_DW(destroy_qp_in)] = {}; + + MLX5_SET(destroy_qp_in, in, opcode, MLX5_CMD_OP_DESTROY_QP); + MLX5_SET(destroy_qp_in, in, qpn, dr_qp->qpn); + mlx5_cmd_exec_in(mdev, destroy_qp, in); + kfree(dr_qp->sq.wqe_head); mlx5_wq_destroy(&dr_qp->wq_ctrl); kfree(dr_qp); @@@ -242,7 -241,7 +241,7 @@@ static void dr_rdma_segments(struct mlx MLX5_WQE_CTRL_CQ_UPDATE : 0; wq_ctrl->opmod_idx_opcode = cpu_to_be32(((dr_qp->sq.pc & 0xffff) << 8) | opcode); - wq_ctrl->qpn_ds = cpu_to_be32(size | dr_qp->mqp.qpn << 8); + wq_ctrl->qpn_ds = cpu_to_be32(size | dr_qp->qpn << 8); wq_raddr = (void *)(wq_ctrl + 1); wq_raddr->raddr = cpu_to_be64(remote_addr); wq_raddr->rkey = cpu_to_be32(rkey); @@@ -585,8 -584,10 +584,10 @@@ static int dr_modify_qp_rst2init(struc MLX5_SET(qpc, qpc, rre, 1); MLX5_SET(qpc, qpc, rwe, 1);
- return mlx5_core_qp_modify(mdev, MLX5_CMD_OP_RST2INIT_QP, 0, qpc, - &dr_qp->mqp); + MLX5_SET(rst2init_qp_in, in, opcode, MLX5_CMD_OP_RST2INIT_QP); + MLX5_SET(rst2init_qp_in, in, qpn, dr_qp->qpn); + + return mlx5_cmd_exec_in(mdev, rst2init_qp, in); }
static int dr_cmd_modify_qp_rtr2rts(struct mlx5_core_dev *mdev, @@@ -598,14 -599,15 +599,15 @@@
qpc = MLX5_ADDR_OF(rtr2rts_qp_in, in, qpc);
- MLX5_SET(rtr2rts_qp_in, in, qpn, dr_qp->mqp.qpn); + MLX5_SET(rtr2rts_qp_in, in, qpn, dr_qp->qpn);
- MLX5_SET(qpc, qpc, log_ack_req_freq, 0); MLX5_SET(qpc, qpc, retry_count, attr->retry_cnt); MLX5_SET(qpc, qpc, rnr_retry, attr->rnr_retry);
- return mlx5_core_qp_modify(mdev, MLX5_CMD_OP_RTR2RTS_QP, 0, qpc, - &dr_qp->mqp); + MLX5_SET(rtr2rts_qp_in, in, opcode, MLX5_CMD_OP_RTR2RTS_QP); + MLX5_SET(rtr2rts_qp_in, in, qpn, dr_qp->qpn); + + return mlx5_cmd_exec_in(mdev, rtr2rts_qp, in); }
static int dr_cmd_modify_qp_init2rtr(struct mlx5_core_dev *mdev, @@@ -617,7 -619,7 +619,7 @@@
qpc = MLX5_ADDR_OF(init2rtr_qp_in, in, qpc);
- MLX5_SET(init2rtr_qp_in, in, qpn, dr_qp->mqp.qpn); + MLX5_SET(init2rtr_qp_in, in, qpn, dr_qp->qpn);
MLX5_SET(qpc, qpc, mtu, attr->mtu); MLX5_SET(qpc, qpc, log_msg_max, DR_CHUNK_SIZE_MAX - 1); @@@ -636,8 -638,10 +638,10 @@@ MLX5_SET(qpc, qpc, primary_address_path.vhca_port_num, attr->port_num); MLX5_SET(qpc, qpc, min_rnr_nak, 1);
- return mlx5_core_qp_modify(mdev, MLX5_CMD_OP_INIT2RTR_QP, 0, qpc, - &dr_qp->mqp); + MLX5_SET(init2rtr_qp_in, in, opcode, MLX5_CMD_OP_INIT2RTR_QP); + MLX5_SET(init2rtr_qp_in, in, qpn, dr_qp->qpn); + + return mlx5_cmd_exec_in(mdev, init2rtr_qp, in); }
static int dr_prepare_qp_to_rts(struct mlx5dr_domain *dmn) @@@ -663,7 -667,7 +667,7 @@@ return ret;
rtr_attr.mtu = mtu; - rtr_attr.qp_num = dr_qp->mqp.qpn; + rtr_attr.qp_num = dr_qp->qpn; rtr_attr.min_rnr_timer = 12; rtr_attr.port_num = port; rtr_attr.sgid_index = gid_index; @@@ -689,18 -693,6 +693,12 @@@ return 0; }
- static void dr_cq_event(struct mlx5_core_cq *mcq, - enum mlx5_event event) - { - pr_info("CQ event %u on CQ #%u\n", event, mcq->cqn); - } - +static void dr_cq_complete(struct mlx5_core_cq *mcq, + struct mlx5_eqe *eqe) +{ + pr_err("CQ completion CQ: #%u\n", mcq->cqn); +} + static struct mlx5dr_cq *dr_create_cq(struct mlx5_core_dev *mdev, struct mlx5_uars_page *uar, size_t ncqe) @@@ -761,9 -753,6 +759,8 @@@ pas = (__be64 *)MLX5_ADDR_OF(create_cq_in, in, pas); mlx5_fill_page_frag_array(&cq->wq_ctrl.buf, pas);
- cq->mcq.event = dr_cq_event; + cq->mcq.comp = dr_cq_complete; + err = mlx5_core_create_cq(mdev, &cq->mcq, in, inlen, out, sizeof(out)); kvfree(in);
@@@ -774,12 -763,7 +771,12 @@@ cq->mcq.set_ci_db = cq->wq_ctrl.db.db; cq->mcq.arm_db = cq->wq_ctrl.db.db + 1; *cq->mcq.set_ci_db = 0; - *cq->mcq.arm_db = 0; + + /* set no-zero value, in order to avoid the HW to run db-recovery on + * CQ that used in polling mode. + */ + *cq->mcq.arm_db = cpu_to_be32(2 << 28); + cq->mcq.vector = 0; cq->mcq.irqn = irqn; cq->mcq.uar = uar; diff --combined drivers/net/phy/marvell10g.c index 1f1a01c98e44,8352c09004c7..d4c2e62b2439 --- a/drivers/net/phy/marvell10g.c +++ b/drivers/net/phy/marvell10g.c @@@ -66,9 -66,6 +66,9 @@@ enum MV_PCS_CSSR1_SPD2_2500 = 0x0004, MV_PCS_CSSR1_SPD2_10000 = 0x0000,
+ /* Temperature read register (88E2110 only) */ + MV_PCS_TEMP = 0x8042, + /* These registers appear at 0x800X and 0xa00X - the 0xa00X control * registers appear to set themselves to the 0x800X when AN is * restarted, but status registers appear readable from either. @@@ -80,7 -77,6 +80,7 @@@ MV_V2_PORT_CTRL = 0xf001, MV_V2_PORT_CTRL_SWRST = BIT(15), MV_V2_PORT_CTRL_PWRDOWN = BIT(11), + /* Temperature control/read registers (88X3310 only) */ MV_V2_TEMP_CTRL = 0xf08a, MV_V2_TEMP_CTRL_MASK = 0xc000, MV_V2_TEMP_CTRL_SAMPLE = 0x0000, @@@ -108,24 -104,6 +108,24 @@@ static umode_t mv3310_hwmon_is_visible( return 0; }
+static int mv3310_hwmon_read_temp_reg(struct phy_device *phydev) +{ + return phy_read_mmd(phydev, MDIO_MMD_VEND2, MV_V2_TEMP); +} + +static int mv2110_hwmon_read_temp_reg(struct phy_device *phydev) +{ + return phy_read_mmd(phydev, MDIO_MMD_PCS, MV_PCS_TEMP); +} + +static int mv10g_hwmon_read_temp_reg(struct phy_device *phydev) +{ + if (phydev->drv->phy_id == MARVELL_PHY_ID_88X3310) + return mv3310_hwmon_read_temp_reg(phydev); + else /* MARVELL_PHY_ID_88E2110 */ + return mv2110_hwmon_read_temp_reg(phydev); +} + static int mv3310_hwmon_read(struct device *dev, enum hwmon_sensor_types type, u32 attr, int channel, long *value) { @@@ -138,7 -116,7 +138,7 @@@ }
if (type == hwmon_temp && attr == hwmon_temp_input) { - temp = phy_read_mmd(phydev, MDIO_MMD_VEND2, MV_V2_TEMP); + temp = mv10g_hwmon_read_temp_reg(phydev); if (temp < 0) return temp;
@@@ -191,9 -169,6 +191,9 @@@ static int mv3310_hwmon_config(struct p u16 val; int ret;
+ if (phydev->drv->phy_id != MARVELL_PHY_ID_88X3310) + return 0; + ret = phy_write_mmd(phydev, MDIO_MMD_VEND2, MV_V2_TEMP, MV_V2_TEMP_UNKNOWN); if (ret < 0) @@@ -753,7 -728,6 +753,6 @@@ static struct phy_driver mv3310_drivers .phy_id_mask = MARVELL_PHY_ID_MASK, .name = "mv88x3310", .get_features = mv3310_get_features, - .soft_reset = genphy_no_soft_reset, .config_init = mv3310_config_init, .probe = mv3310_probe, .suspend = mv3310_suspend, @@@ -771,7 -745,6 +770,6 @@@ .probe = mv3310_probe, .suspend = mv3310_suspend, .resume = mv3310_resume, - .soft_reset = genphy_no_soft_reset, .config_init = mv3310_config_init, .config_aneg = mv3310_config_aneg, .aneg_done = mv3310_aneg_done, diff --combined include/linux/mlx5/driver.h index 1a4ba36275de,d82dbbab8179..03a798beb43e --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h @@@ -130,6 -130,7 +130,7 @@@ enum MLX5_REG_NODE_DESC = 0x6001, MLX5_REG_HOST_ENDIANNESS = 0x7004, MLX5_REG_MCIA = 0x9014, + MLX5_REG_MFRL = 0x9028, MLX5_REG_MLCR = 0x902b, MLX5_REG_MTRC_CAP = 0x9040, MLX5_REG_MTRC_CONF = 0x9041, @@@ -200,7 -201,7 +201,7 @@@ struct mlx5_rsc_debug void *object; enum dbg_rsc_type type; struct dentry *root; - struct mlx5_field_desc fields[0]; + struct mlx5_field_desc fields[]; };
enum mlx5_dev_event { @@@ -541,7 -542,6 +542,6 @@@ struct mlx5_priv struct mlx5_core_health health;
/* start: qp staff */ - struct mlx5_qp_table qp_table; struct dentry *qp_debugfs; struct dentry *eq_debugfs; struct dentry *cq_debugfs; @@@ -687,7 -687,6 +687,6 @@@ struct mlx5_core_dev unsigned long intf_state; struct mlx5_priv priv; struct mlx5_profile *profile; - atomic_t num_qps; u32 issi; struct mlx5e_resources mlx5e_res; struct mlx5_dm *dm; @@@ -903,6 -902,19 +902,19 @@@ int mlx5_cmd_exec_cb(struct mlx5_async_
int mlx5_cmd_exec(struct mlx5_core_dev *dev, void *in, int in_size, void *out, int out_size); + + #define mlx5_cmd_exec_inout(dev, ifc_cmd, in, out) \ + ({ \ + mlx5_cmd_exec(dev, in, MLX5_ST_SZ_BYTES(ifc_cmd##_in), out, \ + MLX5_ST_SZ_BYTES(ifc_cmd##_out)); \ + }) + + #define mlx5_cmd_exec_in(dev, ifc_cmd, in) \ + ({ \ + u32 _out[MLX5_ST_SZ_DW(ifc_cmd##_out)] = {}; \ + mlx5_cmd_exec_inout(dev, ifc_cmd, in, _out); \ + }) + int mlx5_cmd_exec_polling(struct mlx5_core_dev *dev, void *in, int in_size, void *out, int out_size); void mlx5_cmd_mbox_status(void *out, u8 *status, u32 *syndrome); @@@ -1069,7 -1081,8 +1081,8 @@@ int mlx5_lag_query_cong_counters(struc struct mlx5_uars_page *mlx5_get_uars_page(struct mlx5_core_dev *mdev); void mlx5_put_uars_page(struct mlx5_core_dev *mdev, struct mlx5_uars_page *up); int mlx5_dm_sw_icm_alloc(struct mlx5_core_dev *dev, enum mlx5_sw_icm_type type, - u64 length, u16 uid, phys_addr_t *addr, u32 *obj_id); + u64 length, u32 log_alignment, u16 uid, + phys_addr_t *addr, u32 *obj_id); int mlx5_dm_sw_icm_dealloc(struct mlx5_core_dev *dev, enum mlx5_sw_icm_type type, u64 length, u16 uid, phys_addr_t addr, u32 obj_id);
diff --combined include/linux/mlx5/mlx5_ifc.h index 8d30f18dcdee,fb243848132d..8428f437feba --- a/include/linux/mlx5/mlx5_ifc.h +++ b/include/linux/mlx5/mlx5_ifc.h @@@ -74,6 -74,7 +74,7 @@@ enum MLX5_SET_HCA_CAP_OP_MOD_GENERAL_DEVICE = 0x0, MLX5_SET_HCA_CAP_OP_MOD_ODP = 0x2, MLX5_SET_HCA_CAP_OP_MOD_ATOMIC = 0x3, + MLX5_SET_HCA_CAP_OP_MOD_ROCE = 0x4, };
enum { @@@ -885,7 -886,8 +886,8 @@@ struct mlx5_ifc_per_protocol_networking u8 tunnel_stateless_vxlan_gpe[0x1]; u8 tunnel_stateless_ipv4_over_vxlan[0x1]; u8 tunnel_stateless_ip_over_ip[0x1]; - u8 reserved_at_2a[0x6]; + u8 insert_trailer[0x1]; + u8 reserved_at_2b[0x5]; u8 max_vxlan_udp_ports[0x8]; u8 reserved_at_38[0x6]; u8 max_geneve_opt_len[0x1]; @@@ -903,7 -905,9 +905,9 @@@
struct mlx5_ifc_roce_cap_bits { u8 roce_apm[0x1]; - u8 reserved_at_1[0x1f]; + u8 reserved_at_1[0x3]; + u8 sw_r_roce_src_udp_port[0x1]; + u8 reserved_at_5[0x1b];
u8 reserved_at_20[0x60];
@@@ -1097,6 -1101,23 +1101,23 @@@ struct mlx5_ifc_tls_cap_bits u8 reserved_at_20[0x7e0]; };
+ struct mlx5_ifc_ipsec_cap_bits { + u8 ipsec_full_offload[0x1]; + u8 ipsec_crypto_offload[0x1]; + u8 ipsec_esn[0x1]; + u8 ipsec_crypto_esp_aes_gcm_256_encrypt[0x1]; + u8 ipsec_crypto_esp_aes_gcm_128_encrypt[0x1]; + u8 ipsec_crypto_esp_aes_gcm_256_decrypt[0x1]; + u8 ipsec_crypto_esp_aes_gcm_128_decrypt[0x1]; + u8 reserved_at_7[0x4]; + u8 log_max_ipsec_offload[0x5]; + u8 reserved_at_10[0x10]; + + u8 min_log_ipsec_full_replay_window[0x8]; + u8 max_log_ipsec_full_replay_window[0x8]; + u8 reserved_at_30[0x7d0]; + }; + enum { MLX5_WQ_TYPE_LINKED_LIST = 0x0, MLX5_WQ_TYPE_CYCLIC = 0x1, @@@ -1223,7 -1244,9 +1244,9 @@@ struct mlx5_ifc_cmd_hca_cap_bits u8 reserved_at_130[0xa]; u8 log_max_ra_res_dc[0x6];
- u8 reserved_at_140[0x9]; + u8 reserved_at_140[0x6]; + u8 release_all_pages[0x1]; + u8 reserved_at_147[0x2]; u8 roce_accl[0x1]; u8 log_max_ra_req_qp[0x6]; u8 reserved_at_150[0xa]; @@@ -1296,7 -1319,9 +1319,9 @@@ u8 wol_p[0x1];
u8 stat_rate_support[0x10]; - u8 reserved_at_1f0[0xc]; + u8 reserved_at_1f0[0x1]; + u8 pci_sync_for_fw_update_event[0x1]; + u8 reserved_at_1f2[0xa]; u8 cqe_version[0x4];
u8 compact_address_vector[0x1]; @@@ -1461,13 -1486,14 +1486,14 @@@
u8 reserved_at_460[0x3]; u8 log_max_uctx[0x5]; - u8 reserved_at_468[0x3]; + u8 reserved_at_468[0x2]; + u8 ipsec_offload[0x1]; u8 log_max_umem[0x5]; u8 max_num_eqs[0x10];
u8 reserved_at_480[0x1]; u8 tls_tx[0x1]; - u8 reserved_at_482[0x1]; + u8 tls_rx[0x1]; u8 log_max_l2_table[0x5]; u8 reserved_at_488[0x8]; u8 log_uar_page_sz[0x10]; @@@ -1677,7 -1703,7 +1703,7 @@@ struct mlx5_ifc_wq_bits
u8 reserved_at_140[0x4c0];
- struct mlx5_ifc_cmd_pas_bits pas[0]; + struct mlx5_ifc_cmd_pas_bits pas[]; };
struct mlx5_ifc_rq_num_bits { @@@ -1895,7 -1921,7 +1921,7 @@@ struct mlx5_ifc_resource_dump_menu_segm u8 reserved_at_20[0x10]; u8 num_of_records[0x10];
- struct mlx5_ifc_resource_dump_menu_record_bits record[0]; + struct mlx5_ifc_resource_dump_menu_record_bits record[]; };
struct mlx5_ifc_resource_dump_resource_segment_bits { @@@ -1907,7 -1933,7 +1933,7 @@@
u8 index2[0x20];
- u8 payload[0][0x20]; + u8 payload[][0x20]; };
struct mlx5_ifc_resource_dump_terminate_segment_bits { @@@ -2984,7 -3010,7 +3010,7 @@@ struct mlx5_ifc_flow_context_bits
u8 reserved_at_1200[0x600];
- union mlx5_ifc_dest_format_struct_flow_counter_list_auto_bits destination[0]; + union mlx5_ifc_dest_format_struct_flow_counter_list_auto_bits destination[]; };
enum { @@@ -3112,7 -3138,8 +3138,8 @@@ struct mlx5_ifc_tirc_bits u8 reserved_at_0[0x20];
u8 disp_type[0x4]; - u8 reserved_at_24[0x1c]; + u8 tls_en[0x1]; + u8 reserved_at_25[0x1b];
u8 reserved_at_40[0x40];
@@@ -3276,7 -3303,7 +3303,7 @@@ struct mlx5_ifc_rqtc_bits
u8 reserved_at_e0[0x6a0];
- struct mlx5_ifc_rq_num_bits rq_num[0]; + struct mlx5_ifc_rq_num_bits rq_num[]; };
enum { @@@ -3388,7 -3415,7 +3415,7 @@@ struct mlx5_ifc_nic_vport_context_bits
u8 reserved_at_7e0[0x20];
- u8 current_uc_mac_address[0][0x40]; + u8 current_uc_mac_address[][0x40]; };
enum { @@@ -4140,7 -4167,8 +4167,8 @@@ enum MLX5_SET_FTE_MODIFY_ENABLE_MASK_ACTION = 0x0, MLX5_SET_FTE_MODIFY_ENABLE_MASK_FLOW_TAG = 0x1, MLX5_SET_FTE_MODIFY_ENABLE_MASK_DESTINATION_LIST = 0x2, - MLX5_SET_FTE_MODIFY_ENABLE_MASK_FLOW_COUNTERS = 0x3 + MLX5_SET_FTE_MODIFY_ENABLE_MASK_FLOW_COUNTERS = 0x3, + MLX5_SET_FTE_MODIFY_ENABLE_MASK_IPSEC_OBJ_ID = 0x4 };
struct mlx5_ifc_set_fte_out_bits { @@@ -4310,7 -4338,7 +4338,7 @@@ struct mlx5_ifc_query_xrc_srq_out_bits
u8 reserved_at_280[0x600];
- u8 pas[0][0x40]; + u8 pas[][0x40]; };
struct mlx5_ifc_query_xrc_srq_in_bits { @@@ -4588,7 -4616,7 +4616,7 @@@ struct mlx5_ifc_query_srq_out_bits
u8 reserved_at_280[0x600];
- u8 pas[0][0x40]; + u8 pas[][0x40]; };
struct mlx5_ifc_query_srq_in_bits { @@@ -4799,7 -4827,7 +4827,7 @@@ struct mlx5_ifc_query_qp_out_bits
u8 reserved_at_800[0x80];
- u8 pas[0][0x40]; + u8 pas[][0x40]; };
struct mlx5_ifc_query_qp_in_bits { @@@ -5132,7 -5160,7 +5160,7 @@@ struct mlx5_ifc_query_hca_vport_pkey_ou
u8 reserved_at_40[0x40];
- struct mlx5_ifc_pkey_bits pkey[0]; + struct mlx5_ifc_pkey_bits pkey[]; };
struct mlx5_ifc_query_hca_vport_pkey_in_bits { @@@ -5168,7 -5196,7 +5196,7 @@@ struct mlx5_ifc_query_hca_vport_gid_out u8 gids_num[0x10]; u8 reserved_at_70[0x10];
- struct mlx5_ifc_array128_auto_bits gid[0]; + struct mlx5_ifc_array128_auto_bits gid[]; };
struct mlx5_ifc_query_hca_vport_gid_in_bits { @@@ -5436,7 -5464,7 +5464,7 @@@ struct mlx5_ifc_query_flow_counter_out_
u8 reserved_at_40[0x40];
- struct mlx5_ifc_traffic_counter_bits flow_statistics[0]; + struct mlx5_ifc_traffic_counter_bits flow_statistics[]; };
struct mlx5_ifc_query_flow_counter_in_bits { @@@ -5530,7 -5558,7 +5558,7 @@@ struct mlx5_ifc_query_eq_out_bits
u8 reserved_at_300[0x580];
- u8 pas[0][0x40]; + u8 pas[][0x40]; };
struct mlx5_ifc_query_eq_in_bits { @@@ -5555,7 -5583,7 +5583,7 @@@ struct mlx5_ifc_packet_reformat_context u8 reserved_at_20[0x10]; u8 reformat_data[2][0x8];
- u8 more_reformat_data[0][0x8]; + u8 more_reformat_data[][0x8]; };
struct mlx5_ifc_query_packet_reformat_context_out_bits { @@@ -5566,7 -5594,7 +5594,7 @@@
u8 reserved_at_40[0xa0];
- struct mlx5_ifc_packet_reformat_context_in_bits packet_reformat_context[0]; + struct mlx5_ifc_packet_reformat_context_in_bits packet_reformat_context[]; };
struct mlx5_ifc_query_packet_reformat_context_in_bits { @@@ -5667,9 -5695,9 +5695,9 @@@ struct mlx5_ifc_copy_action_in_bits u8 reserved_at_38[0x8]; };
- union mlx5_ifc_set_action_in_add_action_in_auto_bits { - struct mlx5_ifc_set_action_in_bits set_action_in; - struct mlx5_ifc_add_action_in_bits add_action_in; + union mlx5_ifc_set_add_copy_action_in_auto_bits { + struct mlx5_ifc_set_action_in_bits set_action_in; + struct mlx5_ifc_add_action_in_bits add_action_in; struct mlx5_ifc_copy_action_in_bits copy_action_in; u8 reserved_at_0[0x40]; }; @@@ -5743,7 -5771,7 +5771,7 @@@ struct mlx5_ifc_alloc_modify_header_con u8 reserved_at_68[0x10]; u8 num_of_actions[0x8];
- union mlx5_ifc_set_action_in_add_action_in_auto_bits actions[]; - union mlx5_ifc_set_add_copy_action_in_auto_bits actions[0]; ++ union mlx5_ifc_set_add_copy_action_in_auto_bits actions[]; };
struct mlx5_ifc_dealloc_modify_header_context_out_bits { @@@ -5805,7 -5833,7 +5833,7 @@@ struct mlx5_ifc_query_cq_out_bits
u8 reserved_at_280[0x600];
- u8 pas[0][0x40]; + u8 pas[][0x40]; };
struct mlx5_ifc_query_cq_in_bits { @@@ -6412,7 -6440,7 +6440,7 @@@ struct mlx5_ifc_modify_cq_in_bits
u8 reserved_at_300[0x580];
- u8 pas[0][0x40]; + u8 pas[][0x40]; };
struct mlx5_ifc_modify_cong_status_out_bits { @@@ -6476,7 -6504,7 +6504,7 @@@ struct mlx5_ifc_manage_pages_out_bits
u8 reserved_at_60[0x20];
- u8 pas[0][0x40]; + u8 pas[][0x40]; };
enum { @@@ -6498,7 -6526,7 +6526,7 @@@ struct mlx5_ifc_manage_pages_in_bits
u8 input_num_entries[0x20];
- u8 pas[0][0x40]; + u8 pas[][0x40]; };
struct mlx5_ifc_mad_ifc_out_bits { @@@ -7453,7 -7481,7 +7481,7 @@@ struct mlx5_ifc_create_xrc_srq_in_bits
u8 reserved_at_300[0x580];
- u8 pas[0][0x40]; + u8 pas[][0x40]; };
struct mlx5_ifc_create_tis_out_bits { @@@ -7529,7 -7557,7 +7557,7 @@@ struct mlx5_ifc_create_srq_in_bits
u8 reserved_at_280[0x600];
- u8 pas[0][0x40]; + u8 pas[][0x40]; };
struct mlx5_ifc_create_sq_out_bits { @@@ -7690,7 -7718,7 +7718,7 @@@ struct mlx5_ifc_create_qp_in_bits u8 wq_umem_valid[0x1]; u8 reserved_at_861[0x1f];
- u8 pas[0][0x40]; + u8 pas[][0x40]; };
struct mlx5_ifc_create_psv_out_bits { @@@ -7761,7 -7789,7 +7789,7 @@@ struct mlx5_ifc_create_mkey_in_bits
u8 reserved_at_320[0x560];
- u8 klm_pas_mtt[0][0x20]; + u8 klm_pas_mtt[][0x20]; };
enum { @@@ -7894,7 -7922,7 +7922,7 @@@ struct mlx5_ifc_create_eq_in_bits
u8 reserved_at_3c0[0x4c0];
- u8 pas[0][0x40]; + u8 pas[][0x40]; };
struct mlx5_ifc_create_dct_out_bits { @@@ -7951,7 -7979,7 +7979,7 @@@ struct mlx5_ifc_create_cq_in_bits u8 cq_umem_valid[0x1]; u8 reserved_at_2e1[0x59f];
- u8 pas[0][0x40]; + u8 pas[][0x40]; };
struct mlx5_ifc_config_int_moderation_out_bits { @@@ -8307,7 -8335,7 +8335,7 @@@ struct mlx5_ifc_access_register_out_bit
u8 reserved_at_40[0x40];
- u8 register_data[0][0x20]; + u8 register_data[][0x20]; };
enum { @@@ -8327,7 -8355,7 +8355,7 @@@ struct mlx5_ifc_access_register_in_bit
u8 argument[0x20];
- u8 register_data[0][0x20]; + u8 register_data[][0x20]; };
struct mlx5_ifc_sltp_reg_bits { @@@ -9344,7 -9372,7 +9372,7 @@@ struct mlx5_ifc_cmd_in_bits u8 reserved_at_20[0x10]; u8 op_mod[0x10];
- u8 command[0][0x20]; + u8 command[][0x20]; };
struct mlx5_ifc_cmd_if_box_bits { @@@ -9638,7 -9666,7 +9666,7 @@@ struct mlx5_ifc_mcqi_reg_bits u8 reserved_at_a0[0x10]; u8 data_size[0x10];
- union mlx5_ifc_mcqi_reg_data_bits data[0]; + union mlx5_ifc_mcqi_reg_data_bits data[]; };
struct mlx5_ifc_mcc_reg_bits { @@@ -9677,9 -9705,32 +9705,32 @@@ struct mlx5_ifc_mcda_reg_bits
u8 reserved_at_60[0x20];
- u8 data[0][0x20]; + u8 data[][0x20]; };
+ enum { + MLX5_MFRL_REG_RESET_TYPE_FULL_CHIP = BIT(0), + MLX5_MFRL_REG_RESET_TYPE_NET_PORT_ALIVE = BIT(1), + }; + + enum { + MLX5_MFRL_REG_RESET_LEVEL0 = BIT(0), + MLX5_MFRL_REG_RESET_LEVEL3 = BIT(3), + MLX5_MFRL_REG_RESET_LEVEL6 = BIT(6), + }; + + struct mlx5_ifc_mfrl_reg_bits { + u8 reserved_at_0[0x20]; + + u8 reserved_at_20[0x2]; + u8 pci_sync_for_fw_update_start[0x1]; + u8 pci_sync_for_fw_update_resp[0x2]; + u8 rst_type_sel[0x3]; + u8 reserved_at_28[0x8]; + u8 reset_type[0x8]; + u8 reset_level[0x8]; + }; + struct mlx5_ifc_mirc_reg_bits { u8 reserved_at_0[0x18]; u8 status_code[0x8]; @@@ -9743,6 -9794,7 +9794,7 @@@ union mlx5_ifc_ports_control_registers_ struct mlx5_ifc_mcc_reg_bits mcc_reg; struct mlx5_ifc_mcda_reg_bits mcda_reg; struct mlx5_ifc_mirc_reg_bits mirc_reg; + struct mlx5_ifc_mfrl_reg_bits mfrl_reg; u8 reserved_at_0[0x60e0]; };
@@@ -10200,7 -10252,7 +10252,7 @@@ struct mlx5_ifc_umem_bits
u8 num_of_mtt[0x40];
- struct mlx5_ifc_mtt_bits mtt[0]; + struct mlx5_ifc_mtt_bits mtt[]; };
struct mlx5_ifc_uctx_bits { @@@ -10325,7 -10377,7 +10377,7 @@@ struct mlx5_ifc_mtrc_stdb_bits u8 reserved_at_4[0x4]; u8 read_size[0x18]; u8 start_offset[0x20]; - u8 string_db_data[0]; + u8 string_db_data[]; };
struct mlx5_ifc_mtrc_ctrl_bits { @@@ -10379,7 -10431,7 +10431,7 @@@ struct mlx5_ifc_query_esw_functions_out struct mlx5_ifc_host_params_context_bits host_params_context;
u8 reserved_at_280[0x180]; - u8 host_sf_enable[0][0x40]; + u8 host_sf_enable[][0x40]; };
struct mlx5_ifc_sf_partition_bits { @@@ -10399,7 -10451,7 +10451,7 @@@ struct mlx5_ifc_query_sf_partitions_out
u8 reserved_at_60[0x20];
- struct mlx5_ifc_sf_partition_bits sf_partition[0]; + struct mlx5_ifc_sf_partition_bits sf_partition[]; };
struct mlx5_ifc_query_sf_partitions_in_bits { @@@ -10465,10 -10517,62 +10517,62 @@@ struct mlx5_ifc_affiliated_event_header
enum { MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_ENCRYPTION_KEY = BIT(0xc), + MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_IPSEC = BIT(0x13), };
enum { MLX5_GENERAL_OBJECT_TYPES_ENCRYPTION_KEY = 0xc, + MLX5_GENERAL_OBJECT_TYPES_IPSEC = 0x13, + }; + + enum { + MLX5_IPSEC_OBJECT_ICV_LEN_16B, + MLX5_IPSEC_OBJECT_ICV_LEN_12B, + MLX5_IPSEC_OBJECT_ICV_LEN_8B, + }; + + struct mlx5_ifc_ipsec_obj_bits { + u8 modify_field_select[0x40]; + u8 full_offload[0x1]; + u8 reserved_at_41[0x1]; + u8 esn_en[0x1]; + u8 esn_overlap[0x1]; + u8 reserved_at_44[0x2]; + u8 icv_length[0x2]; + u8 reserved_at_48[0x4]; + u8 aso_return_reg[0x4]; + u8 reserved_at_50[0x10]; + + u8 esn_msb[0x20]; + + u8 reserved_at_80[0x8]; + u8 dekn[0x18]; + + u8 salt[0x20]; + + u8 implicit_iv[0x40]; + + u8 reserved_at_100[0x700]; + }; + + struct mlx5_ifc_create_ipsec_obj_in_bits { + struct mlx5_ifc_general_obj_in_cmd_hdr_bits general_obj_in_cmd_hdr; + struct mlx5_ifc_ipsec_obj_bits ipsec_object; + }; + + enum { + MLX5_MODIFY_IPSEC_BITMASK_ESN_OVERLAP = BIT(0), + MLX5_MODIFY_IPSEC_BITMASK_ESN_MSB = BIT(1), + }; + + struct mlx5_ifc_query_ipsec_obj_out_bits { + struct mlx5_ifc_general_obj_out_cmd_hdr_bits general_obj_out_cmd_hdr; + struct mlx5_ifc_ipsec_obj_bits ipsec_object; + }; + + struct mlx5_ifc_modify_ipsec_obj_in_bits { + struct mlx5_ifc_general_obj_in_cmd_hdr_bits general_obj_in_cmd_hdr; + struct mlx5_ifc_ipsec_obj_bits ipsec_object; };
struct mlx5_ifc_encryption_key_obj_bits { diff --combined include/linux/mlx5/qp.h index 4e684298d1de,f23eb18526fe..1af5e460b5f6 --- a/include/linux/mlx5/qp.h +++ b/include/linux/mlx5/qp.h @@@ -229,6 -229,11 +229,11 @@@ enum
enum { MLX5_ETH_WQE_SVLAN = 1 << 0, + MLX5_ETH_WQE_TRAILER_HDR_OUTER_IP_ASSOC = 1 << 26, + MLX5_ETH_WQE_TRAILER_HDR_OUTER_L4_ASSOC = 1 << 27, + MLX5_ETH_WQE_TRAILER_HDR_INNER_IP_ASSOC = 3 << 26, + MLX5_ETH_WQE_TRAILER_HDR_INNER_L4_ASSOC = 1 << 28, + MLX5_ETH_WQE_INSERT_TRAILER = 1 << 30, MLX5_ETH_WQE_INSERT_VLAN = 1 << 15, };
@@@ -257,6 -262,7 +262,7 @@@ struct mlx5_wqe_eth_seg __be16 type; __be16 vlan_tci; } insert; + __be32 trailer; }; };
@@@ -402,7 -408,7 +408,7 @@@ struct mlx5_wqe_signature_seg
struct mlx5_wqe_inline_seg { __be32 byte_count; - __be32 data[0]; + __be32 data[]; };
enum mlx5_sig_type { @@@ -553,57 -559,8 +559,8 @@@ struct mlx5_qp_context u8 rsvd1[24]; };
- static inline struct mlx5_core_qp *__mlx5_qp_lookup(struct mlx5_core_dev *dev, u32 qpn) - { - return radix_tree_lookup(&dev->priv.qp_table.tree, qpn); - } - - int mlx5_core_create_dct(struct mlx5_core_dev *dev, - struct mlx5_core_dct *qp, - u32 *in, int inlen, - u32 *out, int outlen); - int mlx5_core_create_qp(struct mlx5_core_dev *dev, - struct mlx5_core_qp *qp, - u32 *in, - int inlen); - int mlx5_core_qp_modify(struct mlx5_core_dev *dev, u16 opcode, - u32 opt_param_mask, void *qpc, - struct mlx5_core_qp *qp); - int mlx5_core_destroy_qp(struct mlx5_core_dev *dev, - struct mlx5_core_qp *qp); - int mlx5_core_destroy_dct(struct mlx5_core_dev *dev, - struct mlx5_core_dct *dct); - int mlx5_core_qp_query(struct mlx5_core_dev *dev, struct mlx5_core_qp *qp, - u32 *out, int outlen); - int mlx5_core_dct_query(struct mlx5_core_dev *dev, struct mlx5_core_dct *dct, - u32 *out, int outlen); - - int mlx5_core_set_delay_drop(struct mlx5_core_dev *dev, - u32 timeout_usec); - - int mlx5_core_xrcd_alloc(struct mlx5_core_dev *dev, u32 *xrcdn); - int mlx5_core_xrcd_dealloc(struct mlx5_core_dev *dev, u32 xrcdn); - void mlx5_init_qp_table(struct mlx5_core_dev *dev); - void mlx5_cleanup_qp_table(struct mlx5_core_dev *dev); int mlx5_debug_qp_add(struct mlx5_core_dev *dev, struct mlx5_core_qp *qp); void mlx5_debug_qp_remove(struct mlx5_core_dev *dev, struct mlx5_core_qp *qp); - int mlx5_core_create_rq_tracked(struct mlx5_core_dev *dev, u32 *in, int inlen, - struct mlx5_core_qp *rq); - void mlx5_core_destroy_rq_tracked(struct mlx5_core_dev *dev, - struct mlx5_core_qp *rq); - int mlx5_core_create_sq_tracked(struct mlx5_core_dev *dev, u32 *in, int inlen, - struct mlx5_core_qp *sq); - void mlx5_core_destroy_sq_tracked(struct mlx5_core_dev *dev, - struct mlx5_core_qp *sq); - int mlx5_core_alloc_q_counter(struct mlx5_core_dev *dev, u16 *counter_id); - int mlx5_core_dealloc_q_counter(struct mlx5_core_dev *dev, u16 counter_id); - int mlx5_core_query_q_counter(struct mlx5_core_dev *dev, u16 counter_id, - int reset, void *out, int out_size); - - struct mlx5_core_rsc_common *mlx5_core_res_hold(struct mlx5_core_dev *dev, - int res_num, - enum mlx5_res_type res_type); - void mlx5_core_res_put(struct mlx5_core_rsc_common *res);
static inline const char *mlx5_qp_type_str(int type) { diff --combined include/linux/tcp.h index 4f8159e90ce1,2c6f87e9f0cf..e60db06ec28d --- a/include/linux/tcp.h +++ b/include/linux/tcp.h @@@ -78,6 -78,47 +78,6 @@@ struct tcp_sack_block #define TCP_SACK_SEEN (1 << 0) /*1 = peer is SACK capable, */ #define TCP_DSACK_SEEN (1 << 2) /*1 = DSACK was received from peer*/
-#if IS_ENABLED(CONFIG_MPTCP) -struct mptcp_options_received { - u64 sndr_key; - u64 rcvr_key; - u64 data_ack; - u64 data_seq; - u32 subflow_seq; - u16 data_len; - u16 mp_capable : 1, - mp_join : 1, - dss : 1, - add_addr : 1, - rm_addr : 1, - family : 4, - echo : 1, - backup : 1; - u32 token; - u32 nonce; - u64 thmac; - u8 hmac[20]; - u8 join_id; - u8 use_map:1, - dsn64:1, - data_fin:1, - use_ack:1, - ack64:1, - mpc_map:1, - __unused:2; - u8 addr_id; - u8 rm_id; - union { - struct in_addr addr; -#if IS_ENABLED(CONFIG_MPTCP_IPV6) - struct in6_addr addr6; -#endif - }; - u64 ahmac; - u16 port; -}; -#endif - struct tcp_options_received { /* PAWS/RTTM data */ int ts_recent_stamp;/* Time we stored ts_recent (for aging) */ @@@ -95,6 -136,9 +95,6 @@@ u8 num_sacks; /* Number of SACK blocks */ u16 user_mss; /* mss requested by user in ioctl */ u16 mss_clamp; /* Maximal mss, negotiated at connection setup */ -#if IS_ENABLED(CONFIG_MPTCP) - struct mptcp_options_received mptcp; -#endif };
static inline void tcp_clear_options(struct tcp_options_received *rx_opt) @@@ -104,6 -148,13 +104,6 @@@ #if IS_ENABLED(CONFIG_SMC) rx_opt->smc_ok = 0; #endif -#if IS_ENABLED(CONFIG_MPTCP) - rx_opt->mptcp.mp_capable = 0; - rx_opt->mptcp.mp_join = 0; - rx_opt->mptcp.add_addr = 0; - rx_opt->mptcp.rm_addr = 0; - rx_opt->mptcp.dss = 0; -#endif }
/* This is the max number of SACKS that we'll generate and process. It's safe @@@ -217,6 -268,7 +217,7 @@@ struct tcp_sock } rack; u16 advmss; /* Advertised MSS */ u8 compressed_ack; + u8 dup_ack_counter; u32 chrono_start; /* Start time in jiffies of a TCP chrono */ u32 chrono_stat[3]; /* Time in jiffies for chrono_stat stats */ u8 chrono_type:2, /* current chronograph type */ diff --combined include/net/bluetooth/mgmt.h index e104329e227f,65dd6fd1fff3..3303d4bc00cf --- a/include/net/bluetooth/mgmt.h +++ b/include/net/bluetooth/mgmt.h @@@ -70,14 -70,14 +70,14 @@@ struct mgmt_rp_read_version struct mgmt_rp_read_commands { __le16 num_commands; __le16 num_events; - __le16 opcodes[0]; + __le16 opcodes[]; } __packed;
#define MGMT_OP_READ_INDEX_LIST 0x0003 #define MGMT_READ_INDEX_LIST_SIZE 0 struct mgmt_rp_read_index_list { __le16 num_controllers; - __le16 index[0]; + __le16 index[]; } __packed;
/* Reserve one extra byte for names in management messages so that they @@@ -183,7 -183,7 +183,7 @@@ struct mgmt_link_key_info struct mgmt_cp_load_link_keys { __u8 debug_keys; __le16 key_count; - struct mgmt_link_key_info keys[0]; + struct mgmt_link_key_info keys[]; } __packed; #define MGMT_LOAD_LINK_KEYS_SIZE 3
@@@ -206,7 -206,7 +206,7 @@@ struct mgmt_ltk_info #define MGMT_OP_LOAD_LONG_TERM_KEYS 0x0013 struct mgmt_cp_load_long_term_keys { __le16 key_count; - struct mgmt_ltk_info keys[0]; + struct mgmt_ltk_info keys[]; } __packed; #define MGMT_LOAD_LONG_TERM_KEYS_SIZE 2
@@@ -223,7 -223,7 +223,7 @@@ struct mgmt_rp_disconnect #define MGMT_GET_CONNECTIONS_SIZE 0 struct mgmt_rp_get_connections { __le16 conn_count; - struct mgmt_addr_info addr[0]; + struct mgmt_addr_info addr[]; } __packed;
#define MGMT_OP_PIN_CODE_REPLY 0x0016 @@@ -413,7 -413,7 +413,7 @@@ struct mgmt_irk_info #define MGMT_OP_LOAD_IRKS 0x0030 struct mgmt_cp_load_irks { __le16 irk_count; - struct mgmt_irk_info irks[0]; + struct mgmt_irk_info irks[]; } __packed; #define MGMT_LOAD_IRKS_SIZE 2
@@@ -465,7 -465,7 +465,7 @@@ struct mgmt_conn_param #define MGMT_OP_LOAD_CONN_PARAM 0x0035 struct mgmt_cp_load_conn_param { __le16 param_count; - struct mgmt_conn_param params[0]; + struct mgmt_conn_param params[]; } __packed; #define MGMT_LOAD_CONN_PARAM_SIZE 2
@@@ -473,7 -473,7 +473,7 @@@ #define MGMT_READ_UNCONF_INDEX_LIST_SIZE 0 struct mgmt_rp_read_unconf_index_list { __le16 num_controllers; - __le16 index[0]; + __le16 index[]; } __packed;
#define MGMT_OPTION_EXTERNAL_CONFIG 0x00000001 @@@ -504,7 -504,7 +504,7 @@@ struct mgmt_cp_start_service_discovery __u8 type; __s8 rssi; __le16 uuid_count; - __u8 uuids[0][16]; + __u8 uuids[][16]; } __packed; #define MGMT_START_SERVICE_DISCOVERY_SIZE 4
@@@ -516,7 -516,7 +516,7 @@@ struct mgmt_cp_read_local_oob_ext_data struct mgmt_rp_read_local_oob_ext_data { __u8 type; __le16 eir_len; - __u8 eir[0]; + __u8 eir[]; } __packed;
#define MGMT_OP_READ_EXT_INDEX_LIST 0x003C @@@ -527,7 -527,7 +527,7 @@@ struct mgmt_rp_read_ext_index_list __le16 index; __u8 type; __u8 bus; - } entry[0]; + } entry[]; } __packed;
#define MGMT_OP_READ_ADV_FEATURES 0x0003D @@@ -538,7 -538,7 +538,7 @@@ struct mgmt_rp_read_adv_features __u8 max_scan_rsp_len; __u8 max_instances; __u8 num_instances; - __u8 instance[0]; + __u8 instance[]; } __packed;
#define MGMT_OP_ADD_ADVERTISING 0x003E @@@ -549,7 -549,7 +549,7 @@@ struct mgmt_cp_add_advertising __le16 timeout; __u8 adv_data_len; __u8 scan_rsp_len; - __u8 data[0]; + __u8 data[]; } __packed; #define MGMT_ADD_ADVERTISING_SIZE 11 struct mgmt_rp_add_advertising { @@@ -603,7 -603,7 +603,7 @@@ struct mgmt_rp_read_ext_info __le32 supported_settings; __le32 current_settings; __le16 eir_len; - __u8 eir[0]; + __u8 eir[]; } __packed;
#define MGMT_OP_SET_APPEARANCE 0x0043 @@@ -668,17 -668,24 +668,24 @@@ struct mgmt_blocked_key_info
struct mgmt_cp_set_blocked_keys { __le16 key_count; - struct mgmt_blocked_key_info keys[0]; + struct mgmt_blocked_key_info keys[]; } __packed; #define MGMT_OP_SET_BLOCKED_KEYS_SIZE 2
#define MGMT_OP_SET_WIDEBAND_SPEECH 0x0047
+ #define MGMT_OP_READ_SECURITY_INFO 0x0048 + #define MGMT_READ_SECURITY_INFO_SIZE 0 + struct mgmt_rp_read_security_info { + __le16 sec_len; + __u8 sec[0]; + } __packed; + #define MGMT_EV_CMD_COMPLETE 0x0001 struct mgmt_ev_cmd_complete { __le16 opcode; __u8 status; - __u8 data[0]; + __u8 data[]; } __packed;
#define MGMT_EV_CMD_STATUS 0x0002 @@@ -726,7 -733,7 +733,7 @@@ struct mgmt_ev_device_connected struct mgmt_addr_info addr; __le32 flags; __le16 eir_len; - __u8 eir[0]; + __u8 eir[]; } __packed;
#define MGMT_DEV_DISCONN_UNKNOWN 0x00 @@@ -781,7 -788,7 +788,7 @@@ struct mgmt_ev_device_found __s8 rssi; __le32 flags; __le16 eir_len; - __u8 eir[0]; + __u8 eir[]; } __packed;
#define MGMT_EV_DISCOVERING 0x0013 @@@ -876,7 -883,7 +883,7 @@@ struct mgmt_ev_ext_index struct mgmt_ev_local_oob_data_updated { __u8 type; __le16 eir_len; - __u8 eir[0]; + __u8 eir[]; } __packed;
#define MGMT_EV_ADVERTISING_ADDED 0x0023 @@@ -892,7 -899,7 +899,7 @@@ struct mgmt_ev_advertising_removed #define MGMT_EV_EXT_INFO_CHANGED 0x0025 struct mgmt_ev_ext_info_changed { __le16 eir_len; - __u8 eir[0]; + __u8 eir[]; } __packed;
#define MGMT_EV_PHY_CONFIGURATION_CHANGED 0x0026 diff --combined include/net/cfg80211.h index 5eb776f0069d,46ac80423b28..18fef01c48f1 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@@ -2029,7 -2029,7 +2029,7 @@@ struct cfg80211_scan_request bool no_cck;
/* keep last */ - struct ieee80211_channel *channels[0]; + struct ieee80211_channel *channels[]; };
static inline void get_random_mask_addr(u8 *buf, const u8 *addr, const u8 *mask) @@@ -2175,7 -2175,7 +2175,7 @@@ struct cfg80211_sched_scan_request struct list_head list;
/* keep last */ - struct ieee80211_channel *channels[0]; + struct ieee80211_channel *channels[]; };
/** @@@ -2297,7 -2297,7 +2297,7 @@@ struct cfg80211_bss u8 bssid_index; u8 max_bssid_indicator;
- u8 priv[0] __aligned(sizeof(void *)); + u8 priv[] __aligned(sizeof(void *)); };
/** @@@ -4829,7 -4829,7 +4829,7 @@@ struct wiphy
u8 max_data_retry_count;
- char priv[0] __aligned(NETDEV_ALIGN); + char priv[] __aligned(NETDEV_ALIGN); };
static inline struct net *wiphy_net(struct wiphy *wiphy) @@@ -5211,7 -5211,7 +5211,7 @@@ u32 ieee80211_mandatory_rates(struct ie * Radiotap parsing functions -- for controlled injection support * * Implemented in net/wireless/radiotap.c - * Documentation in Documentation/networking/radiotap-headers.txt + * Documentation in Documentation/networking/radiotap-headers.rst */
struct radiotap_align_size { diff --combined include/net/mptcp.h index 3bce2019e4da,5288fba56e55..91c0e9224586 --- a/include/net/mptcp.h +++ b/include/net/mptcp.h @@@ -68,8 -68,13 +68,10 @@@ static inline bool rsk_is_mptcp(const s return tcp_rsk(req)->is_mptcp; }
+ void mptcp_space(const struct sock *ssk, int *space, int *full_space); + -void mptcp_parse_option(const struct sk_buff *skb, const unsigned char *ptr, - int opsize, struct tcp_options_received *opt_rx); bool mptcp_syn_options(struct sock *sk, const struct sk_buff *skb, unsigned int *size, struct mptcp_out_options *opts); -void mptcp_rcv_synsent(struct sock *sk); bool mptcp_synack_options(const struct request_sock *req, unsigned int *size, struct mptcp_out_options *opts); bool mptcp_established_options(struct sock *sk, struct sk_buff *skb, @@@ -194,6 -199,7 +196,7 @@@ static inline bool mptcp_sk_is_subflow( return false; }
+ static inline void mptcp_space(const struct sock *ssk, int *s, int *fs) { } static inline void mptcp_seq_show(struct seq_file *seq) { } #endif /* CONFIG_MPTCP */
diff --combined net/batman-adv/bat_v_ogm.c index 80b87b1f4e3a,0959d32be65c..18028b9f95f0 --- a/net/batman-adv/bat_v_ogm.c +++ b/net/batman-adv/bat_v_ogm.c @@@ -88,7 -88,7 +88,7 @@@ static void batadv_v_ogm_start_queue_ti unsigned int msecs = BATADV_MAX_AGGREGATION_MS * 1000;
/* msecs * [0.9, 1.1] */ - msecs += prandom_u32() % (msecs / 5) - (msecs / 10); + msecs += prandom_u32_max(msecs / 5) - (msecs / 10); queue_delayed_work(batadv_event_workqueue, &hard_iface->bat_v.aggr_wq, msecs_to_jiffies(msecs / 1000)); } @@@ -107,7 -107,7 +107,7 @@@ static void batadv_v_ogm_start_timer(st return;
msecs = atomic_read(&bat_priv->orig_interval) - BATADV_JITTER; - msecs += prandom_u32() % (2 * BATADV_JITTER); + msecs += prandom_u32_max(2 * BATADV_JITTER); queue_delayed_work(batadv_event_workqueue, &bat_priv->bat_v.ogm_wq, msecs_to_jiffies(msecs)); } @@@ -893,7 -893,7 +893,7 @@@ static void batadv_v_ogm_process(const
orig_node = batadv_v_ogm_orig_get(bat_priv, ogm_packet->orig); if (!orig_node) - return; + goto out;
neigh_node = batadv_neigh_node_get_or_create(orig_node, if_incoming, ethhdr->h_source); diff --combined net/ipv4/tcp_input.c index b996dc1069c5,d68128a672ab..9332b7a6bc2a --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@@ -3926,6 -3926,10 +3926,6 @@@ void tcp_parse_options(const struct ne */ break; #endif - case TCPOPT_MPTCP: - mptcp_parse_option(skb, ptr, opsize, opt_rx); - break; - case TCPOPT_FASTOPEN: tcp_parse_fastopen_option( opsize - TCPOLEN_FASTOPEN_BASE, @@@ -4323,6 -4327,33 +4323,33 @@@ static void tcp_sack_maybe_coalesce(str } }
+ static void tcp_sack_compress_send_ack(struct sock *sk) + { + struct tcp_sock *tp = tcp_sk(sk); + + if (!tp->compressed_ack) + return; + + if (hrtimer_try_to_cancel(&tp->compressed_ack_timer) == 1) + __sock_put(sk); + + /* Since we have to send one ack finally, + * substract one from tp->compressed_ack to keep + * LINUX_MIB_TCPACKCOMPRESSED accurate. + */ + NET_ADD_STATS(sock_net(sk), LINUX_MIB_TCPACKCOMPRESSED, + tp->compressed_ack - 1); + + tp->compressed_ack = 0; + tcp_send_ack(sk); + } + + /* Reasonable amount of sack blocks included in TCP SACK option + * The max is 4, but this becomes 3 if TCP timestamps are there. + * Given that SACK packets might be lost, be conservative and use 2. + */ + #define TCP_SACK_BLOCKS_EXPECTED 2 + static void tcp_sack_new_ofo_skb(struct sock *sk, u32 seq, u32 end_seq) { struct tcp_sock *tp = tcp_sk(sk); @@@ -4335,6 -4366,8 +4362,8 @@@
for (this_sack = 0; this_sack < cur_sacks; this_sack++, sp++) { if (tcp_sack_extend(sp, seq, end_seq)) { + if (this_sack >= TCP_SACK_BLOCKS_EXPECTED) + tcp_sack_compress_send_ack(sk); /* Rotate this_sack to the first one. */ for (; this_sack > 0; this_sack--, sp--) swap(*sp, *(sp - 1)); @@@ -4344,6 -4377,9 +4373,9 @@@ } }
+ if (this_sack >= TCP_SACK_BLOCKS_EXPECTED) + tcp_sack_compress_send_ack(sk); + /* Could not find an adjacent existing SACK, build a new one, * put it at the front, and shift everyone else down. We * always know there is at least one SACK present already here. @@@ -4351,8 -4387,6 +4383,6 @@@ * If the sack array is full, forget about the last one. */ if (this_sack >= TCP_NUM_SACKS) { - if (tp->compressed_ack > TCP_FASTRETRANS_THRESH) - tcp_send_ack(sk); this_sack--; tp->rx_opt.num_sacks--; sp--; @@@ -5271,15 -5305,13 +5301,13 @@@ send_now
if (tp->compressed_ack_rcv_nxt != tp->rcv_nxt) { tp->compressed_ack_rcv_nxt = tp->rcv_nxt; - if (tp->compressed_ack > TCP_FASTRETRANS_THRESH) - NET_ADD_STATS(sock_net(sk), LINUX_MIB_TCPACKCOMPRESSED, - tp->compressed_ack - TCP_FASTRETRANS_THRESH); - tp->compressed_ack = 0; + tp->dup_ack_counter = 0; } - - if (++tp->compressed_ack <= TCP_FASTRETRANS_THRESH) + if (tp->dup_ack_counter < TCP_FASTRETRANS_THRESH) { + tp->dup_ack_counter++; goto send_now; - + } + tp->compressed_ack++; if (hrtimer_is_queued(&tp->compressed_ack_timer)) return;
@@@ -5292,8 -5324,9 +5320,9 @@@ delay = min_t(unsigned long, sock_net(sk)->ipv4.sysctl_tcp_comp_sack_delay_ns, rtt * (NSEC_PER_USEC >> 3)/20); sock_hold(sk); - hrtimer_start(&tp->compressed_ack_timer, ns_to_ktime(delay), - HRTIMER_MODE_REL_PINNED_SOFT); + hrtimer_start_range_ns(&tp->compressed_ack_timer, ns_to_ktime(delay), + sock_net(sk)->ipv4.sysctl_tcp_comp_sack_slack_ns, + HRTIMER_MODE_REL_PINNED_SOFT); }
static inline void tcp_ack_snd_check(struct sock *sk) @@@ -5986,6 -6019,9 +6015,6 @@@ static int tcp_rcv_synsent_state_proces tcp_sync_mss(sk, icsk->icsk_pmtu_cookie); tcp_initialize_rcv_mss(sk);
- if (sk_is_mptcp(sk)) - mptcp_rcv_synsent(sk); - /* Remember, tcp_poll() does not lock socket! * Change state from SYN-SENT only after copied_seq * is initialized. */ diff --combined net/mptcp/subflow.c index 67a4e35d4838,87c094702d63..009d5c478062 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@@ -124,11 -124,12 +124,11 @@@ static void subflow_init_req(struct req { struct mptcp_subflow_context *listener = mptcp_subflow_ctx(sk_listener); struct mptcp_subflow_request_sock *subflow_req = mptcp_subflow_rsk(req); - struct tcp_options_received rx_opt; + struct mptcp_options_received mp_opt;
pr_debug("subflow_req=%p, listener=%p", subflow_req, listener);
- memset(&rx_opt.mptcp, 0, sizeof(rx_opt.mptcp)); - mptcp_get_options(skb, &rx_opt); + mptcp_get_options(skb, &mp_opt);
subflow_req->mp_capable = 0; subflow_req->mp_join = 0; @@@ -141,16 -142,16 +141,16 @@@ return; #endif
- if (rx_opt.mptcp.mp_capable) { + if (mp_opt.mp_capable) { SUBFLOW_REQ_INC_STATS(req, MPTCP_MIB_MPCAPABLEPASSIVE);
- if (rx_opt.mptcp.mp_join) + if (mp_opt.mp_join) return; - } else if (rx_opt.mptcp.mp_join) { + } else if (mp_opt.mp_join) { SUBFLOW_REQ_INC_STATS(req, MPTCP_MIB_JOINSYNRX); }
- if (rx_opt.mptcp.mp_capable && listener->request_mptcp) { + if (mp_opt.mp_capable && listener->request_mptcp) { int err;
err = mptcp_token_new_request(req); @@@ -158,13 -159,13 +158,13 @@@ subflow_req->mp_capable = 1;
subflow_req->ssn_offset = TCP_SKB_CB(skb)->seq; - } else if (rx_opt.mptcp.mp_join && listener->request_mptcp) { + } else if (mp_opt.mp_join && listener->request_mptcp) { subflow_req->ssn_offset = TCP_SKB_CB(skb)->seq; subflow_req->mp_join = 1; - subflow_req->backup = rx_opt.mptcp.backup; - subflow_req->remote_id = rx_opt.mptcp.join_id; - subflow_req->token = rx_opt.mptcp.token; - subflow_req->remote_nonce = rx_opt.mptcp.nonce; + subflow_req->backup = mp_opt.backup; + subflow_req->remote_id = mp_opt.join_id; + subflow_req->token = mp_opt.token; + subflow_req->remote_nonce = mp_opt.nonce; pr_debug("token=%u, remote_nonce=%u", subflow_req->token, subflow_req->remote_nonce); if (!subflow_token_join_request(req, skb)) { @@@ -220,47 -221,23 +220,47 @@@ static bool subflow_thmac_valid(struct static void subflow_finish_connect(struct sock *sk, const struct sk_buff *skb) { struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk); + struct mptcp_options_received mp_opt; struct sock *parent = subflow->conn; + struct tcp_sock *tp = tcp_sk(sk);
subflow->icsk_af_ops->sk_rx_dst_set(sk, skb);
- if (inet_sk_state_load(parent) != TCP_ESTABLISHED) { + if (inet_sk_state_load(parent) == TCP_SYN_SENT) { inet_sk_state_store(parent, TCP_ESTABLISHED); parent->sk_state_change(parent); }
- if (subflow->conn_finished || !tcp_sk(sk)->is_mptcp) + /* be sure no special action on any packet other than syn-ack */ + if (subflow->conn_finished) + return; + + subflow->conn_finished = 1; + + mptcp_get_options(skb, &mp_opt); + if (subflow->request_mptcp && mp_opt.mp_capable) { + subflow->mp_capable = 1; + subflow->can_ack = 1; + subflow->remote_key = mp_opt.sndr_key; + pr_debug("subflow=%p, remote_key=%llu", subflow, + subflow->remote_key); + } else if (subflow->request_join && mp_opt.mp_join) { + subflow->mp_join = 1; + subflow->thmac = mp_opt.thmac; + subflow->remote_nonce = mp_opt.nonce; + pr_debug("subflow=%p, thmac=%llu, remote_nonce=%u", subflow, + subflow->thmac, subflow->remote_nonce); + } else if (subflow->request_mptcp) { + tp->is_mptcp = 0; + } + + if (!tp->is_mptcp) return;
if (subflow->mp_capable) { pr_debug("subflow=%p, remote_key=%llu", mptcp_subflow_ctx(sk), subflow->remote_key); mptcp_finish_connect(sk); - subflow->conn_finished = 1;
if (skb) { pr_debug("synack seq=%u", TCP_SKB_CB(skb)->seq); @@@ -287,6 -264,7 +287,6 @@@ if (!mptcp_finish_join(sk)) goto do_reset;
- subflow->conn_finished = 1; MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_JOINSYNACKRX); } else { do_reset: @@@ -344,7 -322,7 +344,7 @@@ drop
/* validate hmac received in third ACK */ static bool subflow_hmac_valid(const struct request_sock *req, - const struct tcp_options_received *rx_opt) + const struct mptcp_options_received *mp_opt) { const struct mptcp_subflow_request_sock *subflow_req; u8 hmac[MPTCPOPT_HMAC_LEN]; @@@ -361,7 -339,7 +361,7 @@@ subflow_req->local_nonce, hmac);
ret = true; - if (crypto_memneq(hmac, rx_opt->mptcp.hmac, sizeof(hmac))) + if (crypto_memneq(hmac, mp_opt->hmac, sizeof(hmac))) ret = false;
sock_put((struct sock *)msk); @@@ -417,7 -395,7 +417,7 @@@ static struct sock *subflow_syn_recv_so { struct mptcp_subflow_context *listener = mptcp_subflow_ctx(sk); struct mptcp_subflow_request_sock *subflow_req; - struct tcp_options_received opt_rx; + struct mptcp_options_received mp_opt; bool fallback_is_fatal = false; struct sock *new_msk = NULL; bool fallback = false; @@@ -425,10 -403,7 +425,10 @@@
pr_debug("listener=%p, req=%p, conn=%p", listener, req, listener->conn);
- opt_rx.mptcp.mp_capable = 0; + /* we need later a valid 'mp_capable' value even when options are not + * parsed + */ + mp_opt.mp_capable = 0; if (tcp_rsk(req)->is_mptcp == 0) goto create_child;
@@@ -443,21 -418,22 +443,21 @@@ goto create_msk; }
- mptcp_get_options(skb, &opt_rx); - if (!opt_rx.mptcp.mp_capable) { + mptcp_get_options(skb, &mp_opt); + if (!mp_opt.mp_capable) { fallback = true; goto create_child; }
create_msk: - new_msk = mptcp_sk_clone(listener->conn, &opt_rx, req); + new_msk = mptcp_sk_clone(listener->conn, &mp_opt, req); if (!new_msk) fallback = true; } else if (subflow_req->mp_join) { fallback_is_fatal = true; - opt_rx.mptcp.mp_join = 0; - mptcp_get_options(skb, &opt_rx); - if (!opt_rx.mptcp.mp_join || - !subflow_hmac_valid(req, &opt_rx)) { + mptcp_get_options(skb, &mp_opt); + if (!mp_opt.mp_join || + !subflow_hmac_valid(req, &mp_opt)) { SUBFLOW_REQ_INC_STATS(req, MPTCP_MIB_JOINACKMAC); return NULL; } @@@ -497,9 -473,9 +497,9 @@@ create_child /* with OoO packets we can reach here without ingress * mpc option */ - ctx->remote_key = opt_rx.mptcp.sndr_key; - ctx->fully_established = opt_rx.mptcp.mp_capable; - ctx->can_ack = opt_rx.mptcp.mp_capable; + ctx->remote_key = mp_opt.sndr_key; + ctx->fully_established = mp_opt.mp_capable; + ctx->can_ack = mp_opt.mp_capable; } else if (ctx->mp_join) { struct mptcp_sock *owner;
@@@ -523,7 -499,7 +523,7 @@@ out /* check for expected invariant - should never trigger, just help * catching eariler subtle bugs */ - WARN_ON_ONCE(*own_req && child && tcp_sk(child)->is_mptcp && + WARN_ON_ONCE(child && *own_req && tcp_sk(child)->is_mptcp && (!mptcp_subflow_ctx(child) || !mptcp_subflow_ctx(child)->conn)); return child; @@@ -845,6 -821,24 +845,24 @@@ bool mptcp_subflow_data_available(struc return subflow->data_avail; }
+ /* If ssk has an mptcp parent socket, use the mptcp rcvbuf occupancy, + * not the ssk one. + * + * In mptcp, rwin is about the mptcp-level connection data. + * + * Data that is still on the ssk rx queue can thus be ignored, + * as far as mptcp peer is concerened that data is still inflight. + * DSS ACK is updated when skb is moved to the mptcp rx queue. + */ + void mptcp_space(const struct sock *ssk, int *space, int *full_space) + { + const struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk); + const struct sock *sk = subflow->conn; + + *space = tcp_space(sk); + *full_space = tcp_full_space(sk); + } + static void subflow_data_ready(struct sock *sk) { struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk); diff --combined net/smc/smc_ib.c index e7e7c3c6e94a,c090678a3e5a..699c9051bb9f --- a/net/smc/smc_ib.c +++ b/net/smc/smc_ib.c @@@ -389,15 -389,15 +389,15 @@@ void smc_ib_put_memory_region(struct ib ib_dereg_mr(mr); }
- static int smc_ib_map_mr_sg(struct smc_buf_desc *buf_slot) + static int smc_ib_map_mr_sg(struct smc_buf_desc *buf_slot, u8 link_idx) { unsigned int offset = 0; int sg_num;
/* map the largest prefix of a dma mapped SG list */ - sg_num = ib_map_mr_sg(buf_slot->mr_rx[SMC_SINGLE_LINK], - buf_slot->sgt[SMC_SINGLE_LINK].sgl, - buf_slot->sgt[SMC_SINGLE_LINK].orig_nents, + sg_num = ib_map_mr_sg(buf_slot->mr_rx[link_idx], + buf_slot->sgt[link_idx].sgl, + buf_slot->sgt[link_idx].orig_nents, &offset, PAGE_SIZE);
return sg_num; @@@ -405,29 -405,29 +405,29 @@@
/* Allocate a memory region and map the dma mapped SG list of buf_slot */ int smc_ib_get_memory_region(struct ib_pd *pd, int access_flags, - struct smc_buf_desc *buf_slot) + struct smc_buf_desc *buf_slot, u8 link_idx) { - if (buf_slot->mr_rx[SMC_SINGLE_LINK]) + if (buf_slot->mr_rx[link_idx]) return 0; /* already done */
- buf_slot->mr_rx[SMC_SINGLE_LINK] = + buf_slot->mr_rx[link_idx] = ib_alloc_mr(pd, IB_MR_TYPE_MEM_REG, 1 << buf_slot->order); - if (IS_ERR(buf_slot->mr_rx[SMC_SINGLE_LINK])) { + if (IS_ERR(buf_slot->mr_rx[link_idx])) { int rc;
- rc = PTR_ERR(buf_slot->mr_rx[SMC_SINGLE_LINK]); - buf_slot->mr_rx[SMC_SINGLE_LINK] = NULL; + rc = PTR_ERR(buf_slot->mr_rx[link_idx]); + buf_slot->mr_rx[link_idx] = NULL; return rc; }
- if (smc_ib_map_mr_sg(buf_slot) != 1) + if (smc_ib_map_mr_sg(buf_slot, link_idx) != 1) return -EINVAL;
return 0; }
/* synchronize buffer usage for cpu access */ - void smc_ib_sync_sg_for_cpu(struct smc_ib_device *smcibdev, + void smc_ib_sync_sg_for_cpu(struct smc_link *lnk, struct smc_buf_desc *buf_slot, enum dma_data_direction data_direction) { @@@ -435,11 -435,11 +435,11 @@@ unsigned int i;
/* for now there is just one DMA address */ - for_each_sg(buf_slot->sgt[SMC_SINGLE_LINK].sgl, sg, - buf_slot->sgt[SMC_SINGLE_LINK].nents, i) { + for_each_sg(buf_slot->sgt[lnk->link_idx].sgl, sg, + buf_slot->sgt[lnk->link_idx].nents, i) { if (!sg_dma_len(sg)) break; - ib_dma_sync_single_for_cpu(smcibdev->ibdev, + ib_dma_sync_single_for_cpu(lnk->smcibdev->ibdev, sg_dma_address(sg), sg_dma_len(sg), data_direction); @@@ -447,7 -447,7 +447,7 @@@ }
/* synchronize buffer usage for device access */ - void smc_ib_sync_sg_for_device(struct smc_ib_device *smcibdev, + void smc_ib_sync_sg_for_device(struct smc_link *lnk, struct smc_buf_desc *buf_slot, enum dma_data_direction data_direction) { @@@ -455,11 -455,11 +455,11 @@@ unsigned int i;
/* for now there is just one DMA address */ - for_each_sg(buf_slot->sgt[SMC_SINGLE_LINK].sgl, sg, - buf_slot->sgt[SMC_SINGLE_LINK].nents, i) { + for_each_sg(buf_slot->sgt[lnk->link_idx].sgl, sg, + buf_slot->sgt[lnk->link_idx].nents, i) { if (!sg_dma_len(sg)) break; - ib_dma_sync_single_for_device(smcibdev->ibdev, + ib_dma_sync_single_for_device(lnk->smcibdev->ibdev, sg_dma_address(sg), sg_dma_len(sg), data_direction); @@@ -467,15 -467,15 +467,15 @@@ }
/* Map a new TX or RX buffer SG-table to DMA */ - int smc_ib_buf_map_sg(struct smc_ib_device *smcibdev, + int smc_ib_buf_map_sg(struct smc_link *lnk, struct smc_buf_desc *buf_slot, enum dma_data_direction data_direction) { int mapped_nents;
- mapped_nents = ib_dma_map_sg(smcibdev->ibdev, - buf_slot->sgt[SMC_SINGLE_LINK].sgl, - buf_slot->sgt[SMC_SINGLE_LINK].orig_nents, + mapped_nents = ib_dma_map_sg(lnk->smcibdev->ibdev, + buf_slot->sgt[lnk->link_idx].sgl, + buf_slot->sgt[lnk->link_idx].orig_nents, data_direction); if (!mapped_nents) return -ENOMEM; @@@ -483,18 -483,18 +483,18 @@@ return mapped_nents; }
- void smc_ib_buf_unmap_sg(struct smc_ib_device *smcibdev, + void smc_ib_buf_unmap_sg(struct smc_link *lnk, struct smc_buf_desc *buf_slot, enum dma_data_direction data_direction) { - if (!buf_slot->sgt[SMC_SINGLE_LINK].sgl->dma_address) + if (!buf_slot->sgt[lnk->link_idx].sgl->dma_address) return; /* already unmapped */
- ib_dma_unmap_sg(smcibdev->ibdev, - buf_slot->sgt[SMC_SINGLE_LINK].sgl, - buf_slot->sgt[SMC_SINGLE_LINK].orig_nents, + ib_dma_unmap_sg(lnk->smcibdev->ibdev, + buf_slot->sgt[lnk->link_idx].sgl, + buf_slot->sgt[lnk->link_idx].orig_nents, data_direction); - buf_slot->sgt[SMC_SINGLE_LINK].sgl->dma_address = 0; + buf_slot->sgt[lnk->link_idx].sgl->dma_address = 0; }
long smc_ib_setup_per_ibdev(struct smc_ib_device *smcibdev) @@@ -579,8 -579,9 +579,9 @@@ static void smc_ib_add_dev(struct ib_de i++) { set_bit(i, &smcibdev->port_event_mask); /* determine pnetids of the port */ - smc_pnetid_by_dev_port(ibdev->dev.parent, i, - smcibdev->pnetid[i]); + if (smc_pnetid_by_dev_port(ibdev->dev.parent, i, + smcibdev->pnetid[i])) + smc_pnetid_by_table_ib(smcibdev, i + 1); } schedule_work(&smcibdev->port_event_work); } @@@ -588,8 -589,9 +589,8 @@@ /* callback function for ib_unregister_client() */ static void smc_ib_remove_dev(struct ib_device *ibdev, void *client_data) { - struct smc_ib_device *smcibdev; + struct smc_ib_device *smcibdev = client_data;
- smcibdev = ib_get_client_data(ibdev, &smc_ib_client); if (!smcibdev || smcibdev->ibdev != ibdev) return; ib_set_client_data(ibdev, &smc_ib_client, NULL); diff --combined scripts/mod/modpost.c index 4d4b979d76be,7f7d4ee7b652..5826c6483b85 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@@ -166,7 -166,7 +166,7 @@@ struct symbol * (only for external modules) **/ unsigned int is_static:1; /* 1 if symbol is not global */ enum export export; /* Type of export */ - char name[0]; + char name[]; };
static struct symbol *symbolhash[SYMBOL_HASH_SIZE]; @@@ -2251,6 -2251,7 +2251,7 @@@ static void add_header(struct buffer *b * Include build-salt.h after module.h in order to * inherit the definitions. */ + buf_printf(b, "#define INCLUDE_VERMAGIC\n"); buf_printf(b, "#include <linux/build-salt.h>\n"); buf_printf(b, "#include <linux/vermagic.h>\n"); buf_printf(b, "#include <linux/compiler.h>\n");
linux-merge@lists.open-mesh.org