Re: [PATCH] net: mdio-octeon: Fix build error and Kconfig warning

2019-07-31 Thread Randy Dunlap
On 7/31/19 11:50 AM, Nathan Chancellor wrote:
> arm allyesconfig warns:
> 
> WARNING: unmet direct dependencies detected for MDIO_OCTEON
>   Depends on [n]: NETDEVICES [=y] && MDIO_DEVICE [=y] && MDIO_BUS [=y]
> && 64BIT && HAS_IOMEM [=y] && OF_MDIO [=y]
>   Selected by [y]:
>   - OCTEON_ETHERNET [=y] && STAGING [=y] && (CAVIUM_OCTEON_SOC &&
> NETDEVICES [=y] || COMPILE_TEST [=y])
> 
> and errors:
> 
> In file included from ../drivers/net/phy/mdio-octeon.c:14:
> ../drivers/net/phy/mdio-octeon.c: In function 'octeon_mdiobus_probe':
> ../drivers/net/phy/mdio-cavium.h:111:36: error: implicit declaration of
> function 'writeq'; did you mean 'writeb'?
> [-Werror=implicit-function-declaration]
>   111 | #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
>   |^~
> ../drivers/net/phy/mdio-octeon.c:56:2: note: in expansion of macro
> 'oct_mdio_writeq'
>56 |  oct_mdio_writeq(smi_en.u64, bus->register_base + SMI_EN);
>   |  ^~~
> cc1: some warnings being treated as errors
> 
> This allows MDIO_OCTEON to be built with COMPILE_TEST as well and
> includes the proper header for readq/writeq. This does not address
> the several -Wint-to-pointer-cast and -Wpointer-to-int-cast warnings
> that appeared as a result of commit 171a9bae68c7 ("staging/octeon:
> Allow test build on !MIPS") in these files.
> 
> Fixes: 171a9bae68c7 ("staging/octeon: Allow test build on !MIPS")
> Reported-by: kbuild test robot 
> Reported-by: Mark Brown 
> Reported-by: Randy Dunlap 
> Signed-off-by: Nathan Chancellor 


With today's linux-next (20190731), I am still seeing a Kconfig warning and
build errors (building for i386):

and applying Greg's "depends on NETDEVICES" patch and this patch:

WARNING: unmet direct dependencies detected for MDIO_OCTEON
  Depends on [n]: NETDEVICES [=y] && MDIO_DEVICE [=m] && MDIO_BUS [=m] && 
(64BIT [=n] || COMPILE_TEST [=y]) && HAS_IOMEM [=y] && OF_MDIO [=n]
  Selected by [m]:
  - OCTEON_ETHERNET [=m] && STAGING [=y] && (CAVIUM_OCTEON_SOC || COMPILE_TEST 
[=y]) && NETDEVICES [=y]

ERROR: "cavium_mdiobus_write" [drivers/net/phy/mdio-octeon.ko] undefined!
ERROR: "cavium_mdiobus_read" [drivers/net/phy/mdio-octeon.ko] undefined!


kernel .config file is attached.

Am I missing another patch?

thanks.

> ---
>  drivers/net/phy/Kconfig   | 2 +-
>  drivers/net/phy/mdio-cavium.h | 2 ++
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
> index 20f14c5fbb7e..ed2edf4b5b0e 100644
> --- a/drivers/net/phy/Kconfig
> +++ b/drivers/net/phy/Kconfig
> @@ -159,7 +159,7 @@ config MDIO_MSCC_MIIM
>  
>  config MDIO_OCTEON
>   tristate "Octeon and some ThunderX SOCs MDIO buses"
> - depends on 64BIT
> + depends on 64BIT || COMPILE_TEST
>   depends on HAS_IOMEM && OF_MDIO
>   select MDIO_CAVIUM
>   help
> diff --git a/drivers/net/phy/mdio-cavium.h b/drivers/net/phy/mdio-cavium.h
> index ed5f9bb5448d..b7f89ad27465 100644
> --- a/drivers/net/phy/mdio-cavium.h
> +++ b/drivers/net/phy/mdio-cavium.h
> @@ -108,6 +108,8 @@ static inline u64 oct_mdio_readq(u64 addr)
>   return cvmx_read_csr(addr);
>  }
>  #else
> +#include 
> +
>  #define oct_mdio_writeq(val, addr)   writeq(val, (void *)addr)
>  #define oct_mdio_readq(addr) readq((void *)addr)
>  #endif
> 


-- 
~Randy


cavium.i386.config
Description: application/config


Re: [PATCH] net: mdio-octeon: Fix build error and Kconfig warning

2019-07-31 Thread Randy Dunlap
On 7/31/19 2:55 PM, Randy Dunlap wrote:
> On 7/31/19 11:50 AM, Nathan Chancellor wrote:
>> arm allyesconfig warns:
>>
>> WARNING: unmet direct dependencies detected for MDIO_OCTEON
>>   Depends on [n]: NETDEVICES [=y] && MDIO_DEVICE [=y] && MDIO_BUS [=y]
>> && 64BIT && HAS_IOMEM [=y] && OF_MDIO [=y]
>>   Selected by [y]:
>>   - OCTEON_ETHERNET [=y] && STAGING [=y] && (CAVIUM_OCTEON_SOC &&
>> NETDEVICES [=y] || COMPILE_TEST [=y])
>>
>> and errors:
>>
>> In file included from ../drivers/net/phy/mdio-octeon.c:14:
>> ../drivers/net/phy/mdio-octeon.c: In function 'octeon_mdiobus_probe':
>> ../drivers/net/phy/mdio-cavium.h:111:36: error: implicit declaration of
>> function 'writeq'; did you mean 'writeb'?
>> [-Werror=implicit-function-declaration]
>>   111 | #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
>>   |^~
>> ../drivers/net/phy/mdio-octeon.c:56:2: note: in expansion of macro
>> 'oct_mdio_writeq'
>>56 |  oct_mdio_writeq(smi_en.u64, bus->register_base + SMI_EN);
>>   |  ^~~
>> cc1: some warnings being treated as errors
>>
>> This allows MDIO_OCTEON to be built with COMPILE_TEST as well and
>> includes the proper header for readq/writeq. This does not address
>> the several -Wint-to-pointer-cast and -Wpointer-to-int-cast warnings
>> that appeared as a result of commit 171a9bae68c7 ("staging/octeon:
>> Allow test build on !MIPS") in these files.
>>
>> Fixes: 171a9bae68c7 ("staging/octeon: Allow test build on !MIPS")
>> Reported-by: kbuild test robot 
>> Reported-by: Mark Brown 
>> Reported-by: Randy Dunlap 
>> Signed-off-by: Nathan Chancellor 
> 
> 
> With today's linux-next (20190731), I am still seeing a Kconfig warning and
> build errors (building for i386):
> 
> and applying Greg's "depends on NETDEVICES" patch and this patch:
> 
> WARNING: unmet direct dependencies detected for MDIO_OCTEON
>   Depends on [n]: NETDEVICES [=y] && MDIO_DEVICE [=m] && MDIO_BUS [=m] && 
> (64BIT [=n] || COMPILE_TEST [=y]) && HAS_IOMEM [=y] && OF_MDIO [=n]
>   Selected by [m]:
>   - OCTEON_ETHERNET [=m] && STAGING [=y] && (CAVIUM_OCTEON_SOC || 
> COMPILE_TEST [=y]) && NETDEVICES [=y]
> 
> ERROR: "cavium_mdiobus_write" [drivers/net/phy/mdio-octeon.ko] undefined!
> ERROR: "cavium_mdiobus_read" [drivers/net/phy/mdio-octeon.ko] undefined!
> 
> 
> kernel .config file is attached.
> 
> Am I missing another patch?
> 
> thanks.

If I add this to drivers/staging/octeon/Kconfig:
select MDIO_OCTEON
+   select MDIO_CAVIUM
help

then the build succeeds.

This isn't being done by make *config because MDIO_OCTEON depends on OF_MDIO,
which is not set in my .config file, so the "select MDIO_CAVIUM" in MDIO_OCTEON
is not done.

However, there are lots of type/cast warnings in both mdio-octeon and 
mdio-cavium:

../drivers/net/phy/mdio-octeon.c: In function ‘octeon_mdiobus_probe’:
../drivers/net/phy/mdio-octeon.c:48:3: warning: cast from pointer to integer of 
different size [-Wpointer-to-int-cast]
   (u64)devm_ioremap(&pdev->dev, mdio_phys, regsize);
   ^
In file included from ../drivers/net/phy/mdio-octeon.c:14:0:
../drivers/net/phy/mdio-cavium.h:113:48: warning: cast to pointer from integer 
of different size [-Wint-to-pointer-cast]
 #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
^
../drivers/net/phy/mdio-octeon.c:56:2: note: in expansion of macro 
‘oct_mdio_writeq’
  oct_mdio_writeq(smi_en.u64, bus->register_base + SMI_EN);
  ^~~
../drivers/net/phy/mdio-cavium.h:113:48: warning: cast to pointer from integer 
of different size [-Wint-to-pointer-cast]
 #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
^
../drivers/net/phy/mdio-octeon.c:77:2: note: in expansion of macro 
‘oct_mdio_writeq’
  oct_mdio_writeq(smi_en.u64, bus->register_base + SMI_EN);
  ^~~
../drivers/net/phy/mdio-octeon.c: In function ‘octeon_mdiobus_remove’:
../drivers/net/phy/mdio-cavium.h:113:48: warning: cast to pointer from integer 
of different size [-Wint-to-pointer-cast]
 #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
^
../drivers/net/phy/mdio-octeon.c:91:2: note: in expansion of macro 
‘oct_mdio_writeq’
  oct_mdio_writeq(smi_en.u64, bus->register_base + SMI_EN);
  ^~~

and

  CC [M]  drivers/net/phy/mdio-cavium.o
In file inc

Re: [PATCH v2] net: mdio-octeon: Fix Kconfig warnings and build errors

2019-08-03 Thread Randy Dunlap
On 8/2/19 11:01 PM, Nathan Chancellor wrote:
> After commit 171a9bae68c7 ("staging/octeon: Allow test build on
> !MIPS"), the following combination of configs cause a few Kconfig
> warnings and build errors (distilled from arm allyesconfig and Randy's
> randconfig builds):
> 
> CONFIG_NETDEVICES=y
> CONFIG_STAGING=y
> CONFIG_COMPILE_TEST=y
> 
> and CONFIG_OCTEON_ETHERNET as either a module or built-in.
> 
> WARNING: unmet direct dependencies detected for MDIO_OCTEON
>   Depends on [n]: NETDEVICES [=y] && MDIO_DEVICE [=y] && MDIO_BUS [=y]
> && 64BIT [=n] && HAS_IOMEM [=y] && OF_MDIO [=n]
>   Selected by [y]:
>   - OCTEON_ETHERNET [=y] && STAGING [=y] && (CAVIUM_OCTEON_SOC ||
> COMPILE_TEST [=y]) && NETDEVICES [=y]
> 
> In file included from ../drivers/net/phy/mdio-octeon.c:14:
> ../drivers/net/phy/mdio-cavium.h:111:36: error: implicit declaration of
> function ‘writeq’; did you mean ‘writel’?
> [-Werror=implicit-function-declaration]
>   111 | #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
>   |^~
> 
> CONFIG_64BIT is not strictly necessary if the proper readq/writeq
> definitions are included from io-64-nonatomic-lo-hi.h.
> 
> CONFIG_OF_MDIO is not needed when CONFIG_COMPILE_TEST is enabled because
> of commit f9dc9ac51610 ("of/mdio: Add dummy functions in of_mdio.h.").
> 
> Fixes: 171a9bae68c7 ("staging/octeon: Allow test build on !MIPS")
> Reported-by: kbuild test robot 
> Reported-by: Mark Brown 
> Reported-by: Randy Dunlap 
> Signed-off-by: Nathan Chancellor 

Works for me. Fixes the reported build errors.  Thanks.

Acked-by: Randy Dunlap  # build-tested

> ---
> 
> v1 -> v2:
> 
> * Address Randy's reported failure here: 
> https://lore.kernel.org/netdev/b3444283-7a77-ece8-7ac6-41756aa7d...@infradead.org/
>   by not requiring CONFIG_OF_MDIO when CONFIG_COMPILE_TEST is set.
> 
> * Improve commit message
> 
>  drivers/net/phy/Kconfig   | 4 ++--
>  drivers/net/phy/mdio-cavium.h | 2 ++
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
> index 20f14c5fbb7e..0e3d9e3d3533 100644
> --- a/drivers/net/phy/Kconfig
> +++ b/drivers/net/phy/Kconfig
> @@ -159,8 +159,8 @@ config MDIO_MSCC_MIIM
>  
>  config MDIO_OCTEON
>   tristate "Octeon and some ThunderX SOCs MDIO buses"
> - depends on 64BIT
> - depends on HAS_IOMEM && OF_MDIO
> + depends on (64BIT && OF_MDIO) || COMPILE_TEST
> + depends on HAS_IOMEM
>   select MDIO_CAVIUM
>   help
> This module provides a driver for the Octeon and ThunderX MDIO
> diff --git a/drivers/net/phy/mdio-cavium.h b/drivers/net/phy/mdio-cavium.h
> index ed5f9bb5448d..b7f89ad27465 100644
> --- a/drivers/net/phy/mdio-cavium.h
> +++ b/drivers/net/phy/mdio-cavium.h
> @@ -108,6 +108,8 @@ static inline u64 oct_mdio_readq(u64 addr)
>   return cvmx_read_csr(addr);
>  }
>  #else
> +#include 
> +
>  #define oct_mdio_writeq(val, addr)   writeq(val, (void *)addr)
>  #define oct_mdio_readq(addr) readq((void *)addr)
>  #endif
> 


-- 
~Randy


Re: [PATCH net-next] net: ipa: add config dependency on QCOM_SMEM

2021-01-12 Thread Randy Dunlap
On 1/12/21 11:21 AM, Alex Elder wrote:
> The IPA driver depends on some SMEM functionality (qcom_smem_init(),
> qcom_smem_alloc(), and qcom_smem_virt_to_phys()), but this is not
> reflected in the configuration dependencies.  Add a dependency on
> QCOM_SMEM to avoid attempts to build the IPA driver without SMEM.
> This avoids a link error for certain configurations.
> 
> Reported-by: Randy Dunlap 
> Fixes: 38a4066f593c5 ("net: ipa: support COMPILE_TEST")
> Signed-off-by: Alex Elder 

Acked-by: Randy Dunlap  # build-tested

Thanks.

> ---
>  drivers/net/ipa/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ipa/Kconfig b/drivers/net/ipa/Kconfig
> index 10a0e041ee775..b68f1289b89ef 100644
> --- a/drivers/net/ipa/Kconfig
> +++ b/drivers/net/ipa/Kconfig
> @@ -1,6 +1,6 @@
>  config QCOM_IPA
>   tristate "Qualcomm IPA support"
> - depends on 64BIT && NET
> + depends on 64BIT && NET && QCOM_SMEM
>   depends on ARCH_QCOM || COMPILE_TEST
>   depends on QCOM_RPROC_COMMON || (QCOM_RPROC_COMMON=n && COMPILE_TEST)
>   select QCOM_MDT_LOADER if ARCH_QCOM
> 


-- 
~Randy



Re: [PATCH] kernel: trace: uprobe: Fix word to the correct spelling

2021-01-12 Thread Randy Dunlap
On 1/11/21 8:50 PM, Bhaskar Chowdhury wrote:
> s/controling/controlling/p
> 
> Signed-off-by: Bhaskar Chowdhury 

Acked-by: Randy Dunlap 

Thanks.

> ---
>  kernel/trace/trace_uprobe.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
> index 3cf7128e1ad3..55c6afd8cb27 100644
> --- a/kernel/trace/trace_uprobe.c
> +++ b/kernel/trace/trace_uprobe.c
> @@ -1635,7 +1635,7 @@ void destroy_local_trace_uprobe(struct trace_event_call 
> *event_call)
>  }
>  #endif /* CONFIG_PERF_EVENTS */
> 
> -/* Make a trace interface for controling probe points */
> +/* Make a trace interface for controlling probe points */
>  static __init int init_uprobe_trace(void)
>  {
>   int ret;
> --
> 2.26.2
> 


-- 
~Randy
You can't do anything without having to do something else first.
-- Belefant's Law


Re: [net-next PATCH v3 01/15] Documentation: ACPI: DSD: Document MDIO PHY

2021-01-18 Thread Randy Dunlap
Hi,

On 1/12/21 5:40 AM, Calvin Johnson wrote:
> Introduce ACPI mechanism to get PHYs registered on a MDIO bus and
> provide them to be connected to MAC.
> 
> Describe properties "phy-handle" and "phy-mode".
> 
> Signed-off-by: Calvin Johnson 
> ---
> 
> Changes in v3: None
> Changes in v2:
> - Updated with more description in document
> 
>  Documentation/firmware-guide/acpi/dsd/phy.rst | 129 ++
>  1 file changed, 129 insertions(+)
>  create mode 100644 Documentation/firmware-guide/acpi/dsd/phy.rst
> 
> diff --git a/Documentation/firmware-guide/acpi/dsd/phy.rst 
> b/Documentation/firmware-guide/acpi/dsd/phy.rst
> new file mode 100644
> index ..a2e4fdcdbf53
> --- /dev/null
> +++ b/Documentation/firmware-guide/acpi/dsd/phy.rst
> @@ -0,0 +1,129 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
> +=
> +MDIO bus and PHYs in ACPI
> +=
> +
> +The PHYs on an MDIO bus [1] are probed and registered using
> +fwnode_mdiobus_register_phy().
> +Later, for connecting these PHYs to MAC, the PHYs registered on the
> +mdiobus have to be referenced.
> +
> +UUID given below should be used as mentioned in the "Device Properties

   The UUID given below

> +UUID For _DSD" [2] document.
> +   - UUID: daffd814-6eba-4d8c-8a91-bc9bbf4aa301
> +
> +This document introduces two _DSD properties that are to be used
> +for PHYs on the MDIO bus.[3]
> +
> +phy-handle
> +--
> +For each MAC node, a device property "phy-handle" is used to reference
> +the PHY that is registered on an MDIO bus. This is mandatory for
> +network interfaces that have PHYs connected to MAC via MDIO bus.
> +
> +During the MDIO bus driver initialization, PHYs on this bus are probed
> +using the _ADR object as shown below and are registered on the mdio bus.

s/mdio/MDIO/  (please be consistent, as 3 lines above)
> +
> +::
> +  Scope(\_SB.MDI0)
> +  {
> +Device(PHY1) {
> +  Name (_ADR, 0x1)
> +} // end of PHY1
> +
> +Device(PHY2) {
> +  Name (_ADR, 0x2)
> +} // end of PHY2
> +  }
> +
> +Later, during the MAC driver initialization, the registered PHY devices
> +have to be retrieved from the mdio bus. For this, MAC driver needs

ditto.

> +reference to the previously registered PHYs which are provided
> +using reference to the device as {\_SB.MDI0.PHY1}.
> +
> +phy-mode
> +
> +The "phy-mode" _DSD property is used to describe the connection to
> +the PHY. The valid values for "phy-mode" are defined in [4].
> +
> +
> +An ASL example of this is shown below.
> +
> +DSDT entry for MDIO node
> +
> +The MDIO bus has an SoC component(mdio controller) and a platform

   component (MDIO controller)

> +component(PHYs on the mdiobus).

   component (PHYs

> +
> +a) Silicon Component
> +This node describes the MDIO controller,MDI0

controller, MDI0

> +

and then one more '-', please.

> +::
> + Scope(_SB)
> + {
> +   Device(MDI0) {
> + Name(_HID, "NXP0006")
> + Name(_CCA, 1)
> + Name(_UID, 0)
> + Name(_CRS, ResourceTemplate() {
> +   Memory32Fixed(ReadWrite, MDI0_BASE, MDI_LEN)
> +   Interrupt(ResourceConsumer, Level, ActiveHigh, Shared)
> +{
> +  MDI0_IT
> +}
> + }) // end of _CRS for MDI0
> +   } // end of MDI0
> + }
> +
> +b) Platform Component
> +This node defines the PHYs that are connected to the MDIO bus, MDI0
> +---

[deletia]


thanks.
-- 
~Randy
You can't do anything without having to do something else first.
-- Belefant's Law


Re: [RFC v3 08/11] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-01-19 Thread Randy Dunlap
Hi,

Documentation comments only:

On 1/18/21 9:07 PM, Xie Yongji wrote:
> 
> Signed-off-by: Xie Yongji 
> ---
>  Documentation/driver-api/vduse.rst |   85 ++
> 
> diff --git a/Documentation/driver-api/vduse.rst 
> b/Documentation/driver-api/vduse.rst
> new file mode 100644
> index ..9418a7f6646b
> --- /dev/null
> +++ b/Documentation/driver-api/vduse.rst
> @@ -0,0 +1,85 @@
> +==
> +VDUSE - "vDPA Device in Userspace"
> +==
> +
> +vDPA (virtio data path acceleration) device is a device that uses a
> +datapath which complies with the virtio specifications with vendor
> +specific control path. vDPA devices can be both physically located on
> +the hardware or emulated by software. VDUSE is a framework that makes it
> +possible to implement software-emulated vDPA devices in userspace.
> +
> +How VDUSE works
> +
> +Each userspace vDPA device is created by the VDUSE_CREATE_DEV ioctl on
> +the VDUSE character device (/dev/vduse). Then a file descriptor pointing
> +to the new resources will be returned, which can be used to implement the
> +userspace vDPA device's control path and data path.
> +
> +To implement control path, the read/write operations to the file descriptor
> +will be used to receive/reply the control messages from/to VDUSE driver.
> +Those control messages are mostly based on the vdpa_config_ops which defines
> +a unified interface to control different types of vDPA device.
> +
> +The following types of messages are provided by the VDUSE framework now:
> +
> +- VDUSE_SET_VQ_ADDR: Set the addresses of the different aspects of virtqueue.
> +
> +- VDUSE_SET_VQ_NUM: Set the size of virtqueue
> +
> +- VDUSE_SET_VQ_READY: Set ready status of virtqueue
> +
> +- VDUSE_GET_VQ_READY: Get ready status of virtqueue
> +
> +- VDUSE_SET_VQ_STATE: Set the state (last_avail_idx) for virtqueue
> +
> +- VDUSE_GET_VQ_STATE: Get the state (last_avail_idx) for virtqueue
> +
> +- VDUSE_SET_FEATURES: Set virtio features supported by the driver
> +
> +- VDUSE_GET_FEATURES: Get virtio features supported by the device
> +
> +- VDUSE_SET_STATUS: Set the device status
> +
> +- VDUSE_GET_STATUS: Get the device status
> +
> +- VDUSE_SET_CONFIG: Write to device specific configuration space
> +
> +- VDUSE_GET_CONFIG: Read from device specific configuration space
> +
> +- VDUSE_UPDATE_IOTLB: Notify userspace to update the memory mapping in 
> device IOTLB
> +
> +Please see include/linux/vdpa.h for details.
> +
> +In the data path, vDPA device's iova regions will be mapped into userspace 
> with
> +the help of VDUSE_IOTLB_GET_FD ioctl on the userspace vDPA device fd:
> +
> +- VDUSE_IOTLB_GET_FD: get the file descriptor to iova region. Userspace can
> +  access this iova region by passing the fd to mmap(2).
> +
> +Besides, the eventfd mechanism is used to trigger interrupt callbacks and
> +receive virtqueue kicks in userspace. The following ioctls on the userspace
> +vDPA device fd are provided to support that:
> +
> +- VDUSE_VQ_SETUP_KICKFD: set the kickfd for virtqueue, this eventfd is used
> +  by VDUSE driver to notify userspace to consume the vring.
> +
> +- VDUSE_VQ_SETUP_IRQFD: set the irqfd for virtqueue, this eventfd is used
> +  by userspace to notify VDUSE driver to trigger interrupt callbacks.
> +
> +MMU-based IOMMU Driver
> +--
> +In virtio-vdpa case, VDUSE framework implements a MMU-based on-chip IOMMU

   an MMU-based

> +driver to support mapping the kernel dma buffer into the userspace iova

DMA

> +region dynamically.
> +
> +The basic idea behind this driver is treating MMU (VA->PA) as IOMMU 
> (IOVA->PA).
> +The driver will set up MMU mapping instead of IOMMU mapping for the DMA 
> transfer
> +so that the userspace process is able to use its virtual address to access
> +the dma buffer in kernel.

   DMA

> +
> +And to avoid security issue, a bounce-buffering mechanism is introduced to
> +prevent userspace accessing the original buffer directly which may contain 
> other
> +kernel data. During the mapping, unmapping, the driver will copy the data 
> from
> +the original buffer to the bounce buffer and back, depending on the 
> direction of
> +the transfer. And the bounce-buffer addresses will be mapped into the user 
> address
> +space instead of the original one.


thanks.
-- 
~Randy



Re: [net:master 1/3] ERROR: modpost: "__uio_register_device" undefined!

2020-12-01 Thread Randy Dunlap
On 12/1/20 8:01 PM, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master
> head:   2867e1eac61016f59b3d730e3f7aa488e186e917
> commit: 14483cbf040fcb38113497161088a1ce8ce5d713 [1/3] net: broadcom CNIC: 
> requires MMU
> config: microblaze-randconfig-r011-20201201 (attached as .config)
> compiler: microblaze-linux-gcc (GCC) 9.3.0
> reproduce (this is a W=1 build):
> wget 
> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
> ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # 
> https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/commit/?id=14483cbf040fcb38113497161088a1ce8ce5d713
> git remote add net 
> https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git
> git fetch --no-tags net master
> git checkout 14483cbf040fcb38113497161088a1ce8ce5d713
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 
> ARCH=microblaze 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot 
> 
> All errors (new ones prefixed by >>, old ones prefixed by <<):
> 
>>> ERROR: modpost: "__uio_register_device" 
>>> [drivers/net/ethernet/broadcom/cnic.ko] undefined!
>>> ERROR: modpost: "uio_unregister_device" 
>>> [drivers/net/ethernet/broadcom/cnic.ko] undefined!
>>> ERROR: modpost: "uio_event_notify" [drivers/net/ethernet/broadcom/cnic.ko] 
>>> undefined!
> 
> ---

Jakub,

This happens due to CONFIG_SCSI_BNX2_ISCSI=m, which selects CNIC
when it shouldn't.

Martin Petersen has already merged the SCSI patch for this (for 5.11,
sadly):

https://lore.kernel.org/lkml/20201129070916.3919-1-rdun...@infradead.org/


Maybe I should have sent them to one or both of you as a 2-patch series (?).

What should we do next?


Sorry about this. Thanks.

-- 
~Randy



Re: [PATCH v2 2/2] x86: make Hyper-V support optional

2020-12-02 Thread Randy Dunlap
On 12/2/20 1:19 PM, Enrico Weigelt, metux IT consult wrote:
> Make it possible to opt-out from Hyper-V support, for minimized kernels
> that never will by run under Hyper-V. (eg. high-density virtualization
> or embedded systems)
> 
> Average distro kernel will leave it on, therefore default to y.
> 
> Signed-off-by: Enrico Weigelt 
> ---
>  arch/x86/Kconfig | 11 +++
>  arch/x86/kernel/cpu/Makefile |  4 ++--
>  arch/x86/kernel/cpu/hypervisor.c |  2 ++
>  drivers/hv/Kconfig   |  2 +-
>  4 files changed, 16 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index eff12460cb3c..57d20591d6ee 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -812,6 +812,17 @@ config VMWARE_GUEST
> density virtualization or embedded systems running (para)virtualized
> workloads.
>  
> +config HYPERV_GUEST
> + bool "Hyper-V Guest support"
> + default y
> + help
> +   This option enables several optimizations for running under the
> +   Hyper-V hypervisor.
> +
> +   Disabling it saves a few kb, for stripped down kernels eg. in high

   kB,   e.g.

> +   density virtualization or embedded systems running (para)virtualized
> +   workloads.
> +
>  config KVM_GUEST
>   bool "KVM Guest support (including kvmclock)"
>   depends on PARAVIRT


-- 
~Randy



Re: [PATCH v2 1/2] x86: make VMware support optional

2020-12-02 Thread Randy Dunlap
On 12/2/20 1:19 PM, Enrico Weigelt, metux IT consult wrote:
> Make it possible to opt-out from VMware support, for minimized kernels
> that never will be run under Vmware (eg. high-density virtualization
> or embedded systems).
> 
> Average distro kernel will leave it on, therefore default to y.
> 
> Signed-off-by: Enrico Weigelt 
> ---
>  arch/x86/Kconfig | 11 +++
>  arch/x86/kernel/cpu/Makefile |  4 +++-
>  arch/x86/kernel/cpu/hypervisor.c |  2 ++
>  drivers/input/mouse/Kconfig  |  2 +-
>  drivers/misc/Kconfig |  2 +-
>  drivers/ptp/Kconfig  |  2 +-
>  6 files changed, 19 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index f6946b81f74a..eff12460cb3c 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -801,6 +801,17 @@ config X86_HV_CALLBACK_VECTOR
>  
>  source "arch/x86/xen/Kconfig"
>  
> +config VMWARE_GUEST
> + bool "VMware Guest support"
> + default y
> + help
> +   This option enables several optimizations for running under the
> +   VMware hypervisor.
> +
> +   Disabling it saves a few kb, for stripped down kernels eg. in high

   kB or KiB or even KB, but not kb
 e.g.

> +   density virtualization or embedded systems running (para)virtualized
> +   workloads.
> +
>  config KVM_GUEST
>   bool "KVM Guest support (including kvmclock)"
>   depends on PARAVIRT


-- 
~Randy



Re: [PATCH net-next v3] devlink: Add devlink port documentation

2020-12-02 Thread Randy Dunlap
Hi--

On 12/2/20 5:53 AM, Parav Pandit wrote:
> Added documentation for devlink port and port function related commands.
> 
> Signed-off-by: Parav Pandit 
> Reviewed-by: Jiri Pirko 
> Reviewed-by: Jacob Keller 
> ---
> Changelog:
> v2->v3:
>  - rephased many lines

 rephrased

>  - first paragraph now describe devlink port
>  - instead of saying PCI device/function, using PCI function every
>where
>  - changed 'physical link layer' to 'link layer'
>  - made devlink port type description more clear
>  - made devlink port flavour description more clear
>  - moved devlink port type table after port flavour
>  - added description for the example diagram
>  - describe CPU port that its linked to DSA
>  - made devlink port description for eswitch port more clear
> v1->v2:
>  - Removed duplicate table entries for DEVLINK_PORT_FLAVOUR_VIRTUAL.
>  - replaced 'consist of' to 'consisting'
>  - changed 'can be' to 'can be of'
> ---
>  .../networking/devlink/devlink-port.rst   | 111 ++
>  Documentation/networking/devlink/index.rst|   1 +
>  2 files changed, 112 insertions(+)
>  create mode 100644 Documentation/networking/devlink/devlink-port.rst
> 
> diff --git a/Documentation/networking/devlink/devlink-port.rst 
> b/Documentation/networking/devlink/devlink-port.rst
> new file mode 100644
> index ..8407bbe9ce88
> --- /dev/null
> +++ b/Documentation/networking/devlink/devlink-port.rst
> @@ -0,0 +1,111 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
> +
> +Devlink Port
> +
> +
> +``devlink-port`` is a port that exist on the device. A devlink port can

   exists

> +be of one among many flavours. A devlink port flavour along with port
> +attributes describe what a port represents.
> +
> +A device driver who intents to publish a devlink port, sets the

   that intends ^no comma

> +devlink port attributes and registers the devlink port.
> +
> +Devlink port flavours are described below.
> +
> +.. list-table:: List of devlink port flavours
> +   :widths: 33 90
> +
> +   * - Flavour
> + - Description
> +   * - ``DEVLINK_PORT_FLAVOUR_PHYSICAL``
> + - Any kind of physical networking port. This can be a eswitch physical

an

> +   port or any other physical port on the device.
> +   * - ``DEVLINK_PORT_FLAVOUR_DSA``
> + - This indicates a DSA interconnect port.
> +   * - ``DEVLINK_PORT_FLAVOUR_CPU``
> + - This indicates a CPU port applicable only to DSA.
> +   * - ``DEVLINK_PORT_FLAVOUR_PCI_PF``
> + - This indicates an eswitch port representing a networking port of
> +   PCI physical function (PF).
> +   * - ``DEVLINK_PORT_FLAVOUR_PCI_VF``
> + - This indicates an eswitch port representing a networking port of
> +   PCI virtual function (VF).
> +   * - ``DEVLINK_PORT_FLAVOUR_VIRTUAL``
> + - This indicates a virtual port for the virtual PCI device such as PCI 
> VF.
> +
> +A devlink port types are described below.

  The devlink port types

> +
> +.. list-table:: List of devlink port types
> +   :widths: 23 90
> +
> +   * - Type
> + - Description
> +   * - ``DEVLINK_PORT_TYPE_ETH``
> + - Driver should set this port type when a link layer of the port is 
> Ethernet.
> +   * - ``DEVLINK_PORT_TYPE_IB``
> + - Driver should set this port type when a link layer of the port is 
> InfiniBand.
> +   * - ``DEVLINK_PORT_TYPE_AUTO``
> + - This type is indicated by the user when user prefers to set the port 
> type
> +   to be automatically detected by the device driver.
> +
> +A controller consist of one or more PCI functions. Such PCI function can 
> have one

consists

> +or more networking ports. A networking port of such PCI function is 
> represented
> +by the eswitch devlink port. A devlink instance holds ports of two types of
> +controllers.
> +
> +(1) controller discovered on same system where eswitch resides:
> +This is the case where PCI PF/VF of a controller and devlink eswitch
> +instance both are located on a single system.
> +
> +(2) controller located on external host system.
> +This is the case where a controller is located in one system and its
> +devlink eswitch ports are located in a different system. Such controller
> +is called external controller.
> +
> +An example view of two controller systems::
> +
> +In this example a controller which contains the eswitch is local controller
> +with controller number = 0. The second is a external controller having
> +controller number = 1. Eswitch devlink instance has representor devlink
> +ports for the PCI functions of both the controllers.

I find that sentence confusing but I don't know how to fix it.

> +
> + -
> + |   |
> + |   - -  

Re: [PATCH net-next v4] devlink: Add devlink port documentation

2020-12-03 Thread Randy Dunlap
Hi--

On 12/3/20 10:02 AM, Parav Pandit wrote:
> Added documentation for devlink port and port function related commands.
> 
> Signed-off-by: Parav Pandit 
> Reviewed-by: Jiri Pirko 
> Reviewed-by: Jacob Keller 
> ---
> Changelog:
> v3->v4:
>  - changed 'exist' to 'exists'
>  - added 'an' eswitch
>  - changed 'can have one' to 'consists of'
>  - changed 'who intents' to 'that intends'
>  - removed unnecessary comma
>  - rewrote description for the example diagram
>  - changed 'controller consist of' to 'controller consists of'
> v2->v3:
>  - rephrased many lines
>  - first paragraph now describe devlink port
>  - instead of saying PCI device/function, using PCI function every
>where
>  - changed 'physical link layer' to 'link layer'
>  - made devlink port type description more clear
>  - made devlink port flavour description more clear
>  - moved devlink port type table after port flavour
>  - added description for the example diagram
>  - describe CPU port that its linked to DSA
>  - made devlink port description for eswitch port more clear
> v1->v2:
>  - Removed duplicate table entries for DEVLINK_PORT_FLAVOUR_VIRTUAL.
>  - replaced 'consist of' to 'consisting'
>  - changed 'can be' to 'can be of'
> ---
>  .../networking/devlink/devlink-port.rst   | 111 ++
>  Documentation/networking/devlink/index.rst|   1 +
>  2 files changed, 112 insertions(+)
>  create mode 100644 Documentation/networking/devlink/devlink-port.rst
> 
> diff --git a/Documentation/networking/devlink/devlink-port.rst 
> b/Documentation/networking/devlink/devlink-port.rst
> new file mode 100644
> index ..ac18cb8041dc
> --- /dev/null
> +++ b/Documentation/networking/devlink/devlink-port.rst
> @@ -0,0 +1,111 @@

I find that this doc is now readable.  :)

Other people can comment on the technical details.

thanks.

-- 
~Randy
Acked-by: Randy Dunlap 


Re: [PATCH] net/mlx5e: fix non-IPV6 build

2020-12-03 Thread Randy Dunlap
On 12/3/20 3:12 PM, Arnd Bergmann wrote:
> From: Arnd Bergmann 
> 
> When IPv6 is disabled, the flow steering code causes a build failure:
> 
> drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:55:14: error: no 
> member named 'skc_v6_daddr' in 'struct sock_common'; did you mean 'skc_daddr'?
>&sk->sk_v6_daddr, 16);
> ^
> include/net/sock.h:380:34: note: expanded from macro 'sk_v6_daddr'
>  #define sk_v6_daddr __sk_common.skc_v6_daddr
> 
> Hide the newly added function in an #ifdef that matches its callers
> and the struct member definition.
> 
> Fixes: 5229a96e59ec ("net/mlx5e: Accel, Expose flow steering API for rules 
> add/del")
> Signed-off-by: Arnd Bergmann 
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c 
> b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c
> index 97f1594cee11..e51f60b55daa 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c
> @@ -44,6 +44,7 @@ static void accel_fs_tcp_set_ipv4_flow(struct 
> mlx5_flow_spec *spec, struct sock
>outer_headers.dst_ipv4_dst_ipv6.ipv4_layout.ipv4);
>  }
>  
> +#if IS_ENABLED(CONFIG_IPV6)
>  static void accel_fs_tcp_set_ipv6_flow(struct mlx5_flow_spec *spec, struct 
> sock *sk)
>  {
>   MLX5_SET_TO_ONES(fte_match_param, spec->match_criteria, 
> outer_headers.ip_protocol);
> @@ -63,6 +64,7 @@ static void accel_fs_tcp_set_ipv6_flow(struct 
> mlx5_flow_spec *spec, struct sock
>   outer_headers.dst_ipv4_dst_ipv6.ipv6_layout.ipv6),
>  0xff, 16);
>  }
> +#endif
>  
>  void mlx5e_accel_fs_del_sk(struct mlx5_flow_handle *rule)
>  {
> 

Fix for this was just merged by Linus [NETWORKING PR].

thanks.
-- 
~Randy



Re: [PATCH net-next v5] devlink: Add devlink port documentation

2020-12-07 Thread Randy Dunlap
Hi--

On 12/7/20 2:13 PM, Parav Pandit wrote:
> Added documentation for devlink port and port function related commands.
> 
> Signed-off-by: Parav Pandit 
> Reviewed-by: Jiri Pirko 
> Reviewed-by: Jacob Keller 
> ---
> Changelog:
> v4->v5:
>  - described logically ingress and egress point of devlink port
>  - removed networking from devlink port description
>  - rephrased port type description
>  - introdue PCI controller section and description

 introduce

>  - rephrased controller, device, function description
>  - removed confusing eswitch to system wording
>  - rephrased port function description
>  - added example of mac address in port function attribute description

> ---
>  .../networking/devlink/devlink-port.rst   | 116 ++
>  Documentation/networking/devlink/index.rst|   1 +
>  2 files changed, 117 insertions(+)
>  create mode 100644 Documentation/networking/devlink/devlink-port.rst
> 
> diff --git a/Documentation/networking/devlink/devlink-port.rst 
> b/Documentation/networking/devlink/devlink-port.rst
> new file mode 100644
> index ..dce87d2c07ac
> --- /dev/null
> +++ b/Documentation/networking/devlink/devlink-port.rst
> @@ -0,0 +1,116 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
> +
> +Devlink Port
> +
> +
> +``devlink-port`` is a port that exists on the device. It has a logically
> +separate ingress/egress point of the device. A devlink port can be of one

  port can be any one
   of many flavours.

> +among many flavours. A devlink port flavour along with port attributes
> +describe what a port represents.
> +
> +A device driver that intends to publish a devlink port sets the
> +devlink port attributes and registers the devlink port.
> +
> +Devlink port flavours are described below.
> +
> +.. list-table:: List of devlink port flavours
> +   :widths: 33 90
> +
> +   * - Flavour
> + - Description
> +   * - ``DEVLINK_PORT_FLAVOUR_PHYSICAL``
> + - Any kind of physical networking port. This can be an eswitch physical
> +   port or any other physical port on the device.
> +   * - ``DEVLINK_PORT_FLAVOUR_DSA``
> + - This indicates a DSA interconnect port.
> +   * - ``DEVLINK_PORT_FLAVOUR_CPU``
> + - This indicates a CPU port applicable only to DSA.
> +   * - ``DEVLINK_PORT_FLAVOUR_PCI_PF``
> + - This indicates an eswitch port representing a networking port of
> +   PCI physical function (PF).
> +   * - ``DEVLINK_PORT_FLAVOUR_PCI_VF``
> + - This indicates an eswitch port representing a networking port of
> +   PCI virtual function (VF).
> +   * - ``DEVLINK_PORT_FLAVOUR_VIRTUAL``
> + - This indicates a virtual port for the virtual PCI device such as PCI 
> VF.
> +
> +Devlink port can have a different type based on the link layer described 
> below.
> +
> +.. list-table:: List of devlink port types
> +   :widths: 23 90
> +
> +   * - Type
> + - Description
> +   * - ``DEVLINK_PORT_TYPE_ETH``
> + - Driver should set this port type when a link layer of the port is
> +   Ethernet.
> +   * - ``DEVLINK_PORT_TYPE_IB``
> + - Driver should set this port type when a link layer of the port is
> +   InfiniBand.
> +   * - ``DEVLINK_PORT_TYPE_AUTO``
> + - This type is indicated by the user when driver should detect the port
> +   type automatically.
> +
> +PCI controllers
> +---
> +In most cases PCI device has only one controller. A controller consists of

either   PCI devices have
or   a PCI device has

> +potentially multiple physical and virtual functions. Such PCI function 
> consists
> +of one or more ports. This port of the function is represented by the devlink
> +eswitch port.
> +
> +A PCI Device connected to multiple CPUs or multiple PCI root complex or

complexes

> +SmartNIC, however, may have multiple controllers. For a device with multiple
> +controllers, each controller is distinguished by a unique controller number.
> +An eswitch on the PCI device may suppport ports of multiple controllers. 

support

> +
> +An example view of two controller systems::

I think that this is

  An example view of a two-controller system::

instead of 2 controller systems.  ?

> +
> +In this example, external controller (identified by controller number = 1)
> +doesn't have eswitch. Local controller (identified by controller number = 0)
> +has the eswitch. Devlink instance on local controller has eswitch devlink
> +ports representing ports for both the controllers.
> +
> + -
> + |   |
> + |   - - --- --- |
> +---  |   | vf(s) | | sf(s) | |vf(s)| |sf(s)| |
> +| server  |  | ---   

Re: linux-next: Tree for Dec 9 (ethernet/mellanox/mlx5)

2020-12-09 Thread Randy Dunlap
On 12/9/20 2:44 AM, Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20201208:
> 

on i386:

I see this warning:/note: repeated 106 times on i386 build:

 from ../drivers/net/ethernet/mellanox/mlx5/core/alloc.c:34:
../include/vdso/bits.h:7:26: warning: left shift count >= width of type 
[-Wshift-count-overflow]
 #define BIT(nr)   (UL(1) << (nr))
  ^
../include/linux/mlx5/mlx5_ifc.h:10716:46: note: in expansion of macro ‘BIT’
  MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_SAMPLER = BIT(0x20),
  ^~~



-- 
~Randy
Reported-by: Randy Dunlap 


[PATCH net-next] net: stream: fix TCP references when INET is not enabled

2020-11-18 Thread Randy Dunlap
Fix build of net/core/stream.o when CONFIG_INET is not enabled.
Fixes these build errors (sample):

ld: net/core/stream.o: in function `sk_stream_write_space':
(.text+0x27e): undefined reference to `tcp_stream_memory_free'
ld: (.text+0x29c): undefined reference to `tcp_stream_memory_free'
ld: (.text+0x2ab): undefined reference to `tcp_stream_memory_free'
ld: net/core/stream.o: in function `sk_stream_wait_memory':
(.text+0x5a1): undefined reference to `tcp_stream_memory_free'
ld: (.text+0x5bf): undefined reference to `tcp_stream_memory_free'

Fixes: 1c5f2ced136a ("tcp: avoid indirect call to tcp_stream_memory_free()")
Signed-off-by: Randy Dunlap 
Reported-by: Randy Dunlap 
Cc: Eric Dumazet 
Cc: Jakub Kicinski 
---
 include/net/sock.h |5 +
 1 file changed, 5 insertions(+)

--- linux-next-20201118.orig/include/net/sock.h
+++ linux-next-20201118/include/net/sock.h
@@ -1271,10 +1271,15 @@ static inline bool __sk_stream_memory_fr
if (READ_ONCE(sk->sk_wmem_queued) >= READ_ONCE(sk->sk_sndbuf))
return false;
 
+#ifdef CONFIG_INET
return sk->sk_prot->stream_memory_free ?
INDIRECT_CALL_1(sk->sk_prot->stream_memory_free,
tcp_stream_memory_free,
sk, wake) : true;
+#else
+   return sk->sk_prot->stream_memory_free ?
+   sk->sk_prot->stream_memory_free(sk, wake) : true;
+#endif
 }
 
 static inline bool sk_stream_memory_free(const struct sock *sk)


Re: [PATCH net-next v3 2/5] net: add sysfs attribute to control napi threaded mode

2020-11-18 Thread Randy Dunlap
On 11/18/20 11:10 AM, Wei Wang wrote:
> From: Paolo Abeni  
> 
> this patch adds a new sysfs attribute to the network
> device class. Said attribute is a bitmask that allows controlling
> the threaded mode for all the napi instances of the given
> network device.
> 
> The threaded mode can be switched only if related network device
> is down.
> 
> Signed-off-by: Paolo Abeni 
> Signed-off-by: Hannes Frederic Sowa 
> Signed-off-by: Wei Wang 
> Reviewed-by: Eric Dumazet 

Hi,

Could someone describe the bitmask (is it a bit per instance of the
network device?).
And how to use the sysfs interface, please?

> ---
>  net/core/net-sysfs.c | 103 +++
>  1 file changed, 103 insertions(+)
> 
> diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
> index 94fff0700bdd..df8dd25e5e4b 100644
> --- a/net/core/net-sysfs.c
> +++ b/net/core/net-sysfs.c


thanks.
-- 
~Randy



Re: [PATCH net] ipv6: Remove dependency of ipv6_frag_thdr_truncated on ipv6 module

2020-11-18 Thread Randy Dunlap
On 11/18/20 3:44 PM, Georg Kohmann wrote:
> IPV6=m
> NF_DEFRAG_IPV6=y
> 
> ld: net/ipv6/netfilter/nf_conntrack_reasm.o: in function
> `nf_ct_frag6_gather':
> net/ipv6/netfilter/nf_conntrack_reasm.c:462: undefined reference to
> `ipv6_frag_thdr_truncated'
> 
> Netfilter is depending on ipv6 symbol ipv6_frag_thdr_truncated. This
> dependency is forcing IPV6=y.
> 
> Remove this depencency by moving ipv6_frag_thdr_truncated out of ipv6. This

  dependency

> is the same solution as used with a similar issues: Referring to
> commit 70b095c843266 ("ipv6: remove dependency of nf_defrag_ipv6 on ipv6
> module")
> 
> Reported-by: Randy Dunlap 
> Reported-by: kernel test robot 
> Signed-off-by: Georg Kohmann 
> ---
>  include/net/ipv6.h  |  2 --
>  include/net/ipv6_frag.h | 30 ++
>  net/ipv6/netfilter/nf_conntrack_reasm.c |  2 +-
>  net/ipv6/reassembly.c   | 31 +--
>  4 files changed, 32 insertions(+), 33 deletions(-)

OK, works for me.  Thanks.
 
Acked-by: Randy Dunlap  # build-tested

-- 
~Randy



Re: [PATCH net v2] ipv6: Remove dependency of ipv6_frag_thdr_truncated on ipv6 module

2020-11-19 Thread Randy Dunlap
On 11/19/20 1:58 AM, Georg Kohmann wrote:
> IPV6=m
> NF_DEFRAG_IPV6=y
> 
> ld: net/ipv6/netfilter/nf_conntrack_reasm.o: in function
> `nf_ct_frag6_gather':
> net/ipv6/netfilter/nf_conntrack_reasm.c:462: undefined reference to
> `ipv6_frag_thdr_truncated'
> 
> Netfilter is depending on ipv6 symbol ipv6_frag_thdr_truncated. This
> dependency is forcing IPV6=y.
> 
> Remove this dependency by moving ipv6_frag_thdr_truncated out of ipv6. This
> is the same solution as used with a similar issues: Referring to
> commit 70b095c843266 ("ipv6: remove dependency of nf_defrag_ipv6 on ipv6
> module")
> 
> Fixes: 9d9e937b1c8b ("ipv6/netfilter: Discard first fragment not including 
> all headers")
> Reported-by: Randy Dunlap 
> Reported-by: kernel test robot 
> Signed-off-by: Georg Kohmann 
> ---
> 
> Notes:
> v2: Add Fixes tag and fix spelling in comment.

Acked-by: Randy Dunlap  # build-tested

Thanks.

> 
>  include/net/ipv6.h  |  2 --
>  include/net/ipv6_frag.h | 30 ++
>  net/ipv6/netfilter/nf_conntrack_reasm.c |  2 +-
>  net/ipv6/reassembly.c   | 31 +--
>  4 files changed, 32 insertions(+), 33 deletions(-)
> 

-- 
~Randy



[PATCH] net: mlx5e: fix fs_tcp.c build when IPV6 is not enabled

2020-11-22 Thread Randy Dunlap
Fix build when CONFIG_IPV6 is not enabled by making a function
be built conditionally.

Fixes these build errors and warnings:

../drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c: In function 
'accel_fs_tcp_set_ipv6_flow':
../include/net/sock.h:380:34: error: 'struct sock_common' has no member named 
'skc_v6_daddr'; did you mean 'skc_daddr'?
  380 | #define sk_v6_daddr  __sk_common.skc_v6_daddr
  |  ^~~~
../drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:55:14: note: in 
expansion of macro 'sk_v6_daddr'
   55 | &sk->sk_v6_daddr, 16);
  |  ^~~
At top level:
../drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:47:13: warning: 
'accel_fs_tcp_set_ipv6_flow' defined but not used [-Wunused-function]
   47 | static void accel_fs_tcp_set_ipv6_flow(struct mlx5_flow_spec *spec, 
struct sock *sk)

Fixes: 5229a96e59ec ("net/mlx5e: Accel, Expose flow steering API for rules 
add/del")
Signed-off-by: Randy Dunlap 
Reported-by: kernel test robot 
Cc: Saeed Mahameed 
Cc: Boris Pismenny 
Cc: Tariq Toukan 
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
 drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c |2 ++
 1 file changed, 2 insertions(+)

--- 
linux-next-20201120.orig/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c
+++ 
linux-next-20201120/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c
@@ -44,6 +44,7 @@ static void accel_fs_tcp_set_ipv4_flow(s
 outer_headers.dst_ipv4_dst_ipv6.ipv4_layout.ipv4);
 }
 
+#if IS_ENABLED(CONFIG_IPV6)
 static void accel_fs_tcp_set_ipv6_flow(struct mlx5_flow_spec *spec, struct 
sock *sk)
 {
MLX5_SET_TO_ONES(fte_match_param, spec->match_criteria, 
outer_headers.ip_protocol);
@@ -63,6 +64,7 @@ static void accel_fs_tcp_set_ipv6_flow(s
outer_headers.dst_ipv4_dst_ipv6.ipv6_layout.ipv6),
   0xff, 16);
 }
+#endif
 
 void mlx5e_accel_fs_del_sk(struct mlx5_flow_handle *rule)
 {


[PATCH 00/10 net-next] net/tipc: fix all kernel-doc and add TIPC networking chapter

2020-11-24 Thread Randy Dunlap
Fix lots of net/tipc/ kernel-doc warnings. Add many struct field and
function parameter descriptions.

Then add a TIPC chapter to the networking documentation book.


Note: some of the struct members and function parameters are marked
with "FIXME". They could use some additional descriptions if
someone could help add to them. Thanks.


Question: is net/tipc/discover.c, in tipc_disc_delete() kernel-doc,
what is the word "duest"?  Should it be changed?


Cc: Jon Maloy 
Cc: Ying Xue 
Cc: netdev@vger.kernel.org
Cc: tipc-discuss...@lists.sourceforge.net
Cc: "David S. Miller" 
Cc: Jakub Kicinski 

[PATCH 01/10 net-next] net/tipc: fix tipc header files for kernel-doc
[PATCH 02/10 net-next] net/tipc: fix various kernel-doc warnings
[PATCH 03/10 net-next] net/tipc: fix bearer.c for kernel-doc
[PATCH 04/10 net-next] net/tipc: fix link.c kernel-doc
[PATCH 05/10 net-next] net/tipc: fix name_distr.c kernel-doc
[PATCH 06/10 net-next] net/tipc: fix name_table.c kernel-doc
[PATCH 07/10 net-next] net/tipc: fix node.c kernel-doc
[PATCH 08/10 net-next] net/tipc: fix socket.c kernel-doc
[PATCH 09/10 net-next] net/tipc: fix all function Return: notation
[PATCH 10/10 net-next] net/tipc: add TIPC chapter to networking Documentation


 Documentation/networking/index.rst |1 
 Documentation/networking/tipc.rst  |  101 +++
 net/tipc/bearer.c  |   22 +
 net/tipc/bearer.h  |   10 +-
 net/tipc/crypto.c  |   55 --
 net/tipc/crypto.h  |6 -
 net/tipc/discover.c|3 
 net/tipc/link.c|   46 ++--
 net/tipc/msg.c |   29 ---
 net/tipc/name_distr.c  |   29 +++
 net/tipc/name_distr.h  |2 
 net/tipc/name_table.c  |   46 +---
 net/tipc/name_table.h  |9 +-
 net/tipc/node.c|   37 -
 net/tipc/socket.c  |   92 +++-
 net/tipc/subscr.c  |8 +-
 net/tipc/subscr.h  |   11 +-
 net/tipc/trace.c   |2 
 net/tipc/udp_media.c   |8 +-
 19 files changed, 404 insertions(+), 113 deletions(-)


[PATCH 01/10 net-next] net/tipc: fix tipc header files for kernel-doc

2020-11-24 Thread Randy Dunlap
Fix tipc header files for adding to the networking docbook.

Remove some uses of "/**" that were not kernel-doc notation.

Fix some source formatting to eliminate Sphinx warnings.

Add missing struct member and function argument kernel-doc descriptions.

Documentation/networking/tipc:18: ../net/tipc/name_table.h:65: WARNING: 
Unexpected indentation.
Documentation/networking/tipc:18: ../net/tipc/name_table.h:66: WARNING: Block 
quote ends without a blank line; unexpected unindent.

../net/tipc/bearer.h:128: warning: Function parameter or member 'min_win' not 
described in 'tipc_media'
../net/tipc/bearer.h:128: warning: Function parameter or member 'max_win' not 
described in 'tipc_media'

../net/tipc/bearer.h:171: warning: Function parameter or member 'min_win' not 
described in 'tipc_bearer'
../net/tipc/bearer.h:171: warning: Function parameter or member 'max_win' not 
described in 'tipc_bearer'
../net/tipc/bearer.h:171: warning: Function parameter or member 'disc' not 
described in 'tipc_bearer'
../net/tipc/bearer.h:171: warning: Function parameter or member 'up' not 
described in 'tipc_bearer'
../net/tipc/bearer.h:171: warning: Function parameter or member 'refcnt' not 
described in 'tipc_bearer'

../net/tipc/name_distr.h:68: warning: Function parameter or member 'port' not 
described in 'distr_item'

../net/tipc/name_table.h:111: warning: Function parameter or member 'services' 
not described in 'name_table'
../net/tipc/name_table.h:111: warning: Function parameter or member 
'cluster_scope_lock' not described in 'name_table'
../net/tipc/name_table.h:111: warning: Function parameter or member 'rc_dests' 
not described in 'name_table'
../net/tipc/name_table.h:111: warning: Function parameter or member 'snd_nxt' 
not described in 'name_table'

../net/tipc/subscr.h:67: warning: Function parameter or member 'kref' not 
described in 'tipc_subscription'
../net/tipc/subscr.h:67: warning: Function parameter or member 'net' not 
described in 'tipc_subscription'
../net/tipc/subscr.h:67: warning: Function parameter or member 'service_list' 
not described in 'tipc_subscription'
../net/tipc/subscr.h:67: warning: Function parameter or member 'conid' not 
described in 'tipc_subscription'
../net/tipc/subscr.h:67: warning: Function parameter or member 'inactive' not 
described in 'tipc_subscription'
../net/tipc/subscr.h:67: warning: Function parameter or member 'lock' not 
described in 'tipc_subscription'

Signed-off-by: Randy Dunlap 
Cc: Jon Maloy 
Cc: Ying Xue 
Cc: netdev@vger.kernel.org
Cc: tipc-discuss...@lists.sourceforge.net
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
 net/tipc/bearer.h |   10 +++---
 net/tipc/crypto.h |6 +++---
 net/tipc/name_distr.h |2 +-
 net/tipc/name_table.h |9 ++---
 net/tipc/subscr.h |   11 +++
 5 files changed, 24 insertions(+), 14 deletions(-)

--- linux-next-20201102.orig/net/tipc/bearer.h
+++ linux-next-20201102/net/tipc/bearer.h
@@ -93,7 +93,8 @@ struct tipc_bearer;
  * @raw2addr: convert from raw addr format to media addr format
  * @priority: default link (and bearer) priority
  * @tolerance: default time (in ms) before declaring link failure
- * @window: default window (in packets) before declaring link congestion
+ * @min_win: minimum window (in packets) before declaring link congestion
+ * @max_win: maximum window (in packets) before declaring link congestion
  * @mtu: max packet size bearer can support for media type not dependent on
  * underlying device MTU
  * @type_id: TIPC media identifier
@@ -138,12 +139,15 @@ struct tipc_media {
  * @pt: packet type for bearer
  * @rcu: rcu struct for tipc_bearer
  * @priority: default link priority for bearer
- * @window: default window size for bearer
+ * @min_win: minimum window (in packets) before declaring link congestion
+ * @max_win: maximum window (in packets) before declaring link congestion
  * @tolerance: default link tolerance for bearer
  * @domain: network domain to which links can be established
  * @identity: array index of this bearer within TIPC bearer array
- * @link_req: ptr to (optional) structure making periodic link setup requests
+ * @disc: ptr to link setup request
  * @net_plane: network plane ('A' through 'H') currently associated with bearer
+ * @up: bearer up flag (bit 0)
+ * @refcnt: tipc_bearer reference counter
  *
  * Note: media-specific code is responsible for initialization of the fields
  * indicated below when a bearer is enabled; TIPC's generic bearer code takes
--- linux-next-20201102.orig/net/tipc/crypto.h
+++ linux-next-20201102/net/tipc/crypto.h
@@ -1,5 

[PATCH 10/10 net-next] net/tipc: add TIPC chapter to networking Documentation

2020-11-24 Thread Randy Dunlap
Add a TIPC chapter to the networking docbook.

Signed-off-by: Randy Dunlap 
Cc: Jon Maloy 
Cc: Ying Xue 
Cc: netdev@vger.kernel.org
Cc: tipc-discuss...@lists.sourceforge.net
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
 Documentation/networking/index.rst |1 
 Documentation/networking/tipc.rst  |  101 +++
 2 files changed, 102 insertions(+)

--- linux-next-20201124.orig/Documentation/networking/index.rst
+++ linux-next-20201124/Documentation/networking/index.rst
@@ -101,6 +101,7 @@ Contents:
tcp-thin
team
timestamping
+   tipc
tproxy
tuntap
udplite
--- /dev/null
+++ linux-next-20201124/Documentation/networking/tipc.rst
@@ -0,0 +1,101 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+=
+Linux Kernel TIPC
+=
+
+TIPC (Transparent Inter Process Communication) is a protocol that is
+specially designed for intra-cluster communication.
+
+For more information about TIPC, see http://tipc.sourceforge.net.
+
+TIPC Base Types
+---
+
+.. kernel-doc:: net/tipc/subscr.h
+   :internal:
+
+.. kernel-doc:: net/tipc/bearer.h
+   :internal:
+
+.. kernel-doc:: net/tipc/name_table.h
+   :internal:
+
+.. kernel-doc:: net/tipc/name_distr.h
+   :internal:
+
+.. kernel-doc:: net/tipc/bcast.c
+   :internal:
+
+TIPC Bearer Interfaces
+--
+
+.. kernel-doc:: net/tipc/bearer.c
+   :internal:
+
+.. kernel-doc:: net/tipc/udp_media.c
+   :internal:
+
+TIPC Crypto Interfaces
+--
+
+.. kernel-doc:: net/tipc/crypto.c
+   :internal:
+
+TIPC Discoverer Interfaces
+--
+
+.. kernel-doc:: net/tipc/discover.c
+   :internal:
+
+TIPC Link Interfaces
+
+
+.. kernel-doc:: net/tipc/link.c
+   :internal:
+
+TIPC msg Interfaces
+---
+
+.. kernel-doc:: net/tipc/msg.c
+   :internal:
+
+TIPC Name Interfaces
+
+
+.. kernel-doc:: net/tipc/name_table.c
+   :internal:
+
+.. kernel-doc:: net/tipc/name_distr.c
+   :internal:
+
+TIPC Node Management Interfaces
+---
+
+.. kernel-doc:: net/tipc/node.c
+   :internal:
+
+TIPC Socket Interfaces
+--
+
+.. kernel-doc:: net/tipc/socket.c
+   :internal:
+
+TIPC Network Topology Interfaces
+
+
+.. kernel-doc:: net/tipc/subscr.c
+   :internal:
+
+TIPC Server Interfaces
+--
+
+.. kernel-doc:: net/tipc/topsrv.c
+   :internal:
+
+TIPC Trace Interfaces
+-
+
+.. kernel-doc:: net/tipc/trace.c
+   :internal:
+


[PATCH 03/10 net-next] net/tipc: fix bearer.c for kernel-doc

2020-11-24 Thread Randy Dunlap
Fix kernel-doc warnings in bearer.c:

../net/tipc/bearer.c:77: warning: Function parameter or member 'name' not 
described in 'tipc_media_find'
../net/tipc/bearer.c:91: warning: Function parameter or member 'type' not 
described in 'media_find_id'
../net/tipc/bearer.c:105: warning: Function parameter or member 'buf' not 
described in 'tipc_media_addr_printf'
../net/tipc/bearer.c:105: warning: Function parameter or member 'len' not 
described in 'tipc_media_addr_printf'
../net/tipc/bearer.c:105: warning: Function parameter or member 'a' not 
described in 'tipc_media_addr_printf'
../net/tipc/bearer.c:174: warning: Function parameter or member 'net' not 
described in 'tipc_bearer_find'
../net/tipc/bearer.c:174: warning: Function parameter or member 'name' not 
described in 'tipc_bearer_find'
../net/tipc/bearer.c:238: warning: Function parameter or member 'net' not 
described in 'tipc_enable_bearer'
../net/tipc/bearer.c:238: warning: Function parameter or member 'name' not 
described in 'tipc_enable_bearer'
../net/tipc/bearer.c:238: warning: Function parameter or member 'disc_domain' 
not described in 'tipc_enable_bearer'
../net/tipc/bearer.c:238: warning: Function parameter or member 'prio' not 
described in 'tipc_enable_bearer'
../net/tipc/bearer.c:238: warning: Function parameter or member 'attr' not 
described in 'tipc_enable_bearer'
../net/tipc/bearer.c:350: warning: Function parameter or member 'net' not 
described in 'tipc_reset_bearer'
../net/tipc/bearer.c:350: warning: Function parameter or member 'b' not 
described in 'tipc_reset_bearer'
../net/tipc/bearer.c:374: warning: Function parameter or member 'net' not 
described in 'bearer_disable'
../net/tipc/bearer.c:374: warning: Function parameter or member 'b' not 
described in 'bearer_disable'
../net/tipc/bearer.c:462: warning: Function parameter or member 'net' not 
described in 'tipc_l2_send_msg'
../net/tipc/bearer.c:479: warning: Function parameter or member 'net' not 
described in 'tipc_l2_send_msg'

Signed-off-by: Randy Dunlap 
Cc: Jon Maloy 
Cc: Ying Xue 
Cc: netdev@vger.kernel.org
Cc: tipc-discuss...@lists.sourceforge.net
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
 net/tipc/bearer.c |   20 +++-
 1 file changed, 19 insertions(+), 1 deletion(-)

--- linux-next-20201124.orig/net/tipc/bearer.c
+++ linux-next-20201124/net/tipc/bearer.c
@@ -72,6 +72,7 @@ static int tipc_l2_rcv_msg(struct sk_buf
 
 /**
  * tipc_media_find - locates specified media object by name
+ * @name: name to locate
  */
 struct tipc_media *tipc_media_find(const char *name)
 {
@@ -86,6 +87,7 @@ struct tipc_media *tipc_media_find(const
 
 /**
  * media_find_id - locates specified media object by type identifier
+ * @type: type identifier to locate
  */
 static struct tipc_media *media_find_id(u8 type)
 {
@@ -100,6 +102,9 @@ static struct tipc_media *media_find_id(
 
 /**
  * tipc_media_addr_printf - record media address in print buffer
+ * @buf: output buffer
+ * @len: output buffer size remaining
+ * @a: input media address
  */
 int tipc_media_addr_printf(char *buf, int len, struct tipc_media_addr *a)
 {
@@ -166,6 +171,8 @@ static int bearer_name_validate(const ch
 
 /**
  * tipc_bearer_find - locates bearer object with matching bearer name
+ * @net: the applicable net namespace
+ * @name: bearer name to locate
  */
 struct tipc_bearer *tipc_bearer_find(struct net *net, const char *name)
 {
@@ -228,6 +235,11 @@ void tipc_bearer_remove_dest(struct net
 
 /**
  * tipc_enable_bearer - enable bearer with the given name
+ * @net: the applicable net namespace
+ * @name: bearer name to enable
+ * @disc_domain: bearer domain
+ * @prio: bearer priority
+ * @attr: nlattr array
  */
 static int tipc_enable_bearer(struct net *net, const char *name,
  u32 disc_domain, u32 prio,
@@ -342,6 +354,8 @@ rejected:
 
 /**
  * tipc_reset_bearer - Reset all links established over this bearer
+ * @net: the applicable net namespace
+ * @b: the target bearer
  */
 static int tipc_reset_bearer(struct net *net, struct tipc_bearer *b)
 {
@@ -363,7 +377,9 @@ void tipc_bearer_put(struct tipc_bearer
 }
 
 /**
- * bearer_disable
+ * bearer_disable - disable this bearer
+ * @net: the applicable net namespace
+ * @b: the bearer to disable
  *
  * Note: This routine assumes caller holds RTNL lock.
  */
@@ -434,6 +450,7 @@ int tipc_enable_l2_media(struct net *net
 }
 
 /* tipc_disable_l2_media - detach TIPC bearer from an L2 interface
+ * @b: the target bearer
  *
  * Mark L2 bearer as inactive so that incoming buffers are thrown away
  */
@@ -450,6 +467,7 @@ void tipc_disable_l2_media(struct tipc_b
 
 /**
  * tipc_l2_send_msg - send a TIPC packet out over an L2 interface
+ * @net: the associated network namespace
  * @skb: the packet to be sent
  * @b: the bearer through which the packet is to be sent
  * @dest: peer destination address


[PATCH 04/10 net-next] net/tipc: fix link.c kernel-doc

2020-11-24 Thread Randy Dunlap
Fix link.c kernel-doc warnings in preparation for adding to the
networking docbook.

../net/tipc/link.c:200: warning: Function parameter or member 'session' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'snd_nxt_state' 
not described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'rcv_nxt_state' 
not described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'in_session' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'active' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'if_name' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'rst_cnt' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'drop_point' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 
'failover_reasm_skb' not described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 
'failover_deferdq' not described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'transmq' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'backlog' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'snd_nxt' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'rcv_unacked' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'deferdq' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'window' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'min_win' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'ssthresh' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'max_win' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'cong_acks' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'checkpoint' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'reasm_tnlmsg' 
not described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'last_gap' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'last_ga' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'bc_rcvlink' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'bc_sndlink' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'nack_state' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'bc_peer_is_up' 
not described in 'tipc_link'
../net/tipc/link.c:473: warning: Function parameter or member 'self' not 
described in 'tipc_link_create'
../net/tipc/link.c:473: warning: Function parameter or member 'peer_id' not 
described in 'tipc_link_create'
../net/tipc/link.c:473: warning: Excess function parameter 'ownnode' 
description in 'tipc_link_create'
../net/tipc/link.c:544: warning: Function parameter or member 'ownnode' not 
described in 'tipc_link_bc_create'
../net/tipc/link.c:544: warning: Function parameter or member 'peer' not 
described in 'tipc_link_bc_create'
../net/tipc/link.c:544: warning: Function parameter or member 'peer_id' not 
described in 'tipc_link_bc_create'
../net/tipc/link.c:544: warning: Function parameter or member 'peer_caps' not 
described in 'tipc_link_bc_create'
../net/tipc/link.c:544: warning: Function parameter or member 'bc_sndlink' not 
described in 'tipc_link_bc_create'

Signed-off-by: Randy Dunlap 
Cc: Jon Maloy 
Cc: Ying Xue 
Cc: netdev@vger.kernel.org
Cc: tipc-discuss...@lists.sourceforge.net
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
 net/tipc/link.c |   38 --
 1 file changed, 36 insertions(+), 2 deletions(-)

--- linux-next-20201102.orig/net/tipc/link.c
+++ linux-next-20201102/net/tipc/link.c

[PATCH 05/10 net-next] net/tipc: fix name_distr.c kernel-doc

2020-11-24 Thread Randy Dunlap
Fix name_distr.c kernel-doc warnings in preparation for adding to the
networking docbook.

../net/tipc/name_distr.c:55: warning: Function parameter or member 'i' not 
described in 'publ_to_item'
../net/tipc/name_distr.c:55: warning: Function parameter or member 'p' not 
described in 'publ_to_item'
../net/tipc/name_distr.c:70: warning: Function parameter or member 'net' not 
described in 'named_prepare_buf'
../net/tipc/name_distr.c:70: warning: Function parameter or member 'type' not 
described in 'named_prepare_buf'
../net/tipc/name_distr.c:70: warning: Function parameter or member 'size' not 
described in 'named_prepare_buf'
../net/tipc/name_distr.c:70: warning: Function parameter or member 'dest' not 
described in 'named_prepare_buf'
../net/tipc/name_distr.c:88: warning: Function parameter or member 'net' not 
described in 'tipc_named_publish'
../net/tipc/name_distr.c:88: warning: Function parameter or member 'publ' not 
described in 'tipc_named_publish'
../net/tipc/name_distr.c:116: warning: Function parameter or member 'net' not 
described in 'tipc_named_withdraw'
../net/tipc/name_distr.c:116: warning: Function parameter or member 'publ' not 
described in 'tipc_named_withdraw'
../net/tipc/name_distr.c:147: warning: Function parameter or member 'net' not 
described in 'named_distribute'
../net/tipc/name_distr.c:147: warning: Function parameter or member 'seqno' not 
described in 'named_distribute'
../net/tipc/name_distr.c:199: warning: Function parameter or member 'net' not 
described in 'tipc_named_node_up'
../net/tipc/name_distr.c:199: warning: Function parameter or member 'dnode' not 
described in 'tipc_named_node_up'
../net/tipc/name_distr.c:199: warning: Function parameter or member 
'capabilities' not described in 'tipc_named_node_up'
../net/tipc/name_distr.c:225: warning: Function parameter or member 'net' not 
described in 'tipc_publ_purge'
../net/tipc/name_distr.c:225: warning: Function parameter or member 'publ' not 
described in 'tipc_publ_purge'
../net/tipc/name_distr.c:225: warning: Function parameter or member 'addr' not 
described in 'tipc_publ_purge'
../net/tipc/name_distr.c:272: warning: Function parameter or member 'net' not 
described in 'tipc_update_nametbl'
../net/tipc/name_distr.c:272: warning: Function parameter or member 'i' not 
described in 'tipc_update_nametbl'
../net/tipc/name_distr.c:272: warning: Function parameter or member 'node' not 
described in 'tipc_update_nametbl'
../net/tipc/name_distr.c:272: warning: Function parameter or member 'dtype' not 
described in 'tipc_update_nametbl'
../net/tipc/name_distr.c:353: warning: Function parameter or member 'net' not 
described in 'tipc_named_rcv'
../net/tipc/name_distr.c:353: warning: Function parameter or member 'namedq' 
not described in 'tipc_named_rcv'
../net/tipc/name_distr.c:353: warning: Function parameter or member 'rcv_nxt' 
not described in 'tipc_named_rcv'
../net/tipc/name_distr.c:353: warning: Function parameter or member 'open' not 
described in 'tipc_named_rcv'
../net/tipc/name_distr.c:383: warning: Function parameter or member 'net' not 
described in 'tipc_named_reinit'

Signed-off-by: Randy Dunlap 
Cc: Jon Maloy 
Cc: Ying Xue 
Cc: netdev@vger.kernel.org
Cc: tipc-discuss...@lists.sourceforge.net
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
 net/tipc/name_distr.c |   27 +++
 1 file changed, 27 insertions(+)

--- linux-next-20201102.orig/net/tipc/name_distr.c
+++ linux-next-20201102/net/tipc/name_distr.c
@@ -50,6 +50,8 @@ struct distr_queue_item {
 
 /**
  * publ_to_item - add publication info to a publication message
+ * @p: publication info
+ * @i: location of item in the message
  */
 static void publ_to_item(struct distr_item *i, struct publication *p)
 {
@@ -62,6 +64,10 @@ static void publ_to_item(struct distr_it
 
 /**
  * named_prepare_buf - allocate & initialize a publication message
+ * @net: the associated network namespace
+ * @type: message type
+ * @size: payload size
+ * @dest: destination node
  *
  * The buffer returned is of size INT_H_SIZE + payload size
  */
@@ -83,6 +89,8 @@ static struct sk_buff *named_prepare_buf
 
 /**
  * tipc_named_publish - tell other nodes about a new publication by this node
+ * @net: the associated network namespace
+ * @publ: the new publication
  */
 struct sk_buff *tipc_named_publish(struct net *net, struct publication *publ)
 {
@@ -111,6 +119,8 @@ struct sk_buff *tipc_named_publish(struc
 

[PATCH 06/10 net-next] net/tipc: fix name_table.c kernel-doc

2020-11-24 Thread Randy Dunlap
Fix name_table.c kernel-doc warnings in preparation for adding to the
networking docbook.

../net/tipc/name_table.c:115: warning: Function parameter or member 'start' not 
described in 'service_range_foreach_match'
../net/tipc/name_table.c:115: warning: Function parameter or member 'end' not 
described in 'service_range_foreach_match'
../net/tipc/name_table.c:127: warning: Function parameter or member 'start' not 
described in 'service_range_match_first'
../net/tipc/name_table.c:127: warning: Function parameter or member 'end' not 
described in 'service_range_match_first'
../net/tipc/name_table.c:176: warning: Function parameter or member 'start' not 
described in 'service_range_match_next'
../net/tipc/name_table.c:176: warning: Function parameter or member 'end' not 
described in 'service_range_match_next'
../net/tipc/name_table.c:225: warning: Function parameter or member 'type' not 
described in 'tipc_publ_create'
../net/tipc/name_table.c:225: warning: Function parameter or member 'lower' not 
described in 'tipc_publ_create'
../net/tipc/name_table.c:225: warning: Function parameter or member 'upper' not 
described in 'tipc_publ_create'
../net/tipc/name_table.c:225: warning: Function parameter or member 'scope' not 
described in 'tipc_publ_create'
../net/tipc/name_table.c:225: warning: Function parameter or member 'node' not 
described in 'tipc_publ_create'
../net/tipc/name_table.c:225: warning: Function parameter or member 'port' not 
described in 'tipc_publ_create'
../net/tipc/name_table.c:225: warning: Function parameter or member 'key' not 
described in 'tipc_publ_create'
../net/tipc/name_table.c:252: warning: Function parameter or member 'type' not 
described in 'tipc_service_create'
../net/tipc/name_table.c:252: warning: Function parameter or member 'hd' not 
described in 'tipc_service_create'
../net/tipc/name_table.c:367: warning: Function parameter or member 'sr' not 
described in 'tipc_service_remove_publ'
../net/tipc/name_table.c:367: warning: Function parameter or member 'node' not 
described in 'tipc_service_remove_publ'
../net/tipc/name_table.c:367: warning: Function parameter or member 'key' not 
described in 'tipc_service_remove_publ'
../net/tipc/name_table.c:383: warning: Function parameter or member 'pa' not 
described in 'publication_after'
../net/tipc/name_table.c:383: warning: Function parameter or member 'pb' not 
described in 'publication_after'
../net/tipc/name_table.c:401: warning: Function parameter or member 'service' 
not described in 'tipc_service_subscribe'
../net/tipc/name_table.c:401: warning: Function parameter or member 'sub' not 
described in 'tipc_service_subscribe'
../net/tipc/name_table.c:546: warning: Function parameter or member 'net' not 
described in 'tipc_nametbl_translate'
../net/tipc/name_table.c:546: warning: Function parameter or member 'type' not 
described in 'tipc_nametbl_translate'
../net/tipc/name_table.c:546: warning: Function parameter or member 'instance' 
not described in 'tipc_nametbl_translate'
../net/tipc/name_table.c:546: warning: Function parameter or member 'dnode' not 
described in 'tipc_nametbl_translate'
../net/tipc/name_table.c:762: warning: Function parameter or member 'net' not 
described in 'tipc_nametbl_withdraw'
../net/tipc/name_table.c:762: warning: Function parameter or member 'type' not 
described in 'tipc_nametbl_withdraw'
../net/tipc/name_table.c:762: warning: Function parameter or member 'lower' not 
described in 'tipc_nametbl_withdraw'
../net/tipc/name_table.c:762: warning: Function parameter or member 'upper' not 
described in 'tipc_nametbl_withdraw'
../net/tipc/name_table.c:762: warning: Function parameter or member 'key' not 
described in 'tipc_nametbl_withdraw'
../net/tipc/name_table.c:796: warning: Function parameter or member 'sub' not 
described in 'tipc_nametbl_subscribe'
../net/tipc/name_table.c:826: warning: Function parameter or member 'sub' not 
described in 'tipc_nametbl_unsubscribe'
../net/tipc/name_table.c:876: warning: Function parameter or member 'net' not 
described in 'tipc_service_delete'
../net/tipc/name_table.c:876: warning: Function parameter or member 'sc' not 
described in 'tipc_service_delete'

Signed-off-by: Randy Dunlap 
Cc: Jon Maloy 
Cc: Ying Xue 
Cc: netdev@vger.kernel.org
Cc: tipc-discuss...@lists.s

[PATCH 08/10 net-next] net/tipc: fix socket.c kernel-doc

2020-11-24 Thread Randy Dunlap
Fix socket.c kernel-doc warnings in preparation for adding to the
networking docbook.

Also, for rcvbuf_limit(), use bullet notation so that the lines do
not run together.

../net/tipc/socket.c:130: warning: Function parameter or member 'cong_links' 
not described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'probe_unacked' 
not described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'snd_win' not 
described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'peer_caps' not 
described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'rcv_win' not 
described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'group' not 
described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'oneway' not 
described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'nagle_start' 
not described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'snd_backlog' 
not described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'msg_acc' not 
described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'pkt_cnt' not 
described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'expect_ack' 
not described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'nodelay' not 
described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'group_is_open' 
not described in 'tipc_sock'
../net/tipc/socket.c:267: warning: Function parameter or member 'sk' not 
described in 'tsk_advance_rx_queue'
../net/tipc/socket.c:295: warning: Function parameter or member 'sk' not 
described in 'tsk_rej_rx_queue'
../net/tipc/socket.c:295: warning: Function parameter or member 'error' not 
described in 'tsk_rej_rx_queue'
../net/tipc/socket.c:894: warning: Function parameter or member 'tsk' not 
described in 'tipc_send_group_msg'
../net/tipc/socket.c:1187: warning: Function parameter or member 'net' not 
described in 'tipc_sk_mcast_rcv'
../net/tipc/socket.c:1323: warning: Function parameter or member 'inputq' not 
described in 'tipc_sk_conn_proto_rcv'
../net/tipc/socket.c:1323: warning: Function parameter or member 'xmitq' not 
described in 'tipc_sk_conn_proto_rcv'
../net/tipc/socket.c:1885: warning: Function parameter or member 'sock' not 
described in 'tipc_recvmsg'
../net/tipc/socket.c:1993: warning: Function parameter or member 'sock' not 
described in 'tipc_recvstream'
../net/tipc/socket.c:2313: warning: Function parameter or member 'xmitq' not 
described in 'tipc_sk_filter_rcv'
../net/tipc/socket.c:2404: warning: Function parameter or member 'xmitq' not 
described in 'tipc_sk_enqueue'
../net/tipc/socket.c:2456: warning: Function parameter or member 'net' not 
described in 'tipc_sk_rcv'
../net/tipc/socket.c:2693: warning: Function parameter or member 'kern' not 
described in 'tipc_accept'
../net/tipc/socket.c:3816: warning: Excess function parameter 
'sysctl_tipc_sk_filter' description in 'tipc_sk_filtering'

Signed-off-by: Randy Dunlap 
Cc: Jon Maloy 
Cc: Ying Xue 
Cc: netdev@vger.kernel.org
Cc: tipc-discuss...@lists.sourceforge.net
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
 net/tipc/socket.c |   31 +--
 1 file changed, 29 insertions(+), 2 deletions(-)

--- linux-next-20201102.orig/net/tipc/socket.c
+++ linux-next-20201102/net/tipc/socket.c
@@ -79,19 +79,32 @@ struct sockaddr_pair {
  * @maxnagle: maximum size of msg which can be subject to nagle
  * @portid: unique port identity in TIPC socket hash table
  * @phdr: preformatted message header used when sending messages
- * #cong_links: list of congested links
+ * @cong_links: list of congested links
  * @publications: list of publications for port
  * @blocking_link: address of the congested link we are currently sleeping on
  * @pub_count: total # of publications port has made during its lifetime
  * @conn_timeout: the time we can wait for an unresponded setup request
+ * @probe_unacked: probe has not received ack yet
  * @dupl_rcvcnt: number of bytes counted twice, in both backlog and rcv queue
  * @cong_link_cnt: number of congested links
  * @snt_unacked: # messages sent by socket, and not yet acked by peer
+ * @snd_win: send wind

[PATCH 02/10 net-next] net/tipc: fix various kernel-doc warnings

2020-11-24 Thread Randy Dunlap
kernel-doc and Sphinx fixes to eliminate lots of warnings
in preparation for adding to the networking docbook.

../net/tipc/crypto.c:57: warning: cannot understand function prototype: 'enum '
../net/tipc/crypto.c:69: warning: cannot understand function prototype: 'enum '
../net/tipc/crypto.c:130: warning: Function parameter or member 'tfm' not 
described in 'tipc_tfm'
../net/tipc/crypto.c:130: warning: Function parameter or member 'list' not 
described in 'tipc_tfm'
../net/tipc/crypto.c:172: warning: Function parameter or member 'stat' not 
described in 'tipc_crypto_stats'
../net/tipc/crypto.c:232: warning: Function parameter or member 'flags' not 
described in 'tipc_crypto'
../net/tipc/crypto.c:329: warning: Function parameter or member 'ukey' not 
described in 'tipc_aead_key_validate'
../net/tipc/crypto.c:329: warning: Function parameter or member 'info' not 
described in 'tipc_aead_key_validate'
../net/tipc/crypto.c:482: warning: Function parameter or member 'aead' not 
described in 'tipc_aead_tfm_next'
../net/tipc/trace.c:43: warning: cannot understand function prototype: 
'unsigned long sysctl_tipc_sk_filter[5] __read_mostly = '

Documentation/networking/tipc:57: ../net/tipc/msg.c:584: WARNING: Unexpected 
indentation.
Documentation/networking/tipc:63: ../net/tipc/name_table.c:536: WARNING: 
Unexpected indentation.
Documentation/networking/tipc:63: ../net/tipc/name_table.c:537: WARNING: Block 
quote ends without a blank line; unexpected unindent.
Documentation/networking/tipc:78: ../net/tipc/socket.c:3809: WARNING: 
Unexpected indentation.
Documentation/networking/tipc:78: ../net/tipc/socket.c:3807: WARNING: Inline 
strong start-string without end-string.
Documentation/networking/tipc:72: ../net/tipc/node.c:904: WARNING: Unexpected 
indentation.
Documentation/networking/tipc:39: ../net/tipc/crypto.c:97: WARNING: Block quote 
ends without a blank line; unexpected unindent.
Documentation/networking/tipc:39: ../net/tipc/crypto.c:98: WARNING: Block quote 
ends without a blank line; unexpected unindent.
Documentation/networking/tipc:39: ../net/tipc/crypto.c:141: WARNING: Inline 
strong start-string without end-string.

../net/tipc/discover.c:82: warning: Function parameter or member 'skb' not 
described in 'tipc_disc_init_msg'

../net/tipc/msg.c:69: warning: Function parameter or member 'gfp' not described 
in 'tipc_buf_acquire'
../net/tipc/msg.c:382: warning: Function parameter or member 'offset' not 
described in 'tipc_msg_build'
../net/tipc/msg.c:708: warning: Function parameter or member 'net' not 
described in 'tipc_msg_lookup_dest'

../net/tipc/subscr.c:65: warning: Function parameter or member 'seq' not 
described in 'tipc_sub_check_overlap'
../net/tipc/subscr.c:65: warning: Function parameter or member 'found_lower' 
not described in 'tipc_sub_check_overlap'
../net/tipc/subscr.c:65: warning: Function parameter or member 'found_upper' 
not described in 'tipc_sub_check_overlap'

../net/tipc/udp_media.c:75: warning: Function parameter or member 'proto' not 
described in 'udp_media_addr'
../net/tipc/udp_media.c:75: warning: Function parameter or member 'port' not 
described in 'udp_media_addr'
../net/tipc/udp_media.c:75: warning: Function parameter or member 'ipv4' not 
described in 'udp_media_addr'
../net/tipc/udp_media.c:75: warning: Function parameter or member 'ipv6' not 
described in 'udp_media_addr'
../net/tipc/udp_media.c:98: warning: Function parameter or member 'rcast' not 
described in 'udp_bearer'

Signed-off-by: Randy Dunlap 
Cc: Jon Maloy 
Cc: Ying Xue 
Cc: netdev@vger.kernel.org
Cc: tipc-discuss...@lists.sourceforge.net
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
 net/tipc/crypto.c |   17 -
 net/tipc/discover.c   |1 +
 net/tipc/msg.c|   10 +++---
 net/tipc/name_table.c |4 ++--
 net/tipc/node.c   |5 +++--
 net/tipc/socket.c |4 ++--
 net/tipc/subscr.c |6 --
 net/tipc/trace.c  |2 +-
 net/tipc/udp_media.c  |8 +++-
 9 files changed, 39 insertions(+), 18 deletions(-)

--- linux-next-20201124.orig/net/tipc/crypto.c
+++ linux-next-20201124/net/tipc/crypto.c
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * net/tipc/crypto.c: TIPC crypto for key handling & packet en/decryption
  *
  * Copyright (c) 2019, Ericsson AB
@@ -51,7 +51,7 @@
 
 #define TIPC_REKEYING_INTV_DEF (60 * 24) /* default: 1 day */
 
-/**
+/*
  * TIPC Key ids
  */
 enum {
@@ -63,7 +63,7 @@ enum {
KEY_MAX = KEY_3,
 };
 
-/**
+/*
  * TIPC Crypto statistics
  */
 enum {
@@ -90,7 +90,7 @@ int sysctl_tipc

[PATCH 09/10 net-next] net/tipc: fix all function Return: notation

2020-11-24 Thread Randy Dunlap
Fix Return: kernel-doc notation in all net/tipc/ source files.
Also keep ReST list notation intact for output formatting.
Fix a few typos in comments.

Signed-off-by: Randy Dunlap 
Cc: Jon Maloy 
Cc: Ying Xue 
Cc: netdev@vger.kernel.org
Cc: tipc-discuss...@lists.sourceforge.net
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
 net/tipc/bearer.c |2 -
 net/tipc/crypto.c |   38 +-
 net/tipc/discover.c   |2 -
 net/tipc/link.c   |8 ++---
 net/tipc/msg.c|   19 +++--
 net/tipc/name_distr.c |2 -
 net/tipc/node.c   |6 ++--
 net/tipc/socket.c |   57 +++-
 net/tipc/subscr.c |2 -
 9 files changed, 68 insertions(+), 68 deletions(-)

--- linux-next-20201102.orig/net/tipc/bearer.c
+++ linux-next-20201102/net/tipc/bearer.c
@@ -132,7 +132,7 @@ int tipc_media_addr_printf(char *buf, in
  * @name: ptr to bearer name string
  * @name_parts: ptr to area for bearer name components (or NULL if not needed)
  *
- * Returns 1 if bearer name is valid, otherwise 0.
+ * Return: 1 if bearer name is valid, otherwise 0.
  */
 static int bearer_name_validate(const char *name,
struct tipc_bearer_names *name_parts)
--- linux-next-20201102.orig/net/tipc/crypto.c
+++ linux-next-20201102/net/tipc/crypto.c
@@ -721,9 +721,9 @@ static void *tipc_aead_mem_alloc(struct
  * @__dnode: TIPC dest node if "known"
  *
  * Return:
- * 0   : if the encryption has completed
- * -EINPROGRESS/-EBUSY : if a callback will be performed
- * < 0 : the encryption has failed
+ * * 0   : if the encryption has completed
+ * * -EINPROGRESS/-EBUSY : if a callback will be performed
+ * * < 0 : the encryption has failed
  */
 static int tipc_aead_encrypt(struct tipc_aead *aead, struct sk_buff *skb,
 struct tipc_bearer *b,
@@ -877,9 +877,9 @@ static void tipc_aead_encrypt_done(struc
  * @b: TIPC bearer where the message has been received
  *
  * Return:
- * 0   : if the decryption has completed
- * -EINPROGRESS/-EBUSY : if a callback will be performed
- * < 0 : the decryption has failed
+ * * 0   : if the decryption has completed
+ * * -EINPROGRESS/-EBUSY : if a callback will be performed
+ * * < 0 : the decryption has failed
  */
 static int tipc_aead_decrypt(struct net *net, struct tipc_aead *aead,
 struct sk_buff *skb, struct tipc_bearer *b)
@@ -1008,7 +1008,7 @@ static inline int tipc_ehdr_size(struct
  * tipc_ehdr_validate - Validate an encryption message
  * @skb: the message buffer
  *
- * Returns "true" if this is a valid encryption message, otherwise "false"
+ * Return: "true" if this is a valid encryption message, otherwise "false"
  */
 bool tipc_ehdr_validate(struct sk_buff *skb)
 {
@@ -1681,12 +1681,12 @@ static inline void tipc_crypto_clone_msg
  * Otherwise, the skb is freed!
  *
  * Return:
- * 0   : the encryption has succeeded (or no encryption)
- * -EINPROGRESS/-EBUSY : the encryption is ongoing, a callback will be made
- * -ENOKEK : the encryption has failed due to no key
- * -EKEYREVOKED: the encryption has failed due to key revoked
- * -ENOMEM : the encryption has failed due to no memory
- * < 0 : the encryption has failed due to other reasons
+ * * 0   : the encryption has succeeded (or no encryption)
+ * * -EINPROGRESS/-EBUSY : the encryption is ongoing, a callback will be made
+ * * -ENOKEK : the encryption has failed due to no key
+ * * -EKEYREVOKED: the encryption has failed due to key revoked
+ * * -ENOMEM : the encryption has failed due to no memory
+ * * < 0 : the encryption has failed due to other reasons
  */
 int tipc_crypto_xmit(struct net *net, struct sk_buff **skb,
 struct tipc_bearer *b, struct tipc_media_addr *dst,
@@ -1806,12 +1806,12 @@ exit:
  * cluster key(s) can be taken for decryption (- recursive).
  *
  * Return:
- * 0   : the decryption has successfully completed
- * -EINPROGRESS/-EBUSY : the decryption is ongoing, a callback will be made
- * -ENOKEY : the decryption has failed due to no key
- * -EBADMSG: the decryption has failed due to bad message
- * -ENOMEM : the decryption has failed due to no memory
- * < 0 : the decryption has failed due to other reasons
+ * * 0   : the decryption has successfully completed
+ * * -EINPROGRESS/-EBUSY : the decryption is ongoing, a callback will be made
+ * * -ENOKEY : the decryption has failed due to no key
+ * * -EBADMSG: the decryption has failed due to bad message
+ * * -ENOMEM : the decryption has failed du

[PATCH 07/10 net-next] net/tipc: fix node.c kernel-doc

2020-11-24 Thread Randy Dunlap
Fix node.c kernel-doc warnings in preparation for adding to the
networking docbook.

../net/tipc/node.c:141: warning: Function parameter or member 'kref' not 
described in 'tipc_node'
../net/tipc/node.c:141: warning: Function parameter or member 'bc_entry' not 
described in 'tipc_node'
../net/tipc/node.c:141: warning: Function parameter or member 'failover_sent' 
not described in 'tipc_node'
../net/tipc/node.c:141: warning: Function parameter or member 'peer_id' not 
described in 'tipc_node'
../net/tipc/node.c:141: warning: Function parameter or member 'peer_id_string' 
not described in 'tipc_node'
../net/tipc/node.c:141: warning: Function parameter or member 'conn_sks' not 
described in 'tipc_node'
../net/tipc/node.c:141: warning: Function parameter or member 'keepalive_intv' 
not described in 'tipc_node'
../net/tipc/node.c:141: warning: Function parameter or member 'timer' not 
described in 'tipc_node'
../net/tipc/node.c:141: warning: Function parameter or member 'peer_net' not 
described in 'tipc_node'
../net/tipc/node.c:141: warning: Function parameter or member 'peer_hash_mix' 
not described in 'tipc_node'
../net/tipc/node.c:273: warning: Function parameter or member '__n' not 
described in 'tipc_node_crypto_rx'
../net/tipc/node.c:822: warning: Function parameter or member 'n' not described 
in '__tipc_node_link_up'
../net/tipc/node.c:822: warning: Function parameter or member 'bearer_id' not 
described in '__tipc_node_link_up'
../net/tipc/node.c:822: warning: Function parameter or member 'xmitq' not 
described in '__tipc_node_link_up'
../net/tipc/node.c:888: warning: Function parameter or member 'n' not described 
in 'tipc_node_link_up'
../net/tipc/node.c:888: warning: Function parameter or member 'bearer_id' not 
described in 'tipc_node_link_up'
../net/tipc/node.c:888: warning: Function parameter or member 'xmitq' not 
described in 'tipc_node_link_up'
../net/tipc/node.c:948: warning: Function parameter or member 'n' not described 
in '__tipc_node_link_down'
../net/tipc/node.c:948: warning: Function parameter or member 'bearer_id' not 
described in '__tipc_node_link_down'
../net/tipc/node.c:948: warning: Function parameter or member 'xmitq' not 
described in '__tipc_node_link_down'
../net/tipc/node.c:948: warning: Function parameter or member 'maddr' not 
described in '__tipc_node_link_down'
../net/tipc/node.c:1537: warning: Function parameter or member 'net' not 
described in 'tipc_node_get_linkname'
../net/tipc/node.c:1537: warning: Function parameter or member 'len' not 
described in 'tipc_node_get_linkname'
../net/tipc/node.c:1891: warning: Function parameter or member 'n' not 
described in 'tipc_node_check_state'
../net/tipc/node.c:1891: warning: Function parameter or member 'xmitq' not 
described in 'tipc_node_check_state'

Signed-off-by: Randy Dunlap 
Cc: Jon Maloy 
Cc: Ying Xue 
Cc: netdev@vger.kernel.org
Cc: tipc-discuss...@lists.sourceforge.net
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
 net/tipc/node.c |   26 +-
 1 file changed, 25 insertions(+), 1 deletion(-)

--- linux-next-20201102.orig/net/tipc/node.c
+++ linux-next-20201102/net/tipc/node.c
@@ -82,7 +82,7 @@ struct tipc_bclink_entry {
 /**
  * struct tipc_node - TIPC node structure
  * @addr: network address of node
- * @ref: reference counter to node object
+ * @kref: reference counter to node object
  * @lock: rwlock governing access to structure
  * @net: the applicable net namespace
  * @hash: links to adjacent nodes in unsorted hash chain
@@ -90,9 +90,11 @@ struct tipc_bclink_entry {
  * @namedq: pointer to name table input queue with name table messages
  * @active_links: bearer ids of active links, used as index into links[] array
  * @links: array containing references to all links to node
+ * @bc_entry: broadcast link entry
  * @action_flags: bit mask of different types of node actions
  * @state: connectivity state vs peer node
  * @preliminary: a preliminary node or not
+ * @failover_sent: failover sent or not
  * @sync_point: sequence number where synch/failover is finished
  * @list: links to adjacent nodes in sorted list of cluster's nodes
  * @working_links: number of working links to node (both active and standby)
@@ -100,9 +102,16 @@ struct tipc_bclink_entry {
  * @capabilities: bitmap, indicating peer node's functional capabilities
  * @signature: node instance identifier
  * @link_id: local and remote bearer ids of changing link, if any
+ * @peer_id: 128-bit ID of 

[PATCH v4] vdpa: mlx5: fix vdpa/vhost dependencies

2020-11-28 Thread Randy Dunlap
drivers/vdpa/mlx5/ uses vhost_iotlb*() interfaces, so select
VHOST_IOTLB to make them be built.

However, if VHOST_IOTLB is the only VHOST symbol that is
set/enabled, the object file still won't be built because
drivers/Makefile won't descend into drivers/vhost/ to build it,
so make drivers/Makefile build the needed binary whenever
VHOST_IOTLB is set, like it does for VHOST_RING.

Fixes these build errors:
ERROR: modpost: "vhost_iotlb_itree_next" [drivers/vdpa/mlx5/mlx5_vdpa.ko] 
undefined!
ERROR: modpost: "vhost_iotlb_itree_first" [drivers/vdpa/mlx5/mlx5_vdpa.ko] 
undefined!

Fixes: 29064bfdabd5 ("vdpa/mlx5: Add support library for mlx5 VDPA 
implementation")
Fixes: aff90770e54c ("vdpa/mlx5: Fix dependency on MLX5_CORE")
Reported-by: kernel test robot 
Signed-off-by: Randy Dunlap 
Cc: Eli Cohen 
Cc: Parav Pandit 
Cc: "Michael S. Tsirkin" 
Cc: Jason Wang 
Cc: virtualizat...@lists.linux-foundation.org
Cc: Saeed Mahameed 
Cc: Leon Romanovsky 
Cc: netdev@vger.kernel.org
---
v2: change from select to depends on VHOST (Saeed)
v3: change to depends on VHOST_IOTLB (Jason)
v4: use select VHOST_IOTLB (Michael); also add to drivers/Makefile

 drivers/Makefile |1 +
 drivers/vdpa/Kconfig |1 +
 2 files changed, 2 insertions(+)

--- linux-next-20201127.orig/drivers/vdpa/Kconfig
+++ linux-next-20201127/drivers/vdpa/Kconfig
@@ -32,6 +32,7 @@ config IFCVF
 
 config MLX5_VDPA
bool
+   select VHOST_IOTLB
help
  Support library for Mellanox VDPA drivers. Provides code that is
  common for all types of VDPA drivers. The following drivers are 
planned:
--- linux-next-20201127.orig/drivers/Makefile
+++ linux-next-20201127/drivers/Makefile
@@ -143,6 +143,7 @@ obj-$(CONFIG_OF)+= of/
 obj-$(CONFIG_SSB)  += ssb/
 obj-$(CONFIG_BCMA) += bcma/
 obj-$(CONFIG_VHOST_RING)   += vhost/
+obj-$(CONFIG_VHOST_IOTLB)  += vhost/
 obj-$(CONFIG_VHOST)+= vhost/
 obj-$(CONFIG_VLYNQ)+= vlynq/
 obj-$(CONFIG_GREYBUS)  += greybus/


[PATCH] net: broadcom CNIC: requires MMU

2020-11-28 Thread Randy Dunlap
The CNIC kconfig symbol selects UIO and UIO depends on MMU.
Since 'select' does not follow dependency chains, add the same MMU
dependency to CNIC.

Quietens this kconfig warning:

WARNING: unmet direct dependencies detected for UIO
  Depends on [n]: MMU [=n]
  Selected by [m]:
  - CNIC [=m] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_BROADCOM [=y] 
&& PCI [=y] && (IPV6 [=m] || IPV6 [=m]=n)

Fixes: adfc5217e9db ("broadcom: Move the Broadcom drivers")
Signed-off-by: Randy Dunlap 
Cc: Jeff Kirsher 
Cc: Rasesh Mody 
Cc: gr-linux-nic-...@marvell.com
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
Cc: netdev@vger.kernel.org
---
This isn't really the correct Fixes: tag, but I don't know how to go
backwards in git history to find it. :(

 drivers/net/ethernet/broadcom/Kconfig |1 +
 1 file changed, 1 insertions(+)

--- linux-next-20201125.orig/drivers/net/ethernet/broadcom/Kconfig
+++ linux-next-20201125/drivers/net/ethernet/broadcom/Kconfig
@@ -88,6 +88,7 @@ config BNX2
 config CNIC
tristate "QLogic CNIC support"
depends on PCI && (IPV6 || IPV6=n)
+   depends on MMU
select BNX2
select UIO
help


Re: [PATCH 00/10 net-next] net/tipc: fix all kernel-doc and add TIPC networking chapter

2020-11-29 Thread Randy Dunlap
On 11/28/20 11:37 PM, Ying Xue wrote:
> On 11/25/20 12:20 PM, Randy Dunlap wrote:
>>
>> Question: is net/tipc/discover.c, in tipc_disc_delete() kernel-doc,
>> what is the word "duest"?  Should it be changed?
> 
> The "duest" is a typo, and it should be "dest" defined as below:
> struct tipc_discoverer {
> u32 bearer_id;
> struct tipc_media_addr dest; ===> "dest"
> struct net *net;
> u32 domain;
> int num_nodes;
> spinlock_t lock;
> struct sk_buff *skb;
> struct timer_list timer;
> unsigned long timer_intv;
> };
> 

Thanks. I'll take care of this one and your comments
on patch #1.

-- 
~Randy



[PATCH 00/10 net-next v2] net/tipc: fix all kernel-doc and add TIPC networking chapter

2020-11-29 Thread Randy Dunlap
Fix lots of net/tipc/ kernel-doc warnings. Add many struct field and
function parameter descriptions.

Then add a TIPC chapter to the networking documentation book.

All patches have been rebased to current net-next.


Note: some of the struct members and function parameters are marked
with "FIXME". They could use some additional descriptions if
someone could help add to them. Thanks.


Cc: Jon Maloy 
Cc: Ying Xue 
Cc: tipc-discuss...@lists.sourceforge.net
Cc: "David S. Miller" 
Cc: Jakub Kicinski 

[PATCH 01/10 net-next v2] net/tipc: fix tipc header files for kernel-doc
[PATCH 02/10 net-next v2] net/tipc: fix various kernel-doc warnings
[PATCH 03/10 net-next v2] net/tipc: fix bearer.c for kernel-doc
[PATCH 04/10 net-next v2] net/tipc: fix link.c kernel-doc
[PATCH 05/10 net-next v2] net/tipc: fix name_distr.c kernel-doc
[PATCH 06/10 net-next v2] net/tipc: fix name_table.c kernel-doc
[PATCH 07/10 net-next v2] net/tipc: fix node.c kernel-doc
[PATCH 08/10 net-next v2] net/tipc: fix socket.c kernel-doc
[PATCH 09/10 net-next v2] net/tipc: fix all function Return: notation
[PATCH 10/10 net-next v2] net/tipc: add TIPC chapter to networking Documentation


 Documentation/networking/index.rst |1 
 Documentation/networking/tipc.rst  |  101 +++
 net/tipc/bearer.c  |   22 +
 net/tipc/bearer.h  |   10 +-
 net/tipc/crypto.c  |   55 --
 net/tipc/crypto.h  |6 -
 net/tipc/discover.c|5 -
 net/tipc/link.c|   46 ++--
 net/tipc/msg.c |   29 ---
 net/tipc/name_distr.c  |   29 +++
 net/tipc/name_distr.h  |2 
 net/tipc/name_table.c  |   46 +---
 net/tipc/name_table.h  |9 +-
 net/tipc/node.c|   37 -
 net/tipc/socket.c  |   92 +++-
 net/tipc/subscr.c  |8 +-
 net/tipc/subscr.h  |   11 +-
 net/tipc/trace.c   |2 
 net/tipc/udp_media.c   |8 +-
 19 files changed, 405 insertions(+), 114 deletions(-)


[PATCH 01/10 net-next v2] net/tipc: fix tipc header files for kernel-doc

2020-11-29 Thread Randy Dunlap
Fix tipc header files for adding to the networking docbook.

Remove some uses of "/**" that were not kernel-doc notation.

Fix some source formatting to eliminate Sphinx warnings.

Add missing struct member and function argument kernel-doc descriptions.

Correct the description of a couple of struct members that were
marked as "(FIXME)".

Documentation/networking/tipc:18: ../net/tipc/name_table.h:65: WARNING: 
Unexpected indentation.
Documentation/networking/tipc:18: ../net/tipc/name_table.h:66: WARNING: Block 
quote ends without a blank line; unexpected unindent.

../net/tipc/bearer.h:128: warning: Function parameter or member 'min_win' not 
described in 'tipc_media'
../net/tipc/bearer.h:128: warning: Function parameter or member 'max_win' not 
described in 'tipc_media'

../net/tipc/bearer.h:171: warning: Function parameter or member 'min_win' not 
described in 'tipc_bearer'
../net/tipc/bearer.h:171: warning: Function parameter or member 'max_win' not 
described in 'tipc_bearer'
../net/tipc/bearer.h:171: warning: Function parameter or member 'disc' not 
described in 'tipc_bearer'
../net/tipc/bearer.h:171: warning: Function parameter or member 'up' not 
described in 'tipc_bearer'
../net/tipc/bearer.h:171: warning: Function parameter or member 'refcnt' not 
described in 'tipc_bearer'

../net/tipc/name_distr.h:68: warning: Function parameter or member 'port' not 
described in 'distr_item'

../net/tipc/name_table.h:111: warning: Function parameter or member 'services' 
not described in 'name_table'
../net/tipc/name_table.h:111: warning: Function parameter or member 
'cluster_scope_lock' not described in 'name_table'
../net/tipc/name_table.h:111: warning: Function parameter or member 'rc_dests' 
not described in 'name_table'
../net/tipc/name_table.h:111: warning: Function parameter or member 'snd_nxt' 
not described in 'name_table'

../net/tipc/subscr.h:67: warning: Function parameter or member 'kref' not 
described in 'tipc_subscription'
../net/tipc/subscr.h:67: warning: Function parameter or member 'net' not 
described in 'tipc_subscription'
../net/tipc/subscr.h:67: warning: Function parameter or member 'service_list' 
not described in 'tipc_subscription'
../net/tipc/subscr.h:67: warning: Function parameter or member 'conid' not 
described in 'tipc_subscription'
../net/tipc/subscr.h:67: warning: Function parameter or member 'inactive' not 
described in 'tipc_subscription'
../net/tipc/subscr.h:67: warning: Function parameter or member 'lock' not 
described in 'tipc_subscription'

Signed-off-by: Randy Dunlap 
Cc: Jon Maloy 
Cc: Ying Xue 
Cc: tipc-discuss...@lists.sourceforge.net
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
v2: correct (FIXME) descriptions (thanks Ying Xue)
rebase to current net-next

 net/tipc/bearer.h |   10 +++---
 net/tipc/crypto.h |6 +++---
 net/tipc/name_distr.h |2 +-
 net/tipc/name_table.h |9 ++---
 net/tipc/subscr.h |   11 +++
 5 files changed, 24 insertions(+), 14 deletions(-)

--- net-next.orig/net/tipc/bearer.h
+++ net-next/net/tipc/bearer.h
@@ -93,7 +93,8 @@ struct tipc_bearer;
  * @raw2addr: convert from raw addr format to media addr format
  * @priority: default link (and bearer) priority
  * @tolerance: default time (in ms) before declaring link failure
- * @window: default window (in packets) before declaring link congestion
+ * @min_win: minimum window (in packets) before declaring link congestion
+ * @max_win: maximum window (in packets) before declaring link congestion
  * @mtu: max packet size bearer can support for media type not dependent on
  * underlying device MTU
  * @type_id: TIPC media identifier
@@ -138,12 +139,15 @@ struct tipc_media {
  * @pt: packet type for bearer
  * @rcu: rcu struct for tipc_bearer
  * @priority: default link priority for bearer
- * @window: default window size for bearer
+ * @min_win: minimum window (in packets) before declaring link congestion
+ * @max_win: maximum window (in packets) before declaring link congestion
  * @tolerance: default link tolerance for bearer
  * @domain: network domain to which links can be established
  * @identity: array index of this bearer within TIPC bearer array
- * @link_req: ptr to (optional) structure making periodic link setup requests
+ * @disc: ptr to link setup request
  * @net_plane: network plane ('A' through 'H') currently associated with bearer
+ * @up: bearer up flag (bit 0)
+ * @refcnt: tipc_bearer reference counter
  *
  * Note: media-specific code is responsible for initialization of the fields
  * indicated below when a bearer is enabled; TI

[PATCH 03/10 net-next v2] net/tipc: fix bearer.c for kernel-doc

2020-11-29 Thread Randy Dunlap
Fix kernel-doc warnings in bearer.c:

../net/tipc/bearer.c:77: warning: Function parameter or member 'name' not 
described in 'tipc_media_find'
../net/tipc/bearer.c:91: warning: Function parameter or member 'type' not 
described in 'media_find_id'
../net/tipc/bearer.c:105: warning: Function parameter or member 'buf' not 
described in 'tipc_media_addr_printf'
../net/tipc/bearer.c:105: warning: Function parameter or member 'len' not 
described in 'tipc_media_addr_printf'
../net/tipc/bearer.c:105: warning: Function parameter or member 'a' not 
described in 'tipc_media_addr_printf'
../net/tipc/bearer.c:174: warning: Function parameter or member 'net' not 
described in 'tipc_bearer_find'
../net/tipc/bearer.c:174: warning: Function parameter or member 'name' not 
described in 'tipc_bearer_find'
../net/tipc/bearer.c:238: warning: Function parameter or member 'net' not 
described in 'tipc_enable_bearer'
../net/tipc/bearer.c:238: warning: Function parameter or member 'name' not 
described in 'tipc_enable_bearer'
../net/tipc/bearer.c:238: warning: Function parameter or member 'disc_domain' 
not described in 'tipc_enable_bearer'
../net/tipc/bearer.c:238: warning: Function parameter or member 'prio' not 
described in 'tipc_enable_bearer'
../net/tipc/bearer.c:238: warning: Function parameter or member 'attr' not 
described in 'tipc_enable_bearer'
../net/tipc/bearer.c:350: warning: Function parameter or member 'net' not 
described in 'tipc_reset_bearer'
../net/tipc/bearer.c:350: warning: Function parameter or member 'b' not 
described in 'tipc_reset_bearer'
../net/tipc/bearer.c:374: warning: Function parameter or member 'net' not 
described in 'bearer_disable'
../net/tipc/bearer.c:374: warning: Function parameter or member 'b' not 
described in 'bearer_disable'
../net/tipc/bearer.c:462: warning: Function parameter or member 'net' not 
described in 'tipc_l2_send_msg'
../net/tipc/bearer.c:479: warning: Function parameter or member 'net' not 
described in 'tipc_l2_send_msg'

Signed-off-by: Randy Dunlap 
Cc: Jon Maloy 
Cc: Ying Xue 
Cc: tipc-discuss...@lists.sourceforge.net
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
v2: rebase to current net-next

 net/tipc/bearer.c |   20 +++-
 1 file changed, 19 insertions(+), 1 deletion(-)

--- net-next.orig/net/tipc/bearer.c
+++ net-next/net/tipc/bearer.c
@@ -72,6 +72,7 @@ static int tipc_l2_rcv_msg(struct sk_buf
 
 /**
  * tipc_media_find - locates specified media object by name
+ * @name: name to locate
  */
 struct tipc_media *tipc_media_find(const char *name)
 {
@@ -86,6 +87,7 @@ struct tipc_media *tipc_media_find(const
 
 /**
  * media_find_id - locates specified media object by type identifier
+ * @type: type identifier to locate
  */
 static struct tipc_media *media_find_id(u8 type)
 {
@@ -100,6 +102,9 @@ static struct tipc_media *media_find_id(
 
 /**
  * tipc_media_addr_printf - record media address in print buffer
+ * @buf: output buffer
+ * @len: output buffer size remaining
+ * @a: input media address
  */
 int tipc_media_addr_printf(char *buf, int len, struct tipc_media_addr *a)
 {
@@ -166,6 +171,8 @@ static int bearer_name_validate(const ch
 
 /**
  * tipc_bearer_find - locates bearer object with matching bearer name
+ * @net: the applicable net namespace
+ * @name: bearer name to locate
  */
 struct tipc_bearer *tipc_bearer_find(struct net *net, const char *name)
 {
@@ -228,6 +235,11 @@ void tipc_bearer_remove_dest(struct net
 
 /**
  * tipc_enable_bearer - enable bearer with the given name
+ * @net: the applicable net namespace
+ * @name: bearer name to enable
+ * @disc_domain: bearer domain
+ * @prio: bearer priority
+ * @attr: nlattr array
  */
 static int tipc_enable_bearer(struct net *net, const char *name,
  u32 disc_domain, u32 prio,
@@ -342,6 +354,8 @@ rejected:
 
 /**
  * tipc_reset_bearer - Reset all links established over this bearer
+ * @net: the applicable net namespace
+ * @b: the target bearer
  */
 static int tipc_reset_bearer(struct net *net, struct tipc_bearer *b)
 {
@@ -363,7 +377,9 @@ void tipc_bearer_put(struct tipc_bearer
 }
 
 /**
- * bearer_disable
+ * bearer_disable - disable this bearer
+ * @net: the applicable net namespace
+ * @b: the bearer to disable
  *
  * Note: This routine assumes caller holds RTNL lock.
  */
@@ -434,6 +450,7 @@ int tipc_enable_l2_media(struct net *net
 }
 
 /* tipc_disable_l2_media - detach TIPC bearer from an L2 interface
+ * @b: the target bearer
  *
  * Mark L2 bearer as inactive so that incoming buffers are thrown away
  */
@@ -450,6 +467,7 @@ void tipc_disable_l2_media(struct tipc_b
 
 /**
  * tipc_l2_send_msg - send a TIPC packet out over an L2 interface
+ * @net: the associated network namespace
  * @skb: the packet to be sent
  * @b: the bearer through which the packet is to be sent
  * @dest: peer destination address


[PATCH 04/10 net-next v2] net/tipc: fix link.c kernel-doc

2020-11-29 Thread Randy Dunlap
Fix link.c kernel-doc warnings in preparation for adding to the
networking docbook.

../net/tipc/link.c:200: warning: Function parameter or member 'session' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'snd_nxt_state' 
not described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'rcv_nxt_state' 
not described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'in_session' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'active' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'if_name' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'rst_cnt' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'drop_point' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 
'failover_reasm_skb' not described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 
'failover_deferdq' not described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'transmq' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'backlog' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'snd_nxt' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'rcv_unacked' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'deferdq' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'window' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'min_win' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'ssthresh' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'max_win' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'cong_acks' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'checkpoint' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'reasm_tnlmsg' 
not described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'last_gap' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'last_ga' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'bc_rcvlink' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'bc_sndlink' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'nack_state' not 
described in 'tipc_link'
../net/tipc/link.c:200: warning: Function parameter or member 'bc_peer_is_up' 
not described in 'tipc_link'
../net/tipc/link.c:473: warning: Function parameter or member 'self' not 
described in 'tipc_link_create'
../net/tipc/link.c:473: warning: Function parameter or member 'peer_id' not 
described in 'tipc_link_create'
../net/tipc/link.c:473: warning: Excess function parameter 'ownnode' 
description in 'tipc_link_create'
../net/tipc/link.c:544: warning: Function parameter or member 'ownnode' not 
described in 'tipc_link_bc_create'
../net/tipc/link.c:544: warning: Function parameter or member 'peer' not 
described in 'tipc_link_bc_create'
../net/tipc/link.c:544: warning: Function parameter or member 'peer_id' not 
described in 'tipc_link_bc_create'
../net/tipc/link.c:544: warning: Function parameter or member 'peer_caps' not 
described in 'tipc_link_bc_create'
../net/tipc/link.c:544: warning: Function parameter or member 'bc_sndlink' not 
described in 'tipc_link_bc_create'

Signed-off-by: Randy Dunlap 
Cc: Jon Maloy 
Cc: Ying Xue 
Cc: tipc-discuss...@lists.sourceforge.net
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
v2: rebase to current net-next

 net/tipc/link.c |   38 --
 1 file changed, 36 insertions(+), 2 deletions(-)

--- net-next.orig/net/tipc/link.c
+++ net-next/net/tipc/link.c
@@ -120,6 +120,34 @

[PATCH 05/10 net-next v2] net/tipc: fix name_distr.c kernel-doc

2020-11-29 Thread Randy Dunlap
Fix name_distr.c kernel-doc warnings in preparation for adding to the
networking docbook.

../net/tipc/name_distr.c:55: warning: Function parameter or member 'i' not 
described in 'publ_to_item'
../net/tipc/name_distr.c:55: warning: Function parameter or member 'p' not 
described in 'publ_to_item'
../net/tipc/name_distr.c:70: warning: Function parameter or member 'net' not 
described in 'named_prepare_buf'
../net/tipc/name_distr.c:70: warning: Function parameter or member 'type' not 
described in 'named_prepare_buf'
../net/tipc/name_distr.c:70: warning: Function parameter or member 'size' not 
described in 'named_prepare_buf'
../net/tipc/name_distr.c:70: warning: Function parameter or member 'dest' not 
described in 'named_prepare_buf'
../net/tipc/name_distr.c:88: warning: Function parameter or member 'net' not 
described in 'tipc_named_publish'
../net/tipc/name_distr.c:88: warning: Function parameter or member 'publ' not 
described in 'tipc_named_publish'
../net/tipc/name_distr.c:116: warning: Function parameter or member 'net' not 
described in 'tipc_named_withdraw'
../net/tipc/name_distr.c:116: warning: Function parameter or member 'publ' not 
described in 'tipc_named_withdraw'
../net/tipc/name_distr.c:147: warning: Function parameter or member 'net' not 
described in 'named_distribute'
../net/tipc/name_distr.c:147: warning: Function parameter or member 'seqno' not 
described in 'named_distribute'
../net/tipc/name_distr.c:199: warning: Function parameter or member 'net' not 
described in 'tipc_named_node_up'
../net/tipc/name_distr.c:199: warning: Function parameter or member 'dnode' not 
described in 'tipc_named_node_up'
../net/tipc/name_distr.c:199: warning: Function parameter or member 
'capabilities' not described in 'tipc_named_node_up'
../net/tipc/name_distr.c:225: warning: Function parameter or member 'net' not 
described in 'tipc_publ_purge'
../net/tipc/name_distr.c:225: warning: Function parameter or member 'publ' not 
described in 'tipc_publ_purge'
../net/tipc/name_distr.c:225: warning: Function parameter or member 'addr' not 
described in 'tipc_publ_purge'
../net/tipc/name_distr.c:272: warning: Function parameter or member 'net' not 
described in 'tipc_update_nametbl'
../net/tipc/name_distr.c:272: warning: Function parameter or member 'i' not 
described in 'tipc_update_nametbl'
../net/tipc/name_distr.c:272: warning: Function parameter or member 'node' not 
described in 'tipc_update_nametbl'
../net/tipc/name_distr.c:272: warning: Function parameter or member 'dtype' not 
described in 'tipc_update_nametbl'
../net/tipc/name_distr.c:353: warning: Function parameter or member 'net' not 
described in 'tipc_named_rcv'
../net/tipc/name_distr.c:353: warning: Function parameter or member 'namedq' 
not described in 'tipc_named_rcv'
../net/tipc/name_distr.c:353: warning: Function parameter or member 'rcv_nxt' 
not described in 'tipc_named_rcv'
../net/tipc/name_distr.c:353: warning: Function parameter or member 'open' not 
described in 'tipc_named_rcv'
../net/tipc/name_distr.c:383: warning: Function parameter or member 'net' not 
described in 'tipc_named_reinit'

Signed-off-by: Randy Dunlap 
Cc: Jon Maloy 
Cc: Ying Xue 
Cc: tipc-discuss...@lists.sourceforge.net
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
v2: rebase to current net-next

 net/tipc/name_distr.c |   27 +++
 1 file changed, 27 insertions(+)

--- net-next.orig/net/tipc/name_distr.c
+++ net-next/net/tipc/name_distr.c
@@ -50,6 +50,8 @@ struct distr_queue_item {
 
 /**
  * publ_to_item - add publication info to a publication message
+ * @p: publication info
+ * @i: location of item in the message
  */
 static void publ_to_item(struct distr_item *i, struct publication *p)
 {
@@ -62,6 +64,10 @@ static void publ_to_item(struct distr_it
 
 /**
  * named_prepare_buf - allocate & initialize a publication message
+ * @net: the associated network namespace
+ * @type: message type
+ * @size: payload size
+ * @dest: destination node
  *
  * The buffer returned is of size INT_H_SIZE + payload size
  */
@@ -83,6 +89,8 @@ static struct sk_buff *named_prepare_buf
 
 /**
  * tipc_named_publish - tell other nodes about a new publication by this node
+ * @net: the associated network namespace
+ * @publ: the new publication
  */
 struct sk_buff *tipc_named_publish(struct net *net, struct publication *publ)
 {
@@ -111,6 +119,8 @@ struct sk_buff *tipc_named_publish(struc
 
 /**
  * tipc_named_with

[PATCH 06/10 net-next v2] net/tipc: fix name_table.c kernel-doc

2020-11-29 Thread Randy Dunlap
Fix name_table.c kernel-doc warnings in preparation for adding to the
networking docbook.

../net/tipc/name_table.c:115: warning: Function parameter or member 'start' not 
described in 'service_range_foreach_match'
../net/tipc/name_table.c:115: warning: Function parameter or member 'end' not 
described in 'service_range_foreach_match'
../net/tipc/name_table.c:127: warning: Function parameter or member 'start' not 
described in 'service_range_match_first'
../net/tipc/name_table.c:127: warning: Function parameter or member 'end' not 
described in 'service_range_match_first'
../net/tipc/name_table.c:176: warning: Function parameter or member 'start' not 
described in 'service_range_match_next'
../net/tipc/name_table.c:176: warning: Function parameter or member 'end' not 
described in 'service_range_match_next'
../net/tipc/name_table.c:225: warning: Function parameter or member 'type' not 
described in 'tipc_publ_create'
../net/tipc/name_table.c:225: warning: Function parameter or member 'lower' not 
described in 'tipc_publ_create'
../net/tipc/name_table.c:225: warning: Function parameter or member 'upper' not 
described in 'tipc_publ_create'
../net/tipc/name_table.c:225: warning: Function parameter or member 'scope' not 
described in 'tipc_publ_create'
../net/tipc/name_table.c:225: warning: Function parameter or member 'node' not 
described in 'tipc_publ_create'
../net/tipc/name_table.c:225: warning: Function parameter or member 'port' not 
described in 'tipc_publ_create'
../net/tipc/name_table.c:225: warning: Function parameter or member 'key' not 
described in 'tipc_publ_create'
../net/tipc/name_table.c:252: warning: Function parameter or member 'type' not 
described in 'tipc_service_create'
../net/tipc/name_table.c:252: warning: Function parameter or member 'hd' not 
described in 'tipc_service_create'
../net/tipc/name_table.c:367: warning: Function parameter or member 'sr' not 
described in 'tipc_service_remove_publ'
../net/tipc/name_table.c:367: warning: Function parameter or member 'node' not 
described in 'tipc_service_remove_publ'
../net/tipc/name_table.c:367: warning: Function parameter or member 'key' not 
described in 'tipc_service_remove_publ'
../net/tipc/name_table.c:383: warning: Function parameter or member 'pa' not 
described in 'publication_after'
../net/tipc/name_table.c:383: warning: Function parameter or member 'pb' not 
described in 'publication_after'
../net/tipc/name_table.c:401: warning: Function parameter or member 'service' 
not described in 'tipc_service_subscribe'
../net/tipc/name_table.c:401: warning: Function parameter or member 'sub' not 
described in 'tipc_service_subscribe'
../net/tipc/name_table.c:546: warning: Function parameter or member 'net' not 
described in 'tipc_nametbl_translate'
../net/tipc/name_table.c:546: warning: Function parameter or member 'type' not 
described in 'tipc_nametbl_translate'
../net/tipc/name_table.c:546: warning: Function parameter or member 'instance' 
not described in 'tipc_nametbl_translate'
../net/tipc/name_table.c:546: warning: Function parameter or member 'dnode' not 
described in 'tipc_nametbl_translate'
../net/tipc/name_table.c:762: warning: Function parameter or member 'net' not 
described in 'tipc_nametbl_withdraw'
../net/tipc/name_table.c:762: warning: Function parameter or member 'type' not 
described in 'tipc_nametbl_withdraw'
../net/tipc/name_table.c:762: warning: Function parameter or member 'lower' not 
described in 'tipc_nametbl_withdraw'
../net/tipc/name_table.c:762: warning: Function parameter or member 'upper' not 
described in 'tipc_nametbl_withdraw'
../net/tipc/name_table.c:762: warning: Function parameter or member 'key' not 
described in 'tipc_nametbl_withdraw'
../net/tipc/name_table.c:796: warning: Function parameter or member 'sub' not 
described in 'tipc_nametbl_subscribe'
../net/tipc/name_table.c:826: warning: Function parameter or member 'sub' not 
described in 'tipc_nametbl_unsubscribe'
../net/tipc/name_table.c:876: warning: Function parameter or member 'net' not 
described in 'tipc_service_delete'
../net/tipc/name_table.c:876: warning: Function parameter or member 'sc' not 
described in 'tipc_service_delete'

Signed-off-by: Randy Dunlap 
Cc: Jon Maloy 
Cc: Ying Xue 
Cc: tipc-discuss...@lists.sourceforge.net
Cc: "

[PATCH 07/10 net-next v2] net/tipc: fix node.c kernel-doc

2020-11-29 Thread Randy Dunlap
Fix node.c kernel-doc warnings in preparation for adding to the
networking docbook.

../net/tipc/node.c:141: warning: Function parameter or member 'kref' not 
described in 'tipc_node'
../net/tipc/node.c:141: warning: Function parameter or member 'bc_entry' not 
described in 'tipc_node'
../net/tipc/node.c:141: warning: Function parameter or member 'failover_sent' 
not described in 'tipc_node'
../net/tipc/node.c:141: warning: Function parameter or member 'peer_id' not 
described in 'tipc_node'
../net/tipc/node.c:141: warning: Function parameter or member 'peer_id_string' 
not described in 'tipc_node'
../net/tipc/node.c:141: warning: Function parameter or member 'conn_sks' not 
described in 'tipc_node'
../net/tipc/node.c:141: warning: Function parameter or member 'keepalive_intv' 
not described in 'tipc_node'
../net/tipc/node.c:141: warning: Function parameter or member 'timer' not 
described in 'tipc_node'
../net/tipc/node.c:141: warning: Function parameter or member 'peer_net' not 
described in 'tipc_node'
../net/tipc/node.c:141: warning: Function parameter or member 'peer_hash_mix' 
not described in 'tipc_node'
../net/tipc/node.c:273: warning: Function parameter or member '__n' not 
described in 'tipc_node_crypto_rx'
../net/tipc/node.c:822: warning: Function parameter or member 'n' not described 
in '__tipc_node_link_up'
../net/tipc/node.c:822: warning: Function parameter or member 'bearer_id' not 
described in '__tipc_node_link_up'
../net/tipc/node.c:822: warning: Function parameter or member 'xmitq' not 
described in '__tipc_node_link_up'
../net/tipc/node.c:888: warning: Function parameter or member 'n' not described 
in 'tipc_node_link_up'
../net/tipc/node.c:888: warning: Function parameter or member 'bearer_id' not 
described in 'tipc_node_link_up'
../net/tipc/node.c:888: warning: Function parameter or member 'xmitq' not 
described in 'tipc_node_link_up'
../net/tipc/node.c:948: warning: Function parameter or member 'n' not described 
in '__tipc_node_link_down'
../net/tipc/node.c:948: warning: Function parameter or member 'bearer_id' not 
described in '__tipc_node_link_down'
../net/tipc/node.c:948: warning: Function parameter or member 'xmitq' not 
described in '__tipc_node_link_down'
../net/tipc/node.c:948: warning: Function parameter or member 'maddr' not 
described in '__tipc_node_link_down'
../net/tipc/node.c:1537: warning: Function parameter or member 'net' not 
described in 'tipc_node_get_linkname'
../net/tipc/node.c:1537: warning: Function parameter or member 'len' not 
described in 'tipc_node_get_linkname'
../net/tipc/node.c:1891: warning: Function parameter or member 'n' not 
described in 'tipc_node_check_state'
../net/tipc/node.c:1891: warning: Function parameter or member 'xmitq' not 
described in 'tipc_node_check_state'

Signed-off-by: Randy Dunlap 
Cc: Jon Maloy 
Cc: Ying Xue 
Cc: tipc-discuss...@lists.sourceforge.net
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
v2: rebase to current net-next

 net/tipc/node.c |   26 +-
 1 file changed, 25 insertions(+), 1 deletion(-)

--- net-next.orig/net/tipc/node.c
+++ net-next/net/tipc/node.c
@@ -82,7 +82,7 @@ struct tipc_bclink_entry {
 /**
  * struct tipc_node - TIPC node structure
  * @addr: network address of node
- * @ref: reference counter to node object
+ * @kref: reference counter to node object
  * @lock: rwlock governing access to structure
  * @net: the applicable net namespace
  * @hash: links to adjacent nodes in unsorted hash chain
@@ -90,9 +90,11 @@ struct tipc_bclink_entry {
  * @namedq: pointer to name table input queue with name table messages
  * @active_links: bearer ids of active links, used as index into links[] array
  * @links: array containing references to all links to node
+ * @bc_entry: broadcast link entry
  * @action_flags: bit mask of different types of node actions
  * @state: connectivity state vs peer node
  * @preliminary: a preliminary node or not
+ * @failover_sent: failover sent or not
  * @sync_point: sequence number where synch/failover is finished
  * @list: links to adjacent nodes in sorted list of cluster's nodes
  * @working_links: number of working links to node (both active and standby)
@@ -100,9 +102,16 @@ struct tipc_bclink_entry {
  * @capabilities: bitmap, indicating peer node's functional capabilities
  * @signature: node instance identifier
  * @link_id: local and remote bearer ids of changing link, if any
+ * @peer_id: 128-bit ID of peer
+ * @peer_id_s

[PATCH 09/10 net-next v2] net/tipc: fix all function Return: notation

2020-11-29 Thread Randy Dunlap
Fix Return: kernel-doc notation in all net/tipc/ source files.
Also keep ReST list notation intact for output formatting.
Fix a few typos in comments.

Signed-off-by: Randy Dunlap 
Cc: Jon Maloy 
Cc: Ying Xue 
Cc: tipc-discuss...@lists.sourceforge.net
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
v2: rebase to current net-next

 net/tipc/bearer.c |2 -
 net/tipc/crypto.c |   38 +-
 net/tipc/discover.c   |2 -
 net/tipc/link.c   |8 ++---
 net/tipc/msg.c|   19 +++--
 net/tipc/name_distr.c |2 -
 net/tipc/node.c   |6 ++--
 net/tipc/socket.c |   57 +++-
 net/tipc/subscr.c |2 -
 9 files changed, 68 insertions(+), 68 deletions(-)

--- net-next.orig/net/tipc/bearer.c
+++ net-next/net/tipc/bearer.c
@@ -132,7 +132,7 @@ int tipc_media_addr_printf(char *buf, in
  * @name: ptr to bearer name string
  * @name_parts: ptr to area for bearer name components (or NULL if not needed)
  *
- * Returns 1 if bearer name is valid, otherwise 0.
+ * Return: 1 if bearer name is valid, otherwise 0.
  */
 static int bearer_name_validate(const char *name,
struct tipc_bearer_names *name_parts)
--- net-next.orig/net/tipc/crypto.c
+++ net-next/net/tipc/crypto.c
@@ -721,9 +721,9 @@ static void *tipc_aead_mem_alloc(struct
  * @__dnode: TIPC dest node if "known"
  *
  * Return:
- * 0   : if the encryption has completed
- * -EINPROGRESS/-EBUSY : if a callback will be performed
- * < 0 : the encryption has failed
+ * * 0   : if the encryption has completed
+ * * -EINPROGRESS/-EBUSY : if a callback will be performed
+ * * < 0 : the encryption has failed
  */
 static int tipc_aead_encrypt(struct tipc_aead *aead, struct sk_buff *skb,
 struct tipc_bearer *b,
@@ -877,9 +877,9 @@ static void tipc_aead_encrypt_done(struc
  * @b: TIPC bearer where the message has been received
  *
  * Return:
- * 0   : if the decryption has completed
- * -EINPROGRESS/-EBUSY : if a callback will be performed
- * < 0 : the decryption has failed
+ * * 0   : if the decryption has completed
+ * * -EINPROGRESS/-EBUSY : if a callback will be performed
+ * * < 0 : the decryption has failed
  */
 static int tipc_aead_decrypt(struct net *net, struct tipc_aead *aead,
 struct sk_buff *skb, struct tipc_bearer *b)
@@ -1008,7 +1008,7 @@ static inline int tipc_ehdr_size(struct
  * tipc_ehdr_validate - Validate an encryption message
  * @skb: the message buffer
  *
- * Returns "true" if this is a valid encryption message, otherwise "false"
+ * Return: "true" if this is a valid encryption message, otherwise "false"
  */
 bool tipc_ehdr_validate(struct sk_buff *skb)
 {
@@ -1681,12 +1681,12 @@ static inline void tipc_crypto_clone_msg
  * Otherwise, the skb is freed!
  *
  * Return:
- * 0   : the encryption has succeeded (or no encryption)
- * -EINPROGRESS/-EBUSY : the encryption is ongoing, a callback will be made
- * -ENOKEK : the encryption has failed due to no key
- * -EKEYREVOKED: the encryption has failed due to key revoked
- * -ENOMEM : the encryption has failed due to no memory
- * < 0 : the encryption has failed due to other reasons
+ * * 0   : the encryption has succeeded (or no encryption)
+ * * -EINPROGRESS/-EBUSY : the encryption is ongoing, a callback will be made
+ * * -ENOKEK : the encryption has failed due to no key
+ * * -EKEYREVOKED: the encryption has failed due to key revoked
+ * * -ENOMEM : the encryption has failed due to no memory
+ * * < 0 : the encryption has failed due to other reasons
  */
 int tipc_crypto_xmit(struct net *net, struct sk_buff **skb,
 struct tipc_bearer *b, struct tipc_media_addr *dst,
@@ -1806,12 +1806,12 @@ exit:
  * cluster key(s) can be taken for decryption (- recursive).
  *
  * Return:
- * 0   : the decryption has successfully completed
- * -EINPROGRESS/-EBUSY : the decryption is ongoing, a callback will be made
- * -ENOKEY : the decryption has failed due to no key
- * -EBADMSG: the decryption has failed due to bad message
- * -ENOMEM : the decryption has failed due to no memory
- * < 0 : the decryption has failed due to other reasons
+ * * 0   : the decryption has successfully completed
+ * * -EINPROGRESS/-EBUSY : the decryption is ongoing, a callback will be made
+ * * -ENOKEY : the decryption has failed due to no key
+ * * -EBADMSG: the decryption has failed due to bad message
+ * * -ENOMEM : the decryption has failed due to no memory
+ * * < 0  

[PATCH 10/10 net-next v2] net/tipc: add TIPC chapter to networking Documentation

2020-11-29 Thread Randy Dunlap
Add a TIPC chapter to the networking docbook.

Signed-off-by: Randy Dunlap 
Cc: Jon Maloy 
Cc: Ying Xue 
Cc: tipc-discuss...@lists.sourceforge.net
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
v2: rebase to current net-next

 Documentation/networking/index.rst |1 
 Documentation/networking/tipc.rst  |  101 +++
 2 files changed, 102 insertions(+)

--- net-next.orig/Documentation/networking/index.rst
+++ net-next/Documentation/networking/index.rst
@@ -101,6 +101,7 @@ Contents:
tcp-thin
team
timestamping
+   tipc
tproxy
tuntap
udplite
--- /dev/null
+++ net-next/Documentation/networking/tipc.rst
@@ -0,0 +1,101 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+=
+Linux Kernel TIPC
+=
+
+TIPC (Transparent Inter Process Communication) is a protocol that is
+specially designed for intra-cluster communication.
+
+For more information about TIPC, see http://tipc.sourceforge.net.
+
+TIPC Base Types
+---
+
+.. kernel-doc:: net/tipc/subscr.h
+   :internal:
+
+.. kernel-doc:: net/tipc/bearer.h
+   :internal:
+
+.. kernel-doc:: net/tipc/name_table.h
+   :internal:
+
+.. kernel-doc:: net/tipc/name_distr.h
+   :internal:
+
+.. kernel-doc:: net/tipc/bcast.c
+   :internal:
+
+TIPC Bearer Interfaces
+--
+
+.. kernel-doc:: net/tipc/bearer.c
+   :internal:
+
+.. kernel-doc:: net/tipc/udp_media.c
+   :internal:
+
+TIPC Crypto Interfaces
+--
+
+.. kernel-doc:: net/tipc/crypto.c
+   :internal:
+
+TIPC Discoverer Interfaces
+--
+
+.. kernel-doc:: net/tipc/discover.c
+   :internal:
+
+TIPC Link Interfaces
+
+
+.. kernel-doc:: net/tipc/link.c
+   :internal:
+
+TIPC msg Interfaces
+---
+
+.. kernel-doc:: net/tipc/msg.c
+   :internal:
+
+TIPC Name Interfaces
+
+
+.. kernel-doc:: net/tipc/name_table.c
+   :internal:
+
+.. kernel-doc:: net/tipc/name_distr.c
+   :internal:
+
+TIPC Node Management Interfaces
+---
+
+.. kernel-doc:: net/tipc/node.c
+   :internal:
+
+TIPC Socket Interfaces
+--
+
+.. kernel-doc:: net/tipc/socket.c
+   :internal:
+
+TIPC Network Topology Interfaces
+
+
+.. kernel-doc:: net/tipc/subscr.c
+   :internal:
+
+TIPC Server Interfaces
+--
+
+.. kernel-doc:: net/tipc/topsrv.c
+   :internal:
+
+TIPC Trace Interfaces
+-
+
+.. kernel-doc:: net/tipc/trace.c
+   :internal:
+


[PATCH 02/10 net-next v2] net/tipc: fix various kernel-doc warnings

2020-11-29 Thread Randy Dunlap
kernel-doc and Sphinx fixes to eliminate lots of warnings
in preparation for adding to the networking docbook.

../net/tipc/crypto.c:57: warning: cannot understand function prototype: 'enum '
../net/tipc/crypto.c:69: warning: cannot understand function prototype: 'enum '
../net/tipc/crypto.c:130: warning: Function parameter or member 'tfm' not 
described in 'tipc_tfm'
../net/tipc/crypto.c:130: warning: Function parameter or member 'list' not 
described in 'tipc_tfm'
../net/tipc/crypto.c:172: warning: Function parameter or member 'stat' not 
described in 'tipc_crypto_stats'
../net/tipc/crypto.c:232: warning: Function parameter or member 'flags' not 
described in 'tipc_crypto'
../net/tipc/crypto.c:329: warning: Function parameter or member 'ukey' not 
described in 'tipc_aead_key_validate'
../net/tipc/crypto.c:329: warning: Function parameter or member 'info' not 
described in 'tipc_aead_key_validate'
../net/tipc/crypto.c:482: warning: Function parameter or member 'aead' not 
described in 'tipc_aead_tfm_next'
../net/tipc/trace.c:43: warning: cannot understand function prototype: 
'unsigned long sysctl_tipc_sk_filter[5] __read_mostly = '

Documentation/networking/tipc:57: ../net/tipc/msg.c:584: WARNING: Unexpected 
indentation.
Documentation/networking/tipc:63: ../net/tipc/name_table.c:536: WARNING: 
Unexpected indentation.
Documentation/networking/tipc:63: ../net/tipc/name_table.c:537: WARNING: Block 
quote ends without a blank line; unexpected unindent.
Documentation/networking/tipc:78: ../net/tipc/socket.c:3809: WARNING: 
Unexpected indentation.
Documentation/networking/tipc:78: ../net/tipc/socket.c:3807: WARNING: Inline 
strong start-string without end-string.
Documentation/networking/tipc:72: ../net/tipc/node.c:904: WARNING: Unexpected 
indentation.
Documentation/networking/tipc:39: ../net/tipc/crypto.c:97: WARNING: Block quote 
ends without a blank line; unexpected unindent.
Documentation/networking/tipc:39: ../net/tipc/crypto.c:98: WARNING: Block quote 
ends without a blank line; unexpected unindent.
Documentation/networking/tipc:39: ../net/tipc/crypto.c:141: WARNING: Inline 
strong start-string without end-string.

../net/tipc/discover.c:82: warning: Function parameter or member 'skb' not 
described in 'tipc_disc_init_msg'

../net/tipc/msg.c:69: warning: Function parameter or member 'gfp' not described 
in 'tipc_buf_acquire'
../net/tipc/msg.c:382: warning: Function parameter or member 'offset' not 
described in 'tipc_msg_build'
../net/tipc/msg.c:708: warning: Function parameter or member 'net' not 
described in 'tipc_msg_lookup_dest'

../net/tipc/subscr.c:65: warning: Function parameter or member 'seq' not 
described in 'tipc_sub_check_overlap'
../net/tipc/subscr.c:65: warning: Function parameter or member 'found_lower' 
not described in 'tipc_sub_check_overlap'
../net/tipc/subscr.c:65: warning: Function parameter or member 'found_upper' 
not described in 'tipc_sub_check_overlap'

../net/tipc/udp_media.c:75: warning: Function parameter or member 'proto' not 
described in 'udp_media_addr'
../net/tipc/udp_media.c:75: warning: Function parameter or member 'port' not 
described in 'udp_media_addr'
../net/tipc/udp_media.c:75: warning: Function parameter or member 'ipv4' not 
described in 'udp_media_addr'
../net/tipc/udp_media.c:75: warning: Function parameter or member 'ipv6' not 
described in 'udp_media_addr'
../net/tipc/udp_media.c:98: warning: Function parameter or member 'rcast' not 
described in 'udp_bearer'

Also fixed a typo of "duest" to "dest".

Signed-off-by: Randy Dunlap 
Cc: Jon Maloy 
Cc: Ying Xue 
Cc: tipc-discuss...@lists.sourceforge.net
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
v2: fix typo duest->dest (thanks Ying Xue)
rebase to current net-next

 net/tipc/crypto.c |   17 -
 net/tipc/discover.c   |3 ++-
 net/tipc/msg.c|   10 +++---
 net/tipc/name_table.c |4 ++--
 net/tipc/node.c   |5 +++--
 net/tipc/socket.c |4 ++--
 net/tipc/subscr.c |6 --
 net/tipc/trace.c  |2 +-
 net/tipc/udp_media.c  |8 +++-
 9 files changed, 40 insertions(+), 19 deletions(-)

--- net-next.orig/net/tipc/crypto.c
+++ net-next/net/tipc/crypto.c
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * net/tipc/crypto.c: TIPC crypto for key handling & packet en/decryption
  *
  * Copyright (c) 2019, Ericsson AB
@@ -51,7 +51,7 @@
 
 #define TIPC_REKEYING_INTV_DEF (60 * 24) /* default: 1 day */
 
-/**
+/*
  * TIPC Key ids
  */
 enum {
@@ -63,7 +63,7 @@ enum {
KEY_MAX = KEY_3,
 }

[PATCH 08/10 net-next v2] net/tipc: fix socket.c kernel-doc

2020-11-29 Thread Randy Dunlap
Fix socket.c kernel-doc warnings in preparation for adding to the
networking docbook.

Also, for rcvbuf_limit(), use bullet notation so that the lines do
not run together.

../net/tipc/socket.c:130: warning: Function parameter or member 'cong_links' 
not described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'probe_unacked' 
not described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'snd_win' not 
described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'peer_caps' not 
described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'rcv_win' not 
described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'group' not 
described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'oneway' not 
described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'nagle_start' 
not described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'snd_backlog' 
not described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'msg_acc' not 
described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'pkt_cnt' not 
described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'expect_ack' 
not described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'nodelay' not 
described in 'tipc_sock'
../net/tipc/socket.c:130: warning: Function parameter or member 'group_is_open' 
not described in 'tipc_sock'
../net/tipc/socket.c:267: warning: Function parameter or member 'sk' not 
described in 'tsk_advance_rx_queue'
../net/tipc/socket.c:295: warning: Function parameter or member 'sk' not 
described in 'tsk_rej_rx_queue'
../net/tipc/socket.c:295: warning: Function parameter or member 'error' not 
described in 'tsk_rej_rx_queue'
../net/tipc/socket.c:894: warning: Function parameter or member 'tsk' not 
described in 'tipc_send_group_msg'
../net/tipc/socket.c:1187: warning: Function parameter or member 'net' not 
described in 'tipc_sk_mcast_rcv'
../net/tipc/socket.c:1323: warning: Function parameter or member 'inputq' not 
described in 'tipc_sk_conn_proto_rcv'
../net/tipc/socket.c:1323: warning: Function parameter or member 'xmitq' not 
described in 'tipc_sk_conn_proto_rcv'
../net/tipc/socket.c:1885: warning: Function parameter or member 'sock' not 
described in 'tipc_recvmsg'
../net/tipc/socket.c:1993: warning: Function parameter or member 'sock' not 
described in 'tipc_recvstream'
../net/tipc/socket.c:2313: warning: Function parameter or member 'xmitq' not 
described in 'tipc_sk_filter_rcv'
../net/tipc/socket.c:2404: warning: Function parameter or member 'xmitq' not 
described in 'tipc_sk_enqueue'
../net/tipc/socket.c:2456: warning: Function parameter or member 'net' not 
described in 'tipc_sk_rcv'
../net/tipc/socket.c:2693: warning: Function parameter or member 'kern' not 
described in 'tipc_accept'
../net/tipc/socket.c:3816: warning: Excess function parameter 
'sysctl_tipc_sk_filter' description in 'tipc_sk_filtering'

Signed-off-by: Randy Dunlap 
Cc: Jon Maloy 
Cc: Ying Xue 
Cc: tipc-discuss...@lists.sourceforge.net
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
v2: rebase to current net-next

 net/tipc/socket.c |   31 +--
 1 file changed, 29 insertions(+), 2 deletions(-)

--- net-next.orig/net/tipc/socket.c
+++ net-next/net/tipc/socket.c
@@ -80,19 +80,32 @@ struct sockaddr_pair {
  * @maxnagle: maximum size of msg which can be subject to nagle
  * @portid: unique port identity in TIPC socket hash table
  * @phdr: preformatted message header used when sending messages
- * #cong_links: list of congested links
+ * @cong_links: list of congested links
  * @publications: list of publications for port
  * @blocking_link: address of the congested link we are currently sleeping on
  * @pub_count: total # of publications port has made during its lifetime
  * @conn_timeout: the time we can wait for an unresponded setup request
+ * @probe_unacked: probe has not received ack yet
  * @dupl_rcvcnt: number of bytes counted twice, in both backlog and rcv queue
  * @cong_link_cnt: number of congested links
  * @snt_unacked: # messages sent by socket, and not yet acked by peer
+ * @snd_win: send window size
+ * @

[PATCH net-next] net: kcov: don't select SKB_EXTENSIONS when there is no NET

2020-11-10 Thread Randy Dunlap
Fix kconfig warning when CONFIG_NET is not set/enabled:

WARNING: unmet direct dependencies detected for SKB_EXTENSIONS
  Depends on [n]: NET [=n]
  Selected by [y]:
  - KCOV [=y] && ARCH_HAS_KCOV [=y] && (CC_HAS_SANCOV_TRACE_PC [=y] || 
GCC_PLUGINS [=n])

Fixes: 6370cc3bbd8a ("net: add kcov handle to skb extensions")
Signed-off-by: Randy Dunlap 
Cc: Aleksandr Nogikh 
Cc: Willem de Bruijn 
Cc: Jakub Kicinski 
Cc: linux-n...@vger.kernel.org
Cc: netdev@vger.kernel.org
---
This is from linux-next. I'm only guessing that it is in net-next.

 lib/Kconfig.debug |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20201110.orig/lib/Kconfig.debug
+++ linux-next-20201110/lib/Kconfig.debug
@@ -1874,7 +1874,7 @@ config KCOV
depends on CC_HAS_SANCOV_TRACE_PC || GCC_PLUGINS
select DEBUG_FS
select GCC_PLUGIN_SANCOV if !CC_HAS_SANCOV_TRACE_PC
-   select SKB_EXTENSIONS
+   select SKB_EXTENSIONS if NET
help
  KCOV exposes kernel code coverage information in a form suitable
  for coverage-guided fuzzing (randomized testing).


Re: Duplicated ABI entries - Was: Re: [PATCH v2 20/39] docs: ABI: testing: make the files compatible with ReST output

2020-11-10 Thread Randy Dunlap
On 11/9/20 11:26 PM, Mauro Carvalho Chehab wrote:
> Hi Jonathan,
> 
> Let's view ABI from the PoV of a system admin that doesn't know
> yet about a certain ABI symbol.
> 
> He'll try to seek for the symbol, more likely using the HTML 
> documentation. Only very senior system admins might try to take
> a look at the Kernel.

FWIW, I think that the likely search methods are $search_engine
and 'grep'.

Have a good few days off.

-- 
~Randy



[PATCH net-next] net: linux/skbuff.h: combine NET + KCOV handling

2020-11-13 Thread Randy Dunlap
The previous Kconfig patch led to some other build errors as
reported by the 0day bot and my own overnight build testing.

These are all in  when KCOV is enabled but
NET is not enabled, so fix those by combining those conditions
in the header file.

Fixes: 6370cc3bbd8a ("net: add kcov handle to skb extensions")
Fixes: 85ce50d337d1 ("net: kcov: don't select SKB_EXTENSIONS when there is no 
NET")
Signed-off-by: Randy Dunlap 
Reported-by: kernel test robot 
Cc: Aleksandr Nogikh 
Cc: Willem de Bruijn 
Cc: Jakub Kicinski 
Cc: linux-n...@vger.kernel.org
Cc: netdev@vger.kernel.org
---
 include/linux/skbuff.h |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- linux-next-20201113.orig/include/linux/skbuff.h
+++ linux-next-20201113/include/linux/skbuff.h
@@ -4151,7 +4151,7 @@ enum skb_ext_id {
 #if IS_ENABLED(CONFIG_MPTCP)
SKB_EXT_MPTCP,
 #endif
-#if IS_ENABLED(CONFIG_KCOV)
+#if IS_ENABLED(CONFIG_KCOV) && IS_ENABLED(CONFIG_NET)
SKB_EXT_KCOV_HANDLE,
 #endif
SKB_EXT_NUM, /* must be last */
@@ -4608,7 +4608,7 @@ static inline void skb_reset_redirect(st
 #endif
 }
 
-#ifdef CONFIG_KCOV
+#if IS_ENABLED(CONFIG_KCOV) && IS_ENABLED(CONFIG_NET)
 static inline void skb_set_kcov_handle(struct sk_buff *skb,
   const u64 kcov_handle)
 {
@@ -4636,7 +4636,7 @@ static inline u64 skb_get_kcov_handle(st
 static inline void skb_set_kcov_handle(struct sk_buff *skb,
   const u64 kcov_handle) { }
 static inline u64 skb_get_kcov_handle(struct sk_buff *skb) { return 0; }
-#endif /* CONFIG_KCOV */
+#endif /* CONFIG_KCOV &&  CONFIG_NET */
 
 #endif /* __KERNEL__ */
 #endif /* _LINUX_SKBUFF_H */


Re: [PATCH net-next] net: linux/skbuff.h: combine NET + KCOV handling

2020-11-14 Thread Randy Dunlap
On 11/14/20 12:01 AM, Matthieu Baerts wrote:
> Hi Randy,
> 
> On 14/11/2020 02:11, Randy Dunlap wrote:
>> The previous Kconfig patch led to some other build errors as
>> reported by the 0day bot and my own overnight build testing.
> 
> Thank you for looking at that!
> 
> I had the same issue and I was going to propose a similar fix with one small 
> difference, please see below.
> 
>> --- linux-next-20201113.orig/include/linux/skbuff.h
>> +++ linux-next-20201113/include/linux/skbuff.h
>> @@ -4608,7 +4608,7 @@ static inline void skb_reset_redirect(st
>>   #endif
>>   }
>>   -#ifdef CONFIG_KCOV
>> +#if IS_ENABLED(CONFIG_KCOV) && IS_ENABLED(CONFIG_NET)
>>   static inline void skb_set_kcov_handle(struct sk_buff *skb,
> Should we have here CONFIG_SKB_EXTENSIONS instead of CONFIG_NET?
> 
> It is valid to use NET thanks to your commit 85ce50d337d1 ("net: kcov: don't 
> select SKB_EXTENSIONS when there is no NET") that links SKB_EXTENSIONS with 
> NET for KCOV but it looks strange to me to use a "non direct" dependence :)
> I mean: here below, skb_ext_add() and skb_ext_find() are called but they are 
> defined only if SKB_EXTENSIONS is enabled, not only NET.
> 
> But as I said, this patch fixes the issue. It's fine for me if we prefer to 
> use CONFIG_NET.

I think it would be safer to use CONFIG_SKB_EXTENSIONS.

>> @@ -4636,7 +4636,7 @@ static inline u64 skb_get_kcov_handle(st
>>   static inline void skb_set_kcov_handle(struct sk_buff *skb,
>>  const u64 kcov_handle) { }
>>   static inline u64 skb_get_kcov_handle(struct sk_buff *skb) { return 0; }
>> -#endif /* CONFIG_KCOV */
>> +#endif /* CONFIG_KCOV &&  CONFIG_NET */
> 
> (Small detail if you post a v2: there is an extra space between "&&" and 
> "CONFIG_NET")

Oops. Fixed in v2. Thanks for looking.

v2 on the way.

-- 
~Randy



[PATCH net-next v2] net: linux/skbuff.h: combine SKB_EXTENSIONS + KCOV handling

2020-11-14 Thread Randy Dunlap
The previous Kconfig patch led to some other build errors as
reported by the 0day bot and my own overnight build testing.

These are all in  when KCOV is enabled but
SKB_EXTENSIONS is not enabled, so fix those by combining those conditions
in the header file.

Fixes: 6370cc3bbd8a ("net: add kcov handle to skb extensions")
Fixes: 85ce50d337d1 ("net: kcov: don't select SKB_EXTENSIONS when there is no 
NET")
Signed-off-by: Randy Dunlap 
Reported-by: kernel test robot 
Cc: Aleksandr Nogikh 
Cc: Willem de Bruijn 
Cc: Jakub Kicinski 
Cc: linux-n...@vger.kernel.org
Cc: netdev@vger.kernel.org
---
v2: (as suggested by Matthieu Baerts )
  drop an extraneous space in a comment;
  use CONFIG_SKB_EXTENSIONS instead of CONFIG_NET;

 include/linux/skbuff.h |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- linux-next-20201113.orig/include/linux/skbuff.h
+++ linux-next-20201113/include/linux/skbuff.h
@@ -4151,7 +4151,7 @@ enum skb_ext_id {
 #if IS_ENABLED(CONFIG_MPTCP)
SKB_EXT_MPTCP,
 #endif
-#if IS_ENABLED(CONFIG_KCOV)
+#if IS_ENABLED(CONFIG_KCOV) && IS_ENABLED(CONFIG_SKB_EXTENSIONS)
SKB_EXT_KCOV_HANDLE,
 #endif
SKB_EXT_NUM, /* must be last */
@@ -4608,7 +4608,7 @@ static inline void skb_reset_redirect(st
 #endif
 }
 
-#ifdef CONFIG_KCOV
+#if IS_ENABLED(CONFIG_KCOV) && IS_ENABLED(CONFIG_SKB_EXTENSIONS)
 static inline void skb_set_kcov_handle(struct sk_buff *skb,
   const u64 kcov_handle)
 {
@@ -4636,7 +4636,7 @@ static inline u64 skb_get_kcov_handle(st
 static inline void skb_set_kcov_handle(struct sk_buff *skb,
   const u64 kcov_handle) { }
 static inline u64 skb_get_kcov_handle(struct sk_buff *skb) { return 0; }
-#endif /* CONFIG_KCOV */
+#endif /* CONFIG_KCOV && CONFIG_SKB_EXTENSIONS */
 
 #endif /* __KERNEL__ */
 #endif /* _LINUX_SKBUFF_H */


Re: [PATCH net-next v2] net: linux/skbuff.h: combine SKB_EXTENSIONS + KCOV handling

2020-11-14 Thread Randy Dunlap
On 11/14/20 11:54 AM, Jakub Kicinski wrote:
> On Sat, 14 Nov 2020 09:46:18 -0800 Randy Dunlap wrote:
>> The previous Kconfig patch led to some other build errors as
>> reported by the 0day bot and my own overnight build testing.
>>
>> These are all in  when KCOV is enabled but
>> SKB_EXTENSIONS is not enabled, so fix those by combining those conditions
>> in the header file.
>>
>> Fixes: 6370cc3bbd8a ("net: add kcov handle to skb extensions")
>> Fixes: 85ce50d337d1 ("net: kcov: don't select SKB_EXTENSIONS when there is 
>> no NET")
>> Signed-off-by: Randy Dunlap 
>> Reported-by: kernel test robot 
>> Cc: Aleksandr Nogikh 
>> Cc: Willem de Bruijn 
>> Cc: Jakub Kicinski 
>> Cc: linux-n...@vger.kernel.org
>> Cc: netdev@vger.kernel.org
>> ---
>> v2: (as suggested by Matthieu Baerts )
>>   drop an extraneous space in a comment;
>>   use CONFIG_SKB_EXTENSIONS instead of CONFIG_NET;
> 
> Thanks for the fix Randy!
> 
>> --- linux-next-20201113.orig/include/linux/skbuff.h
>> +++ linux-next-20201113/include/linux/skbuff.h
>> @@ -4151,7 +4151,7 @@ enum skb_ext_id {
>>  #if IS_ENABLED(CONFIG_MPTCP)
>>  SKB_EXT_MPTCP,
>>  #endif
>> -#if IS_ENABLED(CONFIG_KCOV)
>> +#if IS_ENABLED(CONFIG_KCOV) && IS_ENABLED(CONFIG_SKB_EXTENSIONS)
> 
> I don't think this part is necessary, this is already under an ifdef:
> 
> #ifdef CONFIG_SKB_EXTENSIONS
> enum skb_ext_id {
> 
> if I'm reading the code right.

Oops, you are correct. Sorry I missed that.


> That said I don't know why the enum is under CONFIG_SKB_EXTENSIONS in
> the first place.
> 
> If extensions are not used doesn't matter if we define the enum and with
> how many entries.
> 
> At the same time if we take the enum from under the ifdef and add stubs
> for skb_ext_add() and skb_ext_find() we could actually remove the stubs
> for kcov-related helpers. That seems cleaner and less ifdefy to me.
> 
> WDYT?

Good thing I am on my third cup of coffee.

OK, it looks like that should work -- with less #ifdef-ery.

I'll work at it...


>>  SKB_EXT_KCOV_HANDLE,
>>  #endif
>>  SKB_EXT_NUM, /* must be last */
>> @@ -4608,7 +4608,7 @@ static inline void skb_reset_redirect(st
>>  #endif
>>  }
>>  
>> -#ifdef CONFIG_KCOV
>> +#if IS_ENABLED(CONFIG_KCOV) && IS_ENABLED(CONFIG_SKB_EXTENSIONS)
>>  static inline void skb_set_kcov_handle(struct sk_buff *skb,
>> const u64 kcov_handle)
>>  {
>> @@ -4636,7 +4636,7 @@ static inline u64 skb_get_kcov_handle(st
>>  static inline void skb_set_kcov_handle(struct sk_buff *skb,
>> const u64 kcov_handle) { }
>>  static inline u64 skb_get_kcov_handle(struct sk_buff *skb) { return 0; }
>> -#endif /* CONFIG_KCOV */
>> +#endif /* CONFIG_KCOV && CONFIG_SKB_EXTENSIONS */
>>  
>>  #endif  /* __KERNEL__ */
>>  #endif  /* _LINUX_SKBUFF_H */
> 

thanks.
-- 
~Randy



[PATCH net-next v3] net: linux/skbuff.h: combine SKB_EXTENSIONS + KCOV handling

2020-11-14 Thread Randy Dunlap
The previous Kconfig patch led to some other build errors as
reported by the 0day bot and my own overnight build testing.

These are all in  when KCOV is enabled but
SKB_EXTENSIONS is not enabled, so fix those by combining those conditions
in the header file.

Also, add stubs for skb_ext_add() and skb_ext_find() to reduce the
amount of ifdef-ery. (Jakub)

Fixes: 6370cc3bbd8a ("net: add kcov handle to skb extensions")
Fixes: 85ce50d337d1 ("net: kcov: don't select SKB_EXTENSIONS when there is no 
NET")
Signed-off-by: Randy Dunlap 
Reported-by: kernel test robot 
Cc: Aleksandr Nogikh 
Cc: Willem de Bruijn 
Cc: Jakub Kicinski 
Cc: linux-n...@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: Matthieu Baerts 
---
v3: (as suggested by Jakub Kicinski )
  add stubs for skb_ext_add() and skb_ext_find() to reduce the ifdef-ery
v2: (as suggested by Matthieu Baerts )
  drop an extraneous space in a comment;
  use CONFIG_SKB_EXTENSIONS instead of CONFIG_NET;

 include/linux/skbuff.h |   12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

--- linux-next-20201113.orig/include/linux/skbuff.h
+++ linux-next-20201113/include/linux/skbuff.h
@@ -4137,7 +4137,6 @@ static inline void skb_set_nfct(struct s
 #endif
 }
 
-#ifdef CONFIG_SKB_EXTENSIONS
 enum skb_ext_id {
 #if IS_ENABLED(CONFIG_BRIDGE_NETFILTER)
SKB_EXT_BRIDGE_NF,
@@ -4157,6 +4156,7 @@ enum skb_ext_id {
SKB_EXT_NUM, /* must be last */
 };
 
+#ifdef CONFIG_SKB_EXTENSIONS
 /**
  * struct skb_ext - sk_buff extensions
  * @refcnt: 1 on allocation, deallocated on 0
@@ -4252,6 +4252,10 @@ static inline void skb_ext_del(struct sk
 static inline void __skb_ext_copy(struct sk_buff *d, const struct sk_buff *s) 
{}
 static inline void skb_ext_copy(struct sk_buff *dst, const struct sk_buff *s) 
{}
 static inline bool skb_has_extensions(struct sk_buff *skb) { return false; }
+static inline void *skb_ext_add(struct sk_buff *skb, enum skb_ext_id id)
+{ return NULL; }
+static inline void *skb_ext_find(const struct sk_buff *skb, enum skb_ext_id id)
+{ return NULL; }
 #endif /* CONFIG_SKB_EXTENSIONS */
 
 static inline void nf_reset_ct(struct sk_buff *skb)
@@ -4608,7 +4612,6 @@ static inline void skb_reset_redirect(st
 #endif
 }
 
-#ifdef CONFIG_KCOV
 static inline void skb_set_kcov_handle(struct sk_buff *skb,
   const u64 kcov_handle)
 {
@@ -4632,11 +4635,6 @@ static inline u64 skb_get_kcov_handle(st
 
return kcov_handle ? *kcov_handle : 0;
 }
-#else
-static inline void skb_set_kcov_handle(struct sk_buff *skb,
-  const u64 kcov_handle) { }
-static inline u64 skb_get_kcov_handle(struct sk_buff *skb) { return 0; }
-#endif /* CONFIG_KCOV */
 
 #endif /* __KERNEL__ */
 #endif /* _LINUX_SKBUFF_H */


[PATCH net-next v4] net: linux/skbuff.h: combine SKB_EXTENSIONS + KCOV handling

2020-11-15 Thread Randy Dunlap
The previous Kconfig patch led to some other build errors as
reported by the 0day bot and my own overnight build testing.

These are all in  when KCOV is enabled but
SKB_EXTENSIONS is not enabled, so fix those by combining those conditions
in the header file.

Also, add stubs for skb_ext_add() and skb_ext_find() to reduce the
amount of ifdef-ery. (Jakub)

Fixes: 6370cc3bbd8a ("net: add kcov handle to skb extensions")
Fixes: 85ce50d337d1 ("net: kcov: don't select SKB_EXTENSIONS when there is no 
NET")
Signed-off-by: Randy Dunlap 
Reported-by: kernel test robot 
Cc: Aleksandr Nogikh 
Cc: Willem de Bruijn 
Cc: Jakub Kicinski 
Cc: linux-n...@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: Matthieu Baerts 
---
v4: The enum for SKB_EXT_KCOV_HANDLE needs to be exposed unconditionally
  because it is used in skb_get/set_kcov_handle(), which are always
  present since v3.
v3: (as suggested by Jakub Kicinski )
  add stubs for skb_ext_add() and skb_ext_find() to reduce the ifdef-ery
v2: (as suggested by Matthieu Baerts )
  drop an extraneous space in a comment;
  use CONFIG_SKB_EXTENSIONS instead of CONFIG_NET;

 include/linux/skbuff.h |   14 +-
 1 file changed, 5 insertions(+), 9 deletions(-)

--- linux-next-20201113.orig/include/linux/skbuff.h
+++ linux-next-20201113/include/linux/skbuff.h
@@ -4137,7 +4137,6 @@ static inline void skb_set_nfct(struct s
 #endif
 }
 
-#ifdef CONFIG_SKB_EXTENSIONS
 enum skb_ext_id {
 #if IS_ENABLED(CONFIG_BRIDGE_NETFILTER)
SKB_EXT_BRIDGE_NF,
@@ -4151,12 +4150,11 @@ enum skb_ext_id {
 #if IS_ENABLED(CONFIG_MPTCP)
SKB_EXT_MPTCP,
 #endif
-#if IS_ENABLED(CONFIG_KCOV)
SKB_EXT_KCOV_HANDLE,
-#endif
SKB_EXT_NUM, /* must be last */
 };
 
+#ifdef CONFIG_SKB_EXTENSIONS
 /**
  * struct skb_ext - sk_buff extensions
  * @refcnt: 1 on allocation, deallocated on 0
@@ -4252,6 +4250,10 @@ static inline void skb_ext_del(struct sk
 static inline void __skb_ext_copy(struct sk_buff *d, const struct sk_buff *s) 
{}
 static inline void skb_ext_copy(struct sk_buff *dst, const struct sk_buff *s) 
{}
 static inline bool skb_has_extensions(struct sk_buff *skb) { return false; }
+static inline void *skb_ext_add(struct sk_buff *skb, enum skb_ext_id id)
+{ return NULL; }
+static inline void *skb_ext_find(const struct sk_buff *skb, enum skb_ext_id id)
+{ return NULL; }
 #endif /* CONFIG_SKB_EXTENSIONS */
 
 static inline void nf_reset_ct(struct sk_buff *skb)
@@ -4608,7 +4610,6 @@ static inline void skb_reset_redirect(st
 #endif
 }
 
-#ifdef CONFIG_KCOV
 static inline void skb_set_kcov_handle(struct sk_buff *skb,
   const u64 kcov_handle)
 {
@@ -4632,11 +4633,6 @@ static inline u64 skb_get_kcov_handle(st
 
return kcov_handle ? *kcov_handle : 0;
 }
-#else
-static inline void skb_set_kcov_handle(struct sk_buff *skb,
-  const u64 kcov_handle) { }
-static inline u64 skb_get_kcov_handle(struct sk_buff *skb) { return 0; }
-#endif /* CONFIG_KCOV */
 
 #endif /* __KERNEL__ */
 #endif /* _LINUX_SKBUFF_H */


[PATCH net-next] netfilter: nf_reject: bridge: fix build errors due to code movement

2020-11-15 Thread Randy Dunlap
Fix build errors in net/bridge/netfilter/nft_reject_bridge.ko
by selecting NF_REJECT_IPV4, which provides the missing symbols.

ERROR: modpost: "nf_reject_skb_v4_tcp_reset" 
[net/bridge/netfilter/nft_reject_bridge.ko] undefined!
ERROR: modpost: "nf_reject_skb_v4_unreach" 
[net/bridge/netfilter/nft_reject_bridge.ko] undefined!

Fixes: fa538f7cf05a ("netfilter: nf_reject: add reject skbuff creation helpers")
Reported-by: kernel test robot 
Signed-off-by: Randy Dunlap 
Cc: kernel test robot 
Cc: Jose M. Guisado Gomez 
Cc: Pablo Neira Ayuso 
Cc: Jozsef Kadlecsik 
Cc: Florian Westphal 
Cc: netfilter-de...@vger.kernel.org
Cc: coret...@netfilter.org
Cc: Jakub Kicinski 
---
 net/bridge/netfilter/Kconfig |1 +
 1 file changed, 1 insertion(+)

--- linux-next-20201113.orig/net/bridge/netfilter/Kconfig
+++ linux-next-20201113/net/bridge/netfilter/Kconfig
@@ -18,6 +18,7 @@ config NFT_BRIDGE_META
 config NFT_BRIDGE_REJECT
tristate "Netfilter nf_tables bridge reject support"
depends on NFT_REJECT
+   depends on NF_REJECT_IPV4
help
  Add support to reject packets.
 


Re: [PATCH net-next] netfilter: nf_reject: bridge: fix build errors due to code movement

2020-11-16 Thread Randy Dunlap
On 11/16/20 1:26 AM, Pablo Neira Ayuso wrote:
> Hi,
> 
> Thanks for catching up this.
> 
> On Sun, Nov 15, 2020 at 07:42:03PM -0800, Randy Dunlap wrote:
>> Fix build errors in net/bridge/netfilter/nft_reject_bridge.ko
>> by selecting NF_REJECT_IPV4, which provides the missing symbols.
>>
>> ERROR: modpost: "nf_reject_skb_v4_tcp_reset" 
>> [net/bridge/netfilter/nft_reject_bridge.ko] undefined!
>> ERROR: modpost: "nf_reject_skb_v4_unreach" 
>> [net/bridge/netfilter/nft_reject_bridge.ko] undefined!
>>
>> Fixes: fa538f7cf05a ("netfilter: nf_reject: add reject skbuff creation 
>> helpers")
>> Reported-by: kernel test robot 
>> Signed-off-by: Randy Dunlap 
>> Cc: kernel test robot 
>> Cc: Jose M. Guisado Gomez 
>> Cc: Pablo Neira Ayuso 
>> Cc: Jozsef Kadlecsik 
>> Cc: Florian Westphal 
>> Cc: netfilter-de...@vger.kernel.org
>> Cc: coret...@netfilter.org
>> Cc: Jakub Kicinski 
>> ---
>>  net/bridge/netfilter/Kconfig |1 +
>>  1 file changed, 1 insertion(+)
>>
>> --- linux-next-20201113.orig/net/bridge/netfilter/Kconfig
>> +++ linux-next-20201113/net/bridge/netfilter/Kconfig
>> @@ -18,6 +18,7 @@ config NFT_BRIDGE_META
>>  config NFT_BRIDGE_REJECT
>>  tristate "Netfilter nf_tables bridge reject support"
>>  depends on NFT_REJECT
>> +depends on NF_REJECT_IPV4
> 
> I can update the patch here before applying to add:
> 
> depends on NF_REJECT_IPV6
> 
> as well. It seems both dependencies (IPv4 and IPv6) are missing.
> 
> Thanks.
> 
>>  help
>>Add support to reject packets.
>>  

Yes, that's good.

Thanks.

-- 
~Randy



Re: [PATCH net-next v4] net: linux/skbuff.h: combine SKB_EXTENSIONS + KCOV handling

2020-11-16 Thread Randy Dunlap
On 11/16/20 7:30 AM, Jakub Kicinski wrote:
> On Mon, 16 Nov 2020 15:31:21 +0100 Florian Westphal wrote:
 @@ -4151,12 +4150,11 @@ enum skb_ext_id {
   #if IS_ENABLED(CONFIG_MPTCP)
SKB_EXT_MPTCP,
   #endif
 -#if IS_ENABLED(CONFIG_KCOV)
SKB_EXT_KCOV_HANDLE,
 -#endif  
>>>
>>> I don't think we should remove this #ifdef: the number of extensions are
>>> currently limited to 8, we might not want to always have KCOV there even if
>>> we don't want it. I think adding items in this enum only when needed was the
>>> intension of Florian (+cc) when creating these SKB extensions.
>>> Also, this will increase a tiny bit some structures, see "struct 
>>> skb_ext()".  
>>
>> Yes, I would also prefer to retrain the ifdef.
>>
>> Another reason was to make sure that any skb_ext_add(..., MY_EXT) gives
>> a compile error if the extension is not enabled.
> 
> Oh well, sorry for taking you down the wrong path Randy!

No problem.
So we are back to v2, right?
Do I need to resend that one?

thanks.
-- 
~Randy



Re: linux-next: Tree for Nov 16 (net/core/stream.o)

2020-11-16 Thread Randy Dunlap
On 11/15/20 10:59 PM, Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20201113:
> 


on x86_64:

# CONFIG_INET is not set

ld: net/core/stream.o: in function `sk_stream_write_space':
stream.c:(.text+0x68): undefined reference to `tcp_stream_memory_free'
ld: stream.c:(.text+0x80): undefined reference to `tcp_stream_memory_free'
ld: net/core/stream.o: in function `sk_stream_wait_memory':
stream.c:(.text+0x5b3): undefined reference to `tcp_stream_memory_free'
ld: stream.c:(.text+0x5c8): undefined reference to `tcp_stream_memory_free'
ld: stream.c:(.text+0x6f8): undefined reference to `tcp_stream_memory_free'
ld: net/core/stream.o:stream.c:(.text+0x70d): more undefined references to 
`tcp_stream_memory_free' follow


-- 
~Randy
Reported-by: Randy Dunlap 


[PATCH net-next v5] net: linux/skbuff.h: combine SKB_EXTENSIONS + KCOV handling

2020-11-16 Thread Randy Dunlap
The previous Kconfig patch led to some other build errors as
reported by the 0day bot and my own overnight build testing.

These are all in  when KCOV is enabled but
SKB_EXTENSIONS is not enabled, so fix those by combining those conditions
in the header file.

Fixes: 6370cc3bbd8a ("net: add kcov handle to skb extensions")
Fixes: 85ce50d337d1 ("net: kcov: don't select SKB_EXTENSIONS when there is no 
NET")
Signed-off-by: Randy Dunlap 
Reported-by: kernel test robot 
Cc: Aleksandr Nogikh 
Cc: Willem de Bruijn 
Cc: Jakub Kicinski 
Cc: linux-n...@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: Florian Westphal 
---
v2: (as suggested by Matthieu Baerts )
  drop an extraneous space in a comment;
  use CONFIG_SKB_EXTENSIONS instead of CONFIG_NET;
v3, v4: dropped
v5: drop a redundant IS_ENABLED(CONFIG_SKB_EXTENSIONS) in an enum;

 include/linux/skbuff.h |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-next-20201113.orig/include/linux/skbuff.h
+++ linux-next-20201113/include/linux/skbuff.h
@@ -4608,7 +4608,7 @@ static inline void skb_reset_redirect(st
 #endif
 }
 
-#ifdef CONFIG_KCOV
+#if IS_ENABLED(CONFIG_KCOV) && IS_ENABLED(CONFIG_SKB_EXTENSIONS)
 static inline void skb_set_kcov_handle(struct sk_buff *skb,
   const u64 kcov_handle)
 {
@@ -4636,7 +4636,7 @@ static inline u64 skb_get_kcov_handle(st
 static inline void skb_set_kcov_handle(struct sk_buff *skb,
   const u64 kcov_handle) { }
 static inline u64 skb_get_kcov_handle(struct sk_buff *skb) { return 0; }
-#endif /* CONFIG_KCOV */
+#endif /* CONFIG_KCOV && CONFIG_SKB_EXTENSIONS */
 
 #endif /* __KERNEL__ */
 #endif /* _LINUX_SKBUFF_H */


Re: [PATCH] ipv4: use IS_ENABLED instead of ifdef

2020-11-17 Thread Randy Dunlap
On 11/17/20 5:07 PM, Jakub Kicinski wrote:
> On Tue, 17 Nov 2020 17:55:54 -0700 David Ahern wrote:
>> On 11/17/20 5:01 PM, Jakub Kicinski wrote:
>>> On Sun, 15 Nov 2020 23:45:09 +0100 Florian Klink wrote:  
 Checking for ifdef CONFIG_x fails if CONFIG_x=m.

 Use IS_ENABLED instead, which is true for both built-ins and modules.

 Otherwise, a  
> ip -4 route add 1.2.3.4/32 via inet6 fe80::2 dev eth1
 fails with the message "Error: IPv6 support not enabled in kernel." if
 CONFIG_IPV6 is `m`.

 In the spirit of b8127113d01e53adba15b41aefd37b90ed83d631.

 Cc: Kim Phillips 
 Signed-off-by: Florian Klink   
>>>
>>> LGTM, this is the fixes tag right?
>>>
>>> Fixes: d15662682db2 ("ipv4: Allow ipv6 gateway with ipv4 routes")  
>>
>> yep.
>>
>>>
>>> CCing David to give him a chance to ack.  
>>
>> Reviewed-by: David Ahern 
> 
> Great, applied, thanks!
> 
>> I looked at this yesterday and got distracted diving into the generated
>> file to see the difference:
>>
>> #define CONFIG_IPV6 1
>>
>> vs
>>
>> #define CONFIG_IPV6_MODULE 1

Digging up ancient history. ;)

> Interesting.
> 
> drivers/net/ethernet/netronome/nfp/flower/action.c:#ifdef CONFIG_IPV6
> 
> Oops.

Notify the maintainer!

-- 
~Randy



[PATCH -net] net: sched: prevent invalid Scell_log shift count

2020-12-24 Thread Randy Dunlap
Check Scell_log shift size in red_check_params() and modify all callers
of red_check_params() to pass Scell_log.

This prevents a shift out-of-bounds as detected by UBSAN:
  UBSAN: shift-out-of-bounds in ./include/net/red.h:252:22
  shift exponent 72 is too large for 32-bit type 'int'

Fixes: 8afa10cbe281 ("net_sched: red: Avoid illegal values")
Signed-off-by: Randy Dunlap 
Reported-by: syzbot+97c5bd9cc81eca63d...@syzkaller.appspotmail.com
Cc: Nogah Frankel 
Cc: Jamal Hadi Salim 
Cc: Cong Wang 
Cc: Jiri Pirko 
Cc: netdev@vger.kernel.org
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
 include/net/red.h |4 +++-
 net/sched/sch_choke.c |2 +-
 net/sched/sch_gred.c  |2 +-
 net/sched/sch_red.c   |2 +-
 net/sched/sch_sfq.c   |2 +-
 5 files changed, 7 insertions(+), 5 deletions(-)

--- lnx-510.orig/include/net/red.h
+++ lnx-510/include/net/red.h
@@ -168,12 +168,14 @@ static inline void red_set_vars(struct r
v->qcount   = -1;
 }
 
-static inline bool red_check_params(u32 qth_min, u32 qth_max, u8 Wlog)
+static inline bool red_check_params(u32 qth_min, u32 qth_max, u8 Wlog, u8 
Scell_log)
 {
if (fls(qth_min) + Wlog > 32)
return false;
if (fls(qth_max) + Wlog > 32)
return false;
+   if (Scell_log >= 32)
+   return false;
if (qth_max < qth_min)
return false;
return true;
--- lnx-510.orig/net/sched/sch_sfq.c
+++ lnx-510/net/sched/sch_sfq.c
@@ -647,7 +647,7 @@ static int sfq_change(struct Qdisc *sch,
}
 
if (ctl_v1 && !red_check_params(ctl_v1->qth_min, ctl_v1->qth_max,
-   ctl_v1->Wlog))
+   ctl_v1->Wlog, ctl_v1->Scell_log))
return -EINVAL;
if (ctl_v1 && ctl_v1->qth_min) {
p = kmalloc(sizeof(*p), GFP_KERNEL);
--- lnx-510.orig/net/sched/sch_choke.c
+++ lnx-510/net/sched/sch_choke.c
@@ -362,7 +362,7 @@ static int choke_change(struct Qdisc *sc
 
ctl = nla_data(tb[TCA_CHOKE_PARMS]);
 
-   if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog))
+   if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog, 
ctl->Scell_log))
return -EINVAL;
 
if (ctl->limit > CHOKE_MAX_QUEUE)
--- lnx-510.orig/net/sched/sch_gred.c
+++ lnx-510/net/sched/sch_gred.c
@@ -480,7 +480,7 @@ static inline int gred_change_vq(struct
struct gred_sched *table = qdisc_priv(sch);
struct gred_sched_data *q = table->tab[dp];
 
-   if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog)) {
+   if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog, 
ctl->Scell_log)) {
NL_SET_ERR_MSG_MOD(extack, "invalid RED parameters");
return -EINVAL;
}
--- lnx-510.orig/net/sched/sch_red.c
+++ lnx-510/net/sched/sch_red.c
@@ -250,7 +250,7 @@ static int __red_change(struct Qdisc *sc
max_P = tb[TCA_RED_MAX_P] ? nla_get_u32(tb[TCA_RED_MAX_P]) : 0;
 
ctl = nla_data(tb[TCA_RED_PARMS]);
-   if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog))
+   if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog, 
ctl->Scell_log))
return -EINVAL;
 
err = red_get_flags(ctl->flags, TC_RED_HISTORIC_FLAGS,


Re: UBSAN: shift-out-of-bounds in choke_change

2020-12-29 Thread Randy Dunlap
Hi bot,

On 12/29/20 10:58 AM, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:71c5f031 Merge tag 'docs-5.11-2' of git://git.lwn.net/linux
> git tree:   upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=1510369350
> kernel config:  https://syzkaller.appspot.com/x/.config?x=3e7e34a83d606100
> dashboard link: https://syzkaller.appspot.com/bug?extid=4eda8c01ca2315d1722e
> compiler:   gcc (GCC) 10.1.0-syz 20200507
> syz repro:  https://syzkaller.appspot.com/x/repro.syz?x=143d33ff50
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1372527750
> 
> Bisection is inconclusive: the issue happens on the oldest tested release.
> 
> bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=137f60db50
> final oops: https://syzkaller.appspot.com/x/report.txt?x=10ff60db50
> console output: https://syzkaller.appspot.com/x/log.txt?x=177f60db50
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+4eda8c01ca2315d17...@syzkaller.appspotmail.com

#syz dup: UBSAN: shift-out-of-bounds in sfq_init

Fixed by:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=bd1248f1ddbc48b0c30565fce897a3b6423313b8


> netdevsim netdevsim0 netdevsim1: set [1, 0] type 2 family 0 port 6081 - 0
> netdevsim netdevsim0 netdevsim2: set [1, 0] type 2 family 0 port 6081 - 0
> netdevsim netdevsim0 netdevsim3: set [1, 0] type 2 family 0 port 6081 - 0
> 
> UBSAN: shift-out-of-bounds in ./include/net/red.h:252:22
> shift exponent 96 is too large for 32-bit type 'int'
> CPU: 0 PID: 8513 Comm: syz-executor800 Not tainted 5.10.0-syzkaller #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS 
> Google 01/01/2011
> Call Trace:
>  __dump_stack lib/dump_stack.c:79 [inline]
>  dump_stack+0x107/0x163 lib/dump_stack.c:120
>  ubsan_epilogue+0xb/0x5a lib/ubsan.c:148
>  __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x181 lib/ubsan.c:395
>  red_set_parms include/net/red.h:252 [inline]
>  choke_change.cold+0xce/0x115 net/sched/sch_choke.c:413
>  qdisc_create+0x4ba/0x13a0 net/sched/sch_api.c:1246
>  tc_modify_qdisc+0x4c8/0x1a30 net/sched/sch_api.c:1662
>  rtnetlink_rcv_msg+0x498/0xb80 net/core/rtnetlink.c:5564
>  netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2494
>  netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline]
>  netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330
>  netlink_sendmsg+0x907/0xe40 net/netlink/af_netlink.c:1919
>  sock_sendmsg_nosec net/socket.c:652 [inline]
>  sock_sendmsg+0xcf/0x120 net/socket.c:672
>  sys_sendmsg+0x6e8/0x810 net/socket.c:2345
>  ___sys_sendmsg+0xf3/0x170 net/socket.c:2399
>  __sys_sendmsg+0xe5/0x1b0 net/socket.c:2432
>  do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
>  entry_SYSCALL_64_after_hwframe+0x44/0xa9
> RIP: 0033:0x4437b9
> Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 
> 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 
> 83 eb 0d fc ff c3 66 2e 0f 1f 84 00 00 00 00
> RSP: 002b:7fff205ca1d8 EFLAGS: 0246 ORIG_RAX: 002e
> RAX: ffda RBX: 0003 RCX: 004437b9
> RDX:  RSI: 27c0 RDI: 0004
> RBP: 7fff205ca1e0 R08: 01bb R09: 01bb
> R10: 01bb R11: 0246 R12: 7fff205ca1f0
> R13:  R14:  R15: 
> 
> 
> 
> ---
> This report is generated by a bot. It may contain errors.
> See https://goo.gl/tpsmEJ for more information about syzbot.
> syzbot engineers can be reached at syzkal...@googlegroups.com.
> 
> syzbot will keep track of this issue. See:
> https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection
> syzbot can test patches for this issue, for details see:
> https://goo.gl/tpsmEJ#testing-patches
> 


-- 
~Randy



Re: [PATCH] drivers: net: wireless: realtek: Fix the word association defautly de-faulty

2021-01-05 Thread Randy Dunlap
On 1/5/21 2:17 AM, Bhaskar Chowdhury wrote:
> s/defautly/de-faulty/p
> 
> 
> Signed-off-by: Bhaskar Chowdhury 
> ---
>  drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c 
> b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c
> index c948dafa0c80..7d02d8abb4eb 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c
> @@ -814,7 +814,7 @@ bool rtl88ee_is_tx_desc_closed(struct ieee80211_hw *hw, 
> u8 hw_queue, u16 index)
>   u8 own = (u8)rtl88ee_get_desc(hw, entry, true, HW_DESC_OWN);
> 
>   /*beacon packet will only use the first
> -  *descriptor defautly,and the own may not
> +  *descriptor de-faulty,and the own may not
>*be cleared by the hardware
>*/
>   if (own)
> --

Yes, I agree with "by default". I don't know what "the own"
means.

Also, there should be a space after each beginning "*.

I saw another patch where the comment block began with /**,
which should mean "begin kernel-doc comment block", but it's
not kernel-doc, so that /** should be changed to just "/*".


-- 
~Randy



Re: [PATCH] net-next: docs: Fix typos in snmp_counter.rst

2021-01-05 Thread Randy Dunlap
On 1/5/21 6:40 AM, Masanari Iida wrote:
> This patch fixes some spelling typos in snmp_counter.rst
> 
> Signed-off-by: Masanari Iida 
> ---
>  Documentation/networking/snmp_counter.rst | 28 +++
>  1 file changed, 14 insertions(+), 14 deletions(-)
> 

Reviewed-by: Randy Dunlap 

thanks.
-- 
~Randy


Re: [PATCH] docs: octeontx2: tune rst markup

2021-01-05 Thread Randy Dunlap
Hi Lukas,

On 1/5/21 1:35 AM, Lukas Bulwahn wrote:
> Commit 80b9414832a1 ("docs: octeontx2: Add Documentation for NPA health
> reporters") added new documentation with improper formatting for rst, and
> caused a few new warnings for make htmldocs in octeontx2.rst:169--202.
> 
> Tune markup and formatting for better presentation in the HTML view.
> 
> Signed-off-by: Lukas Bulwahn 
> ---
> applies cleanly on current master (v5.11-rc2) and next-20201205
> 
> George, please ack.
> Jonathan, please pick this minor formatting clean-up patch.
> 
>  .../ethernet/marvell/octeontx2.rst| 59 +++
>  1 file changed, 34 insertions(+), 25 deletions(-)
> 
> diff --git 
> a/Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst 
> b/Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst
> index d3fcf536d14e..00bdc10fe2b8 100644
> --- a/Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst
> +++ b/Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst
> @@ -165,45 +165,54 @@ Devlink health reporters
>  NPA Reporters
>  -
>  The NPA reporters are responsible for reporting and recovering the following 
> group of errors

Can we get a period or colon at the end of that line above, please.

> +
>  1. GENERAL events
> +
> - Error due to operation of unmapped PF.
> - Error due to disabled alloc/free for other HW blocks (NIX, SSO, TIM, 
> DPI and AURA).
> +
>  2. ERROR events
> +
> - Fault due to NPA_AQ_INST_S read or NPA_AQ_RES_S write.
> - AQ Doorbell Error.
> +
>  3. RAS events
> +
> - RAS Error Reporting for NPA_AQ_INST_S/NPA_AQ_RES_S.
> +
>  4. RVU events
> +
> - Error due to unmapped slot.
>  
> -Sample Output
> --
> -~# devlink health
> -pci/0002:01:00.0:
> -  reporter hw_npa_intr
> -  state healthy error 2872 recover 2872 last_dump_date 2020-12-10 
> last_dump_time 09:39:09 grace_period 0 auto_recover true auto_dump true
> -  reporter hw_npa_gen
> -  state healthy error 2872 recover 2872 last_dump_date 2020-12-11 
> last_dump_time 04:43:04 grace_period 0 auto_recover true auto_dump true
> -  reporter hw_npa_err
> -  state healthy error 2871 recover 2871 last_dump_date 2020-12-10 
> last_dump_time 09:39:17 grace_period 0 auto_recover true auto_dump true
> -   reporter hw_npa_ras
> -  state healthy error 0 recover 0 last_dump_date 2020-12-10 
> last_dump_time 09:32:40 grace_period 0 auto_recover true auto_dump true
> +Sample Output::
> +
> + ~# devlink health
> + pci/0002:01:00.0:
> +   reporter hw_npa_intr
> +   state healthy error 2872 recover 2872 last_dump_date 2020-12-10 
> last_dump_time 09:39:09 grace_period 0 auto_recover true auto_dump true
> +   reporter hw_npa_gen
> +   state healthy error 2872 recover 2872 last_dump_date 2020-12-11 
> last_dump_time 04:43:04 grace_period 0 auto_recover true auto_dump true
> +   reporter hw_npa_err
> +   state healthy error 2871 recover 2871 last_dump_date 2020-12-10 
> last_dump_time 09:39:17 grace_period 0 auto_recover true auto_dump true
> +reporter hw_npa_ras
> +   state healthy error 0 recover 0 last_dump_date 2020-12-10 
> last_dump_time 09:32:40 grace_period 0 auto_recover true auto_dump true
>  
>  Each reporter dumps the
>   - Error Type
>   - Error Register value
>   - Reason in words
>  
> -For eg:
> -~# devlink health dump show  pci/0002:01:00.0 reporter hw_npa_gen
> - NPA_AF_GENERAL:
> - NPA General Interrupt Reg : 1
> - NIX0: free disabled RX
> -~# devlink health dump show  pci/0002:01:00.0 reporter hw_npa_intr
> - NPA_AF_RVU:
> - NPA RVU Interrupt Reg : 1
> - Unmap Slot Error
> -~# devlink health dump show  pci/0002:01:00.0 reporter hw_npa_err
> - NPA_AF_ERR:
> -NPA Error Interrupt Reg : 4096
> -AQ Doorbell Error
> +For eg::

   For example::
or
   E.g.::

> +
> + ~# devlink health dump show  pci/0002:01:00.0 reporter hw_npa_gen
> +  NPA_AF_GENERAL:
> +  NPA General Interrupt Reg : 1
> +  NIX0: free disabled RX
> + ~# devlink health dump show  pci/0002:01:00.0 reporter hw_npa_intr
> +  NPA_AF_RVU:
> +  NPA RVU Interrupt Reg : 1
> +  Unmap Slot Error
> + ~# devlink health dump show  pci/0002:01:00.0 reporter hw_npa_err
> +  NPA_AF_ERR:
> + NPA Error Interrupt Reg : 4096
> + AQ Doorbell Error
> 


thanks.
-- 
~Randy



Re: UBSAN: shift-out-of-bounds in gred_change

2021-01-05 Thread Randy Dunlap
On 12/31/20 1:09 PM, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:3db1a3fa Merge tag 'staging-5.11-rc1' of git://git.kernel...
> git tree:   net-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=155708db50
> kernel config:  https://syzkaller.appspot.com/x/.config?x=2ae878fbf640b72b
> dashboard link: https://syzkaller.appspot.com/bug?extid=1819b70451246ed8cf57
> compiler:   gcc (GCC) 10.1.0-syz 20200507
> syz repro:  https://syzkaller.appspot.com/x/repro.syz?x=176b78c0d0
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1299379750
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+1819b70451246ed8c...@syzkaller.appspotmail.com

#syz fix: net: sched: prevent invalid Scell_log shift count

> IPVS: ftp: loaded support on port[0] = 21
> 
> UBSAN: shift-out-of-bounds in ./include/net/red.h:252:22
> shift exponent 255 is too large for 32-bit type 'int'
> CPU: 0 PID: 8465 Comm: syz-executor194 Not tainted 5.10.0-syzkaller #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS 
> Google 01/01/2011
> Call Trace:
>  __dump_stack lib/dump_stack.c:79 [inline]
>  dump_stack+0x107/0x163 lib/dump_stack.c:120
>  ubsan_epilogue+0xb/0x5a lib/ubsan.c:148
>  __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x181 lib/ubsan.c:395
>  red_set_parms include/net/red.h:252 [inline]
>  gred_change_vq net/sched/sch_gred.c:506 [inline]
>  gred_change.cold+0xce/0xe2 net/sched/sch_gred.c:702
>  qdisc_change net/sched/sch_api.c:1331 [inline]
>  tc_modify_qdisc+0xd4e/0x1a30 net/sched/sch_api.c:1633
>  rtnetlink_rcv_msg+0x493/0xb40 net/core/rtnetlink.c:5564
>  netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2494
>  netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline]
>  netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330
>  netlink_sendmsg+0x907/0xe10 net/netlink/af_netlink.c:1919
>  sock_sendmsg_nosec net/socket.c:652 [inline]
>  sock_sendmsg+0xd3/0x130 net/socket.c:672
>  sys_sendmsg+0x6e8/0x810 net/socket.c:2336
>  ___sys_sendmsg+0xf3/0x170 net/socket.c:2390
>  __sys_sendmsg+0xe5/0x1b0 net/socket.c:2423
>  do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
>  entry_SYSCALL_64_after_hwframe+0x44/0xa9
> RIP: 0033:0x440e69
> Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 
> 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 
> 83 0b 10 fc ff c3 66 2e 0f 1f 84 00 00 00 00
> RSP: 002b:7fff634be6d8 EFLAGS: 0246 ORIG_RAX: 002e
> RAX: ffda RBX: 004a2730 RCX: 00440e69
> RDX:  RSI: 2080 RDI: 0003
> RBP: 7fff634be6e0 R08: 000120080522 R09: 000120080522
> R10: 000120080522 R11: 0246 R12: 004a2730
> R13: 00402390 R14:  R15: 
> 


-- 
~Randy



[PATCH] net: dsa: fix led_classdev build errors

2021-01-05 Thread Randy Dunlap
Fix build errors when LEDS_CLASS=m and NET_DSA_HIRSCHMANN_HELLCREEK=y.
This limits the latter to =m when LEDS_CLASS=m.

microblaze-linux-ld: drivers/net/dsa/hirschmann/hellcreek_ptp.o: in function 
`hellcreek_ptp_setup':
(.text+0xf80): undefined reference to `led_classdev_register_ext'
microblaze-linux-ld: (.text+0xf94): undefined reference to 
`led_classdev_register_ext'
microblaze-linux-ld: drivers/net/dsa/hirschmann/hellcreek_ptp.o: in function 
`hellcreek_ptp_free':
(.text+0x1018): undefined reference to `led_classdev_unregister'
microblaze-linux-ld: (.text+0x1024): undefined reference to 
`led_classdev_unregister'

Signed-off-by: Randy Dunlap 
Reported-by: kernel test robot 
Link: lore.kernel.org/r/202101060655.iuvmjqs2-...@intel.com
Cc: Kurt Kanzenbach 
Cc: netdev@vger.kernel.org
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
 drivers/net/dsa/hirschmann/Kconfig |1 +
 1 file changed, 1 insertion(+)

--- lnx-511-rc2.orig/drivers/net/dsa/hirschmann/Kconfig
+++ lnx-511-rc2/drivers/net/dsa/hirschmann/Kconfig
@@ -4,6 +4,7 @@ config NET_DSA_HIRSCHMANN_HELLCREEK
depends on HAS_IOMEM
depends on NET_DSA
depends on PTP_1588_CLOCK
+   depends on LEDS_CLASS
select NET_DSA_TAG_HELLCREEK
help
  This driver adds support for Hirschmann Hellcreek TSN switches.


[PATCH] ptp: ptp_ines: prevent build when HAS_IOMEM is not set

2021-01-05 Thread Randy Dunlap
ptp_ines.c uses devm_platform_ioremap_resource(), which is only
built/available when CONFIG_HAS_IOMEM is enabled.
CONFIG_HAS_IOMEM is not enabled for arch/s390/, so builds on S390
have a build error:

s390-linux-ld: drivers/ptp/ptp_ines.o: in function `ines_ptp_ctrl_probe':
ptp_ines.c:(.text+0x17e6): undefined reference to 
`devm_platform_ioremap_resource'

Prevent builds of ptp_ines.c when HAS_IOMEM is not set.

Fixes: bad1eaa6ac31 ("ptp: Add a driver for InES time stamping IP core.")
Signed-off-by: Randy Dunlap 
Reported-by: kernel test robot 
Link: lore.kernel.org/r/202101031125.zefcuiki-...@intel.com
Cc: Richard Cochran 
Cc: netdev@vger.kernel.org
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
 drivers/ptp/Kconfig |1 +
 1 file changed, 1 insertion(+)

--- lnx-511-rc2.orig/drivers/ptp/Kconfig
+++ lnx-511-rc2/drivers/ptp/Kconfig
@@ -78,6 +78,7 @@ config DP83640_PHY
 config PTP_1588_CLOCK_INES
tristate "ZHAW InES PTP time stamping IP core"
depends on NETWORK_PHY_TIMESTAMPING
+   depends on HAS_IOMEM
depends on PHYLIB
depends on PTP_1588_CLOCK
help


Re: [PATCH v2] docs: octeontx2: tune rst markup

2021-01-06 Thread Randy Dunlap
On 1/6/21 8:17 AM, Lukas Bulwahn wrote:
> Commit 80b9414832a1 ("docs: octeontx2: Add Documentation for NPA health
> reporters") added new documentation with improper formatting for rst, and
> caused a few new warnings for make htmldocs in octeontx2.rst:169--202.
> 
> Tune markup and formatting for better presentation in the HTML view.
> 
> Signed-off-by: Lukas Bulwahn 
> ---
> v1 -> v2: minor stylistic tuning as suggested by Randy
> 
> applies cleanly on current master (v5.11-rc2) and next-20210106
> 
> George, please ack.
> Jonathan, please pick this minor formatting clean-up patch.
> 
>  .../ethernet/marvell/octeontx2.rst| 62 +++
>  1 file changed, 36 insertions(+), 26 deletions(-)
> 
> diff --git 
> a/Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst 
> b/Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst
> index d3fcf536d14e..61e850460e18 100644
> --- a/Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst
> +++ b/Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst

Acked-by: Randy Dunlap 

Thanks.

-- 
~Randy


Re: [PATCH net-next] net: broadcom: Drop OF dependency from BGMAC_PLATFORM

2021-01-06 Thread Randy Dunlap
On 1/6/21 11:15 AM, Florian Fainelli wrote:
> All of the OF code that is used has stubbed and will compile and link
> just fine, keeping COMPILE_TEST is enough.

Yes, that matches my understanding.

I wish we had a list of which API families have full stub support...

Acked-by: Randy Dunlap 

Thanks.

> Signed-off-by: Florian Fainelli 
> ---
>  drivers/net/ethernet/broadcom/Kconfig | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/Kconfig 
> b/drivers/net/ethernet/broadcom/Kconfig
> index 7b79528d6eed..4bdf8fbe75a6 100644
> --- a/drivers/net/ethernet/broadcom/Kconfig
> +++ b/drivers/net/ethernet/broadcom/Kconfig
> @@ -174,7 +174,6 @@ config BGMAC_BCMA
>  config BGMAC_PLATFORM
>   tristate "Broadcom iProc GBit platform support"
>   depends on ARCH_BCM_IPROC || COMPILE_TEST
> - depends on OF
>   select BGMAC
>   select PHYLIB
>   select FIXED_PHY
> 


-- 
~Randy


Re: [PATCH net-next] net/bridge: fix misspellings using codespell tool

2021-01-07 Thread Randy Dunlap
On 1/7/21 6:53 PM, menglong8.d...@gmail.com wrote:
> From: Menglong Dong 
> 
> Some typos are found out by codespell tool:
> 
> $ codespell ./net/bridge/
> ./net/bridge/br_stp.c:604: permanant  ==> permanent
> ./net/bridge/br_stp.c:605: persistance  ==> persistence
> ./net/bridge/br.c:125: underlaying  ==> underlying
> ./net/bridge/br_input.c:43: modue  ==> mode
> ./net/bridge/br_mrp.c:828: Determin  ==> Determine
> ./net/bridge/br_mrp.c:848: Determin  ==> Determine
> ./net/bridge/br_mrp.c:897: Determin  ==> Determine
> 
> Fix typos found by codespell.
> 
> Signed-off-by: Menglong Dong 

LGTM. Thanks.

Acked-by: Randy Dunlap 

> ---
>  net/bridge/br.c   | 2 +-
>  net/bridge/br_input.c | 2 +-
>  net/bridge/br_mrp.c   | 6 +++---
>  net/bridge/br_stp.c   | 4 ++--
>  4 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/net/bridge/br.c b/net/bridge/br.c
> index 1b169f8e7491..ef743f94254d 100644
> --- a/net/bridge/br.c
> +++ b/net/bridge/br.c
> @@ -122,7 +122,7 @@ static int br_device_event(struct notifier_block *unused, 
> unsigned long event, v
>   break;
>  
>   case NETDEV_PRE_TYPE_CHANGE:
> - /* Forbid underlaying device to change its type. */
> + /* Forbid underlying device to change its type. */
>   return NOTIFY_BAD;
>  
>   case NETDEV_RESEND_IGMP:
> diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
> index 8ca1f1bc6d12..85d9dae2 100644
> --- a/net/bridge/br_input.c
> +++ b/net/bridge/br_input.c
> @@ -40,7 +40,7 @@ static int br_pass_frame_up(struct sk_buff *skb)
>  
>   vg = br_vlan_group_rcu(br);
>   /* Bridge is just like any other port.  Make sure the
> -  * packet is allowed except in promisc modue when someone
> +  * packet is allowed except in promisc mode when someone
>* may be running packet capture.
>*/
>   if (!(brdev->flags & IFF_PROMISC) &&
> diff --git a/net/bridge/br_mrp.c b/net/bridge/br_mrp.c
> index cec2c4e4561d..fc0a98874bfc 100644
> --- a/net/bridge/br_mrp.c
> +++ b/net/bridge/br_mrp.c
> @@ -825,7 +825,7 @@ int br_mrp_start_in_test(struct net_bridge *br,
>   return 0;
>  }
>  
> -/* Determin if the frame type is a ring frame */
> +/* Determine if the frame type is a ring frame */
>  static bool br_mrp_ring_frame(struct sk_buff *skb)
>  {
>   const struct br_mrp_tlv_hdr *hdr;
> @@ -845,7 +845,7 @@ static bool br_mrp_ring_frame(struct sk_buff *skb)
>   return false;
>  }
>  
> -/* Determin if the frame type is an interconnect frame */
> +/* Determine if the frame type is an interconnect frame */
>  static bool br_mrp_in_frame(struct sk_buff *skb)
>  {
>   const struct br_mrp_tlv_hdr *hdr;
> @@ -894,7 +894,7 @@ static void br_mrp_mrm_process(struct br_mrp *mrp, struct 
> net_bridge_port *port,
>   br_mrp_ring_port_open(port->dev, false);
>  }
>  
> -/* Determin if the test hdr has a better priority than the node */
> +/* Determine if the test hdr has a better priority than the node */
>  static bool br_mrp_test_better_than_own(struct br_mrp *mrp,
>   struct net_bridge *br,
>   const struct br_mrp_ring_test_hdr *hdr)
> diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c
> index 3e88be7aa269..a3a5745660dd 100644
> --- a/net/bridge/br_stp.c
> +++ b/net/bridge/br_stp.c
> @@ -601,8 +601,8 @@ int __set_ageing_time(struct net_device *dev, unsigned 
> long t)
>  /* Set time interval that dynamic forwarding entries live
>   * For pure software bridge, allow values outside the 802.1
>   * standard specification for special cases:
> - *  0 - entry never ages (all permanant)
> - *  1 - entry disappears (no persistance)
> + *  0 - entry never ages (all permanent)
> + *  1 - entry disappears (no persistence)
>   *
>   * Offloaded switch entries maybe more restrictive
>   */
> 


-- 
~Randy
https://people.kernel.org/tglx/notes-about-netiquette
https://www.kernel.org/doc/html/latest/process/submit-checklist.html


Re: [PATCH] Incorrect filename in drivers/net/phy/Makefile

2021-01-09 Thread Randy Dunlap
On 1/9/21 11:48 AM, Andrew Lunn wrote:
> On Sat, Jan 09, 2021 at 10:17:38AM +0100, Zhi Han wrote:
>> Thanks a lot for the .config file.
>> I also tested it, with mdio-bus.o in the Makefile, glad to got that there is
>> no problem of that, although I don't know the reason/trick yet.
> 
> I'm not 100% sure, but i think:
> 
> obj-$(CONFIG_MDIO_DEVICE)   += mdio-bus.o
> 
> actually refers back to
> 
> mdio-bus-y  += mdio_bus.o mdio_device.o

Ack that.

-- 
~Randy



Re: linux-next: Tree for Jan 11 (drivers/net/ipa/ipa_main.o)

2021-01-11 Thread Randy Dunlap
On 1/10/21 8:46 PM, Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20210108:
> 

on x86_64:

ld: drivers/net/ipa/ipa_main.o: in function `ipa_remove':
ipa_main.c:(.text+0x20d): undefined reference to `rproc_put'
ld: drivers/net/ipa/ipa_mem.o: in function `ipa_mem_init':
ipa_mem.c:(.text+0x59f): undefined reference to `qcom_smem_alloc'
ld: ipa_mem.c:(.text+0x66e): undefined reference to `qcom_smem_get'
ld: ipa_mem.c:(.text+0x6cc): undefined reference to `qcom_smem_virt_to_phys'


Full randconfig file is attached.

Reported-by: Randy Dunlap 

-- 
~Randy



config-r7123.gz
Description: application/gzip


Re: [PATCH V3] drivers: net: marvell: Fixed two spellings,controling to controlling and oen to one

2021-01-12 Thread Randy Dunlap
On 1/12/21 2:31 AM, Bhaskar Chowdhury wrote:
> s/oen/one/
> s/controling/controlling/
> 
> Signed-off-by: Bhaskar Chowdhury 

Acked-by: Randy Dunlap 

Thanks.

> ---
> Changes from V2 : Correct the versioning,mentioned both the changes
> 
>  drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.h 
> b/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.h
> index 8867f25afab4..663157dc8062 100644
> --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.h
> +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.h
> @@ -143,7 +143,7 @@ struct mvpp2_cls_c2_entry {
>  /* Number of per-port dedicated entries in the C2 TCAM */
>  #define MVPP22_CLS_C2_PORT_N_FLOWS   MVPP2_N_RFS_ENTRIES_PER_FLOW
> 
> -/* Each port has oen range per flow type + one entry controling the global 
> RSS
> +/* Each port has one range per flow type + one entry controlling the global 
> RSS
>   * setting and the default rx queue
>   */
>  #define MVPP22_CLS_C2_PORT_RANGE (MVPP22_CLS_C2_PORT_N_FLOWS + 1)
> ./--
> 2.26.2
> 


-- 
~Randy



[PATCH] net: chelsio: inline_crypto: fix Kconfig and build errors

2020-10-19 Thread Randy Dunlap
Fix build errors when TLS=m, TLS_TOE=y, and CRYPTO_DEV_CHELSIO_TLS=y.

Having (tristate) CRYPTO_DEV_CHELSIO_TLS depend on (bool) TLS_TOE
is not strong enough to prevent the bad combination of TLS=m and
CRYPTO_DEV_CHELSIO_TLS=y, so add a dependency on TLS to prevent the
problematic kconfig combination.

Fixes these build errors:

hppa-linux-ld: drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.o: 
in function `chtls_free_uld':
 drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c:165: undefined 
reference to `tls_toe_unregister_device'
hppa-linux-ld: drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.o: 
in function `chtls_register_dev':
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c:204: undefined 
reference to `tls_toe_register_device'

Fixes: 44fd1c1fd821 ("chelsio/chtls: separate chelsio tls driver from crypto 
driver")
Reported-by: kernel test robot 
Signed-off-by: Randy Dunlap 
Cc: Vinay Kumar Yadav 
Cc: netdev@vger.kernel.org
Cc: Ayush Sawal 
Cc: Rohit Maheshwari 
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
---
 drivers/net/ethernet/chelsio/inline_crypto/Kconfig |1 +
 1 file changed, 1 insertion(+)

--- linux-next-20201016.orig/drivers/net/ethernet/chelsio/inline_crypto/Kconfig
+++ linux-next-20201016/drivers/net/ethernet/chelsio/inline_crypto/Kconfig
@@ -16,6 +16,7 @@ if CHELSIO_INLINE_CRYPTO
 config CRYPTO_DEV_CHELSIO_TLS
tristate "Chelsio Crypto Inline TLS Driver"
depends on CHELSIO_T4
+   depends on TLS
depends on TLS_TOE
help
  Support Chelsio Inline TLS with Chelsio crypto accelerator.


Re: linux-next: Tree for Oct 22 (mlx5)

2020-10-22 Thread Randy Dunlap
On 10/21/20 8:41 PM, Stephen Rothwell wrote:
> Hi all,
> 
> Since the merge window is open, please do not add any v5.11 material to
> your linux-next included branches until after v5.10-rc1 has been released.
> 
> Changes since 20201021:
> 

on x86_64:
when CONFIG_IPV6 is not set/enabled:

In file included from ../include/linux/tcp.h:19:0,
 from ../include/linux/ipv6.h:88,
 from ../include/net/ipv6.h:12,
 from ../include/rdma/ib_verbs.h:24,
 from ../include/linux/mlx5/device.h:37,
 from ../include/linux/mlx5/driver.h:52,
 from ../drivers/net/ethernet/mellanox/mlx5/core/en.h:40,
 from 
../drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.h:7,
 from 
../drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:5:
../drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c: In function 
‘accel_fs_tcp_set_ipv6_flow’:
../include/net/sock.h:380:34: error: ‘struct sock_common’ has no member named 
‘skc_v6_daddr’; did you mean ‘skc_daddr’?
 #define sk_v6_daddr  __sk_common.skc_v6_daddr
  ^
../drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:55:14: note: in 
expansion of macro ‘sk_v6_daddr’
 &sk->sk_v6_daddr, 16);

At top level:
../drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:47:13: warning: 
‘accel_fs_tcp_set_ipv6_flow’ defined but not used [-Wunused-function]
 static void accel_fs_tcp_set_ipv6_flow(struct mlx5_flow_spec *spec, struct 
sock *sk)



-- 
~Randy
Reported-by: Randy Dunlap 


Re: [PATCH v10 3/4] docs: Add documentation for userspace client interface

2020-10-29 Thread Randy Dunlap
Hi,

On 10/29/20 2:40 PM, Hemant Kumar wrote:
> MHI userspace client driver is creating device file node
> for user application to perform file operations. File
> operations are handled by MHI core driver. Currently
> Loopback MHI channel is supported by this driver.
> 
> Signed-off-by: Hemant Kumar 
> ---
>  Documentation/mhi/index.rst |  1 +
>  Documentation/mhi/uci.rst   | 83 
> +
>  2 files changed, 84 insertions(+)
>  create mode 100644 Documentation/mhi/uci.rst


> diff --git a/Documentation/mhi/uci.rst b/Documentation/mhi/uci.rst
> new file mode 100644
> index 000..fe901c4
> --- /dev/null
> +++ b/Documentation/mhi/uci.rst
> @@ -0,0 +1,83 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
> +=
> +Userspace Client Interface (UCI)
> +=
> +


Lots of TLAs.

> +
> +read
> +
> +
> +When data transfer is completed on downlink channel, TRE buffer is copied to
> +pending list. Reader is unblocked and data is copied to userspace buffer. TRE
> +buffer is queued back to downlink channel transfer ring.

What is TRE?

> +
> +Usage
> +=
> +
> +Device file node is created with format:-
> +
> +/dev/mhi__
> +
> +controller_name is the name of underlying bus used to transfer data. 
> mhi_device
> +name is the name of the MHI channel being used by MHI client in userspace to
> +send or receive data using MHI protocol.
> +
> +There is a separate character device file node created for each channel
> +specified in mhi device id table. MHI channels are statically defined by MHI

MHI
unless it is a variable name, like below: mhi_device_id

> +specification. The list of supported channels is in the channel list variable
> +of mhi_device_id table in UCI driver.
> +

> +Other Use Cases
> +---
> +
> +Getting MHI device specific diagnostics information to userspace MHI diag 
> client


diagnostic client

> +using DIAG channel 4 (Host to device) and 5 (Device to Host).
> 

thanks.
-- 
~Randy



Re: [PATCH v11 4/4] bus: mhi: Add userspace client interface driver

2020-10-29 Thread Randy Dunlap
On 10/29/20 7:45 PM, Hemant Kumar wrote:
> diff --git a/drivers/bus/mhi/Kconfig b/drivers/bus/mhi/Kconfig
> index e841c10..476cc55 100644
> --- a/drivers/bus/mhi/Kconfig
> +++ b/drivers/bus/mhi/Kconfig
> @@ -20,3 +20,16 @@ config MHI_BUS_DEBUG
> Enable debugfs support for use with the MHI transport. Allows
> reading and/or modifying some values within the MHI controller
> for debug and test purposes.
> +
> +config MHI_UCI
> + tristate "MHI UCI"
> + depends on MHI_BUS
> + help
> +   MHI based Userspace Client Interface (UCI) driver is used for

  MHI-based

> +   transferring raw data between host and device using standard file
> +   operations from userspace. Open, read, write, and close operations
> +   are supported by this driver. Please check mhi_uci_match_table for

also poll according to the documentation.

> +   all supported channels that are exposed to userspace.
> +
> +   To compile this driver as a module, choose M here: the module will be
> +   called mhi_uci.


-- 
~Randy



[PATCH] staging: wimax: depends on NET

2020-11-01 Thread Randy Dunlap
Fix build errors when CONFIG_NET is not enabled. E.g. (trimmed):

ld: drivers/staging/wimax/op-msg.o: in function `wimax_msg_alloc':
op-msg.c:(.text+0xa9): undefined reference to `__alloc_skb'
ld: op-msg.c:(.text+0xcc): undefined reference to `genlmsg_put'
ld: op-msg.c:(.text+0xfc): undefined reference to `nla_put'
ld: op-msg.c:(.text+0x168): undefined reference to `kfree_skb'
ld: drivers/staging/wimax/op-msg.o: in function `wimax_msg_data_len':
op-msg.c:(.text+0x1ba): undefined reference to `nla_find'
ld: drivers/staging/wimax/op-msg.o: in function `wimax_msg_send':
op-msg.c:(.text+0x311): undefined reference to `init_net'
ld: op-msg.c:(.text+0x326): undefined reference to `netlink_broadcast'
ld: drivers/staging/wimax/stack.o: in function `__wimax_state_change':
stack.c:(.text+0x433): undefined reference to `netif_carrier_off'
ld: stack.c:(.text+0x46b): undefined reference to `netif_carrier_on'
ld: stack.c:(.text+0x478): undefined reference to `netif_tx_wake_queue'
ld: drivers/staging/wimax/stack.o: in function `wimax_subsys_exit':
stack.c:(.exit.text+0xe): undefined reference to `genl_unregister_family'
ld: drivers/staging/wimax/stack.o: in function `wimax_subsys_init':
stack.c:(.init.text+0x1a): undefined reference to `genl_register_family'

Signed-off-by: Randy Dunlap 
Cc: Greg Kroah-Hartman 
Cc: Jakub Kicinski 
Cc: Arnd Bergmann 
Cc: netdev@vger.kernel.org
---
 drivers/staging/wimax/Kconfig |1 +
 1 file changed, 1 insertion(+)

--- linux-next-20201102.orig/drivers/staging/wimax/Kconfig
+++ linux-next-20201102/drivers/staging/wimax/Kconfig
@@ -5,6 +5,7 @@
 
 menuconfig WIMAX
tristate "WiMAX Wireless Broadband support"
+   depends on NET
depends on RFKILL || !RFKILL
help
 


Re: [PATCH] staging: wimax: depends on NET

2020-11-02 Thread Randy Dunlap
On 11/1/20 11:57 PM, Arnd Bergmann wrote:
> On Mon, Nov 2, 2020 at 8:25 AM Randy Dunlap  wrote:
>>
>> Fix build errors when CONFIG_NET is not enabled. E.g. (trimmed):
>>
>> ld: drivers/staging/wimax/op-msg.o: in function `wimax_msg_alloc':
>> op-msg.c:(.text+0xa9): undefined reference to `__alloc_skb'
>> ld: op-msg.c:(.text+0xcc): undefined reference to `genlmsg_put'
>> ld: op-msg.c:(.text+0xfc): undefined reference to `nla_put'
>> ld: op-msg.c:(.text+0x168): undefined reference to `kfree_skb'
>> ld: drivers/staging/wimax/op-msg.o: in function `wimax_msg_data_len':
>> op-msg.c:(.text+0x1ba): undefined reference to `nla_find'
>> ld: drivers/staging/wimax/op-msg.o: in function `wimax_msg_send':
>> op-msg.c:(.text+0x311): undefined reference to `init_net'
>> ld: op-msg.c:(.text+0x326): undefined reference to `netlink_broadcast'
>> ld: drivers/staging/wimax/stack.o: in function `__wimax_state_change':
>> stack.c:(.text+0x433): undefined reference to `netif_carrier_off'
>> ld: stack.c:(.text+0x46b): undefined reference to `netif_carrier_on'
>> ld: stack.c:(.text+0x478): undefined reference to `netif_tx_wake_queue'
>> ld: drivers/staging/wimax/stack.o: in function `wimax_subsys_exit':
>> stack.c:(.exit.text+0xe): undefined reference to `genl_unregister_family'
>> ld: drivers/staging/wimax/stack.o: in function `wimax_subsys_init':
>> stack.c:(.init.text+0x1a): undefined reference to `genl_register_family'
>>
>> Signed-off-by: Randy Dunlap 
>> Cc: Greg Kroah-Hartman 
>> Cc: Jakub Kicinski 
>> Cc: Arnd Bergmann 
>> Cc: netdev@vger.kernel.org
> 
> Good catch,
> 
> Acked-by: Arnd Bergmann 
> 
> I wonder if we also need a dependency on NETDEVICES then,
> since that is what the drivers/net/wimax/ implicitly depended on
> before.

I haven't tested it but I think that would be safe and sensible.

-- 
~Randy



Re: linux-next: Tree for Nov 3 (drivers/net/ethernet/marvell/prestera/prestera_switchdev.o)

2020-11-03 Thread Randy Dunlap
On 11/2/20 11:19 PM, Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20201102:
> 

on x86_64:

when CONFIG_BRIDGE=m:

ld: drivers/net/ethernet/marvell/prestera/prestera_switchdev.o: in function 
`prestera_bridge_port_event':
prestera_switchdev.c:(.text+0x2ebd): undefined reference to `br_vlan_enabled'


Also please add drivers/net/ethernet/marvell/prestera/ to the
MAINTAINERS file.

thanks.
-- 
~Randy
Reported-by: Randy Dunlap 


[PATCH] bpf: BPF_PRELOAD depends on BPF_SYSCALL

2020-11-05 Thread Randy Dunlap
Fix build error when BPF_SYSCALL is not set/enabled but BPF_PRELOAD is
by making BPF_PRELOAD depend on BPF_SYSCALL.

ERROR: modpost: "bpf_preload_ops" [kernel/bpf/preload/bpf_preload.ko] undefined!

Signed-off-by: Randy Dunlap 
Reported-by: kernel test robot 
Reported-by: Randy Dunlap 
Cc: Alexei Starovoitov 
Cc: Daniel Borkmann 
Cc: netdev@vger.kernel.org
Cc: b...@vger.kernel.org
---
 kernel/bpf/preload/Kconfig |1 +
 1 file changed, 1 insertion(+)

--- linux-next-20201105.orig/kernel/bpf/preload/Kconfig
+++ linux-next-20201105/kernel/bpf/preload/Kconfig
@@ -6,6 +6,7 @@ config USERMODE_DRIVER
 menuconfig BPF_PRELOAD
bool "Preload BPF file system with kernel specific program and map 
iterators"
depends on BPF
+   depends on BPF_SYSCALL
# The dependency on !COMPILE_TEST prevents it from being enabled
# in allmodconfig or allyesconfig configurations
depends on !COMPILE_TEST


Re: linux-next: Tree for Nov 5 [drivers/net/ethernet/stmicro/stmmac/dwmac-thead.ko]

2020-11-05 Thread Randy Dunlap
On 11/4/20 10:06 PM, Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20201104:
> 
> The drm-intel-fixes tree lost its build failure.
> 
> The drm-msm tree gained conflicts against the drm and drm-misc trees.
> 
> The mfd tree gained a build failure so I used the version from
> next-20201104.
> 
> The pinctrl tree lost its build failure.
> 
> The akpm-current tree gained a build failure for which I reverted
> a commit.
> 
> Non-merge commits (relative to Linus' tree): 3085
>  3498 files changed, 376683 insertions(+), 40297 deletions(-)
> 
> 
> 
> I have created today's linux-next tree at
> git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> (patches at http://www.kernel.org/pub/linux/kernel/next/ ).  If you
> are tracking the linux-next tree using git, you should not use "git pull"
> to do so as that will try to merge the new linux-next release with the
> old one.  You should use "git fetch" and checkout or reset to the new
> master.
> 
> You can see which trees have been included by looking in the Next/Trees
> file in the source.  There are also quilt-import.log and merge.log
> files in the Next directory.  Between each merge, the tree was built
> with a ppc64_defconfig for powerpc, an allmodconfig for x86_64, a
> multi_v7_defconfig for arm and a native build of tools/perf. After
> the final fixups (if any), I do an x86_64 modules_install followed by
> builds for x86_64 allnoconfig, powerpc allnoconfig (32 and 64 bit),
> ppc44x_defconfig, allyesconfig and pseries_le_defconfig and i386, sparc
> and sparc64 defconfig and htmldocs. And finally, a simple boot test
> of the powerpc pseries_le_defconfig kernel in qemu (with and without
> kvm enabled).
> 
> Below is a summary of the state of the merge.
> 
> I am currently merging 327 trees (counting Linus' and 85 trees of bug
> fix patches pending for the current merge release).
> 
> Stats about the size of the tree over time can be seen at
> http://neuling.org/linux-next-size.html .
> 
> Status of my local build tests will be at
> http://kisskb.ellerman.id.au/linux-next .  If maintainers want to give
> advice about cross compilers/configs that work, we are always open to add
> more builds.
> 
> Thanks to Randy Dunlap for doing many randconfig builds.  And to Paul
> Gortmaker for triage and bug fixes.
> 

on x86_64:

CONFIG_STMMAC_ETH=m
# CONFIG_STMMAC_PLATFORM is not set
CONFIG_DWMAC_INTEL=m
CONFIG_STMMAC_PCI=m

dwmac-thead.c is always built but it seems to expect (require) that
stmmac_platform.c is also always built, but the latter has a Kconfig
option that can be (is) disabled, resulting in build errors:

ERROR: modpost: "stmmac_pltfr_pm_ops" 
[drivers/net/ethernet/stmicro/stmmac/dwmac-thead.ko] undefined!
ERROR: modpost: "stmmac_pltfr_remove" 
[drivers/net/ethernet/stmicro/stmmac/dwmac-thead.ko] undefined!
ERROR: modpost: "stmmac_remove_config_dt" 
[drivers/net/ethernet/stmicro/stmmac/dwmac-thead.ko] undefined!
ERROR: modpost: "stmmac_probe_config_dt" 
[drivers/net/ethernet/stmicro/stmmac/dwmac-thead.ko] undefined!
ERROR: modpost: "stmmac_get_platform_resources" 
[drivers/net/ethernet/stmicro/stmmac/dwmac-thead.ko] undefined!


-- 
~Randy
Reported-by: Randy Dunlap 


Re: [PATCH net] net: marvell: prestera: fix compilation with CONFIG_BRIDGE=m

2020-11-06 Thread Randy Dunlap
On 11/6/20 8:11 AM, Vadym Kochan wrote:
> With CONFIG_BRIDGE=m the compilation fails:
> 
> ld: drivers/net/ethernet/marvell/prestera/prestera_switchdev.o: in 
> function `prestera_bridge_port_event':
> prestera_switchdev.c:(.text+0x2ebd): undefined reference to 
> `br_vlan_enabled'
> 
> in case the driver is statically enabled.
> 
> Fix it by adding 'BRIDGE || BRIDGE=n' dependency.
> 
> Fixes: e1189d9a5fbe ("net: marvell: prestera: Add Switchdev driver 
> implementation")
> Reported-by: Randy Dunlap 
> Signed-off-by: Vadym Kochan 


Acked-by: Randy Dunlap  # build-tested

Thanks.

> ---
>  drivers/net/ethernet/marvell/prestera/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/marvell/prestera/Kconfig 
> b/drivers/net/ethernet/marvell/prestera/Kconfig
> index b1fcc44f566a..b6f20e2034c6 100644
> --- a/drivers/net/ethernet/marvell/prestera/Kconfig
> +++ b/drivers/net/ethernet/marvell/prestera/Kconfig
> @@ -6,6 +6,7 @@
>  config PRESTERA
>   tristate "Marvell Prestera Switch ASICs support"
>   depends on NET_SWITCHDEV && VLAN_8021Q
> + depends on BRIDGE || BRIDGE=n
>   select NET_DEVLINK
>   help
> This driver supports Marvell Prestera Switch ASICs family.
> 


-- 
~Randy


Re: [PATCH V2 16/16] net: iosm: infrastructure

2021-04-20 Thread Randy Dunlap
Hi--

On 4/20/21 9:13 AM, M Chetan Kumar wrote:

> diff --git a/drivers/net/wwan/Kconfig b/drivers/net/wwan/Kconfig
> new file mode 100644
> index ..6507970653d2
> --- /dev/null
> +++ b/drivers/net/wwan/Kconfig
> @@ -0,0 +1,19 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +#
> +# Wireless WAN device configuration
> +#
> +
> +menuconfig WWAN
> + bool "Wireless WAN"
> + depends on NET

This already depends on NET since it is inside NETDEVICES which
depends on NET.

> + help
> +   This section contains all Wireless WAN (WWAN) device drivers.
> +
> +   If you have one of those WWAN M.2 Modules and wish to use it in Linux
> +   say Y here and also to the Module specific WWAN Device Driver.
> +
> +   If unsure, say N.
> +
> +if WWAN
> +source "drivers/net/wwan/iosm/Kconfig"
> +endif # WWAN


-- 
~Randy



Re: [PATCH v4 net-next 00/21] nvme-tcp receive offloads

2021-02-11 Thread Randy Dunlap
On 2/11/21 1:10 PM, Boris Pismenny wrote:
> Changes since v3:
> =
> * Use DDP_TCP ifdefs in iov_iter and skb iterators to minimize impact
> when compiled out (Christoph)
> * Simplify netdev references and reduce the use of
> get_netdev_for_sock (Sagi)
> * Avoid "static" in it's own line, move it one line down (Christoph)
> * Pass (queue, skb, *offset) and retrieve the pdu_seq in
> nvme_tcp_resync_response (Sagi)
> * Add missing assignment of offloading_netdev to null in offload_limits
> error case (Sagi)
> * Set req->offloaded = false once -- the lifetime rules are:
> set to false on cmd_setup / set to true when ddp setup succeeds (Sagi)
> * Replace pr_info_ratelimited with dev_info_ratelimited (Sagi)
> * Add nvme_tcp_complete_request and invoke it from two similar call
> sites (Sagi)
> * Introduce nvme_tcp_req_map_sg earlier in the series (Sagi)
> * Add nvme_tcp_consume_skb and put into it a hunk from
> nvme_tcp_recv_data to handle copy with and without offload

Hi,
Did vger.kernel.org eat patch 21/21?

and does that patch contain the Documentation updates?

thanks.
-- 
~Randy



Re: [PATCH] init: Kconfig: Fix a spelling compier to compiler in the file init/Kconfig

2021-02-24 Thread Randy Dunlap
On 2/24/21 12:14 AM, Bhaskar Chowdhury wrote:
> 
> s/compier/compiler/
> 
> Signed-off-by: Bhaskar Chowdhury 

Acked-by: Randy Dunlap 

in Subject:, "Fix a spelling" is whacked. Maybe "Fix a spello" or
"Fix typo".


> ---
>  init/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/init/Kconfig b/init/Kconfig
> index b77c60f8b963..739c3425777b 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -19,7 +19,7 @@ config CC_VERSION_TEXT
>   CC_VERSION_TEXT so it is recorded in include/config/auto.conf.cmd.
>   When the compiler is updated, Kconfig will be invoked.
> 
> -   - Ensure full rebuild when the compier is updated
> +   - Ensure full rebuild when the compiler is updated
>   include/linux/kconfig.h contains this option in the comment line so
>   fixdep adds include/config/cc/version/text.h into the auto-generated
>   dependency. When the compiler is updated, syncconfig will touch it
> --
> 2.30.1
> 


-- 
~Randy



Re: [PATCH V2] init/Kconfig: Fix a typo in CC_VERSION_TEXT help text

2021-02-24 Thread Randy Dunlap
On 2/24/21 2:33 PM, Bhaskar Chowdhury wrote:
> 
> s/compier/compiler/
> 
> Signed-off-by: Bhaskar Chowdhury 

Acked-by: Randy Dunlap 

> ---
>  Changes from V1:
>  Nathan and Randy, suggested  better subject line texts,so incorporated.
> 
>  init/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/init/Kconfig b/init/Kconfig
> index ba8bd5256980..2cfed79cc6ec 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -19,7 +19,7 @@ config CC_VERSION_TEXT
>   CC_VERSION_TEXT so it is recorded in include/config/auto.conf.cmd.
>   When the compiler is updated, Kconfig will be invoked.
> 
> -   - Ensure full rebuild when the compier is updated
> +   - Ensure full rebuild when the compiler is updated
>   include/linux/kconfig.h contains this option in the comment line so
>   fixdep adds include/config/cc/version/text.h into the auto-generated
>   dependency. When the compiler is updated, syncconfig will touch it
> --


-- 
~Randy



Re: [RESEND net-next 1/4] net: i40e: remove repeated words

2021-03-30 Thread Randy Dunlap
On 3/30/21 12:27 AM, Huazhong Tan wrote:
> From: Peng Li 
> 
> Remove repeated words "to" and "try".
> 
> Signed-off-by: Peng Li 
> Signed-off-by: Huazhong Tan \

Hi,

> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c 
> b/drivers/net/ethernet/intel/i40e/i40e_main.c
> index 0f84ed0..1555d60 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -7339,7 +7339,7 @@ static void i40e_vsi_set_default_tc_config(struct 
> i40e_vsi *vsi)
>   qcount = min_t(int, vsi->alloc_queue_pairs,
>  i40e_pf_get_max_q_per_tc(vsi->back));
>   for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) {
> - /* For the TC that is not enabled set the offset to to default
> + /* For the TC that is not enabled set the offset to default

I think that  offset to the default
would be clearer. IMO.

>* queue and allocate one queue for the given TC.
>*/
>   vsi->tc_config.tc_info[i].qoffset = 0;


thanks.
-- 
~Randy



Re: linux-next: Tree for Mar 31 (drivers/phy/marvell/phy-mvebu-cp110-utmi.o)

2021-03-31 Thread Randy Dunlap
On 3/31/21 2:43 AM, Stephen Rothwell wrote:
> Hi all,
> 
> News: there will be no linux-next release on Friday or the following
> Monday.
> 
> Changes since 20210330:
> 
> The risc-v tree gained a conflict against Linus' tree.
> 
> The amdgpu tree lost its build failure.
> 
> The staging tree gained a conflict against the scmi tree.
> 
> Non-merge commits (relative to Linus' tree): 8070
>  7884 files changed, 461929 insertions(+), 205606 deletions(-)
> 
> 
> 
> I have created today's linux-next tree at
> git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> (patches at http://www.kernel.org/pub/linux/kernel/next/ ).  If you
> are tracking the linux-next tree using git, you should not use "git pull"
> to do so as that will try to merge the new linux-next release with the
> old one.  You should use "git fetch" and checkout or reset to the new
> master.
> 
> You can see which trees have been included by looking in the Next/Trees
> file in the source.  There are also quilt-import.log and merge.log
> files in the Next directory.  Between each merge, the tree was built
> with a ppc64_defconfig for powerpc, an allmodconfig for x86_64, a
> multi_v7_defconfig for arm and a native build of tools/perf. After
> the final fixups (if any), I do an x86_64 modules_install followed by
> builds for x86_64 allnoconfig, powerpc allnoconfig (32 and 64 bit),
> ppc44x_defconfig, allyesconfig and pseries_le_defconfig and i386, sparc
> and sparc64 defconfig and htmldocs. And finally, a simple boot test
> of the powerpc pseries_le_defconfig kernel in qemu (with and without
> kvm enabled).
> 
> Below is a summary of the state of the merge.
> 
> I am currently merging 335 trees (counting Linus' and 87 trees of bug
> fix patches pending for the current merge release).
> 
> Stats about the size of the tree over time can be seen at
> http://neuling.org/linux-next-size.html .
> 
> Status of my local build tests will be at
> http://kisskb.ellerman.id.au/linux-next .  If maintainers want to give
> advice about cross compilers/configs that work, we are always open to add
> more builds.
> 
> Thanks to Randy Dunlap for doing many randconfig builds.  And to Paul
> Gortmaker for triage and bug fixes.
> 

on i386:

ld: drivers/phy/marvell/phy-mvebu-cp110-utmi.o: in function 
`mvebu_cp110_utmi_phy_probe':
phy-mvebu-cp110-utmi.c:(.text+0x152): undefined reference to 
`of_usb_get_dr_mode_by_phy'


Full randconfig file is attached.

-- 
~Randy
Reported-by: Randy Dunlap 


config-r8542.gz
Description: application/gzip


Re: linux-next: Tree for Mar 31 (drivers/phy/marvell/phy-mvebu-cp110-utmi.o)

2021-04-01 Thread Randy Dunlap
On 4/1/21 5:33 AM, Kostya Porotchkin wrote:
> Hi, Randy,
> 
>> -Original Message-----
>> From: Randy Dunlap 
>> Sent: Wednesday, March 31, 2021 18:28
>> To: Stephen Rothwell ; Linux Next Mailing List > n...@vger.kernel.org>
>> Cc: Linux Kernel Mailing List ; Kostya
>> Porotchkin ; netdev@vger.kernel.org
>> Subject: [EXT] Re: linux-next: Tree for Mar 31 
>> (drivers/phy/marvell/phy-mvebu-
>> cp110-utmi.o)
>>
> 
> 
>>
>> on i386:
>>
>> ld: drivers/phy/marvell/phy-mvebu-cp110-utmi.o: in function
>> `mvebu_cp110_utmi_phy_probe':
>> phy-mvebu-cp110-utmi.c:(.text+0x152): undefined reference to
>> `of_usb_get_dr_mode_by_phy'
>>
> [KP] This driver depends on ARCH_MVEBU (arm64).
> How it happens that it is included in i386 builds?

Due to COMPILE_TEST:

config PHY_MVEBU_CP110_UTMI
tristate "Marvell CP110 UTMI driver"
depends on ARCH_MVEBU || COMPILE_TEST
depends on OF
select GENERIC_PHY


> 
> Regards
> Kosta
>>
>> Full randconfig file is attached.
>>
>> --


-- 
~Randy



Re: linux-next: Tree for Mar 31 (drivers/phy/marvell/phy-mvebu-cp110-utmi.o)

2021-04-01 Thread Randy Dunlap
On 4/1/21 9:29 AM, Randy Dunlap wrote:
> On 4/1/21 5:33 AM, Kostya Porotchkin wrote:
>> Hi, Randy,
>>
>>> -Original Message-
>>> From: Randy Dunlap 
>>> Sent: Wednesday, March 31, 2021 18:28
>>> To: Stephen Rothwell ; Linux Next Mailing List 
>>> >> n...@vger.kernel.org>
>>> Cc: Linux Kernel Mailing List ; Kostya
>>> Porotchkin ; netdev@vger.kernel.org
>>> Subject: [EXT] Re: linux-next: Tree for Mar 31 
>>> (drivers/phy/marvell/phy-mvebu-
>>> cp110-utmi.o)
>>>
>>
>>
>>>
>>> on i386:
>>>
>>> ld: drivers/phy/marvell/phy-mvebu-cp110-utmi.o: in function
>>> `mvebu_cp110_utmi_phy_probe':
>>> phy-mvebu-cp110-utmi.c:(.text+0x152): undefined reference to
>>> `of_usb_get_dr_mode_by_phy'
>>>
>> [KP] This driver depends on ARCH_MVEBU (arm64).
>> How it happens that it is included in i386 builds?
> 
> Due to COMPILE_TEST:
> 
> config PHY_MVEBU_CP110_UTMI
>   tristate "Marvell CP110 UTMI driver"
>   depends on ARCH_MVEBU || COMPILE_TEST
>   depends on OF
>   select GENERIC_PHY
> 
> 
>>
>> Regards
>> Kosta
>>>
>>> Full randconfig file is attached.
>>>
>>> --

This happens because CONFIG_USB is not set but the missing
function is only compiled if CONFIG_USB_COMMON is set.

-- 
~Randy



Re: [PATCH v2 net-next] net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)

2021-04-08 Thread Randy Dunlap
On 4/8/21 2:15 AM, Dexuan Cui wrote:
> diff --git a/drivers/net/ethernet/microsoft/Kconfig 
> b/drivers/net/ethernet/microsoft/Kconfig
> new file mode 100644
> index ..12ef6b581566
> --- /dev/null
> +++ b/drivers/net/ethernet/microsoft/Kconfig
> @@ -0,0 +1,30 @@
> +#
> +# Microsoft Azure network device configuration
> +#
> +
> +config NET_VENDOR_MICROSOFT
> + bool "Microsoft Azure Network Device"

Seems to me that should be generalized, more like:

bool "Microsoft Network Devices"


> + default y
> + help
> +   If you have a network (Ethernet) device belonging to this class, say 
> Y.
> +
> +   Note that the answer to this question doesn't directly affect the
> +   kernel: saying N will just cause the configurator to skip the
> +   question about Microsoft Azure network device. If you say Y, you

   about Microsoft networking devices.

> +   will be asked for your specific device in the following question.
> +
> +if NET_VENDOR_MICROSOFT
> +
> +config MICROSOFT_MANA
> + tristate "Microsoft Azure Network Adapter (MANA) support"
> + default m

Please drop the default m. We don't randomly add drivers to be built.

Or leave this as is and change NET_VENDOR_MICROSOFT to be default n.


> + depends on PCI_MSI && X86_64
> + select PCI_HYPERV
> + help
> +   This driver supports Microsoft Azure Network Adapter (MANA).
> +   So far, the driver is only validated on X86_64.

validated how?


> +
> +   To compile this driver as a module, choose M here.
> +   The module will be called mana.
> +
> +endif #NET_VENDOR_MICROSOFT


thanks.
-- 
~Randy



Re: [PATCH v3 net-next] net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)

2021-04-08 Thread Randy Dunlap
On 4/8/21 3:58 PM, Dexuan Cui wrote:
> Changes in v3:
> Changed the Kconfig file:
> Microsoft Azure Network Device ==> Microsoft Network Devices
> Drop the default m
> validated ==> supported

Hi,
I am satisfied with the Kconfig changes.

thanks.
-- 
~Randy



[PATCH] lib: remove "expecting prototype" kernel-doc warnings

2021-04-11 Thread Randy Dunlap
Fix various kernel-doc warnings in lib/ due to missing or
erroneous function names.
Add kernel-doc for some function parameters that was missing.
Use kernel-doc "Return:" notation in earlycpio.c.

Quietens the following warnings:

../lib/earlycpio.c:61: warning: expecting prototype for cpio_data 
find_cpio_data(). Prototype was for find_cpio_data() instead

../lib/lru_cache.c:640: warning: expecting prototype for lc_dump(). Prototype 
was for lc_seq_dump_details() instead
lru_cache.c:90: warning: Function parameter or member 'cache' not described in 
'lc_create'

../lib/parman.c:368: warning: expecting prototype for parman_item_del(). 
Prototype was for parman_item_remove() instead
parman.c:309: warning: Excess function parameter 'prority' description in 
'parman_prio_init'

../lib/radix-tree.c:703: warning: expecting prototype for 
__radix_tree_insert(). Prototype was for radix_tree_insert() instead
radix-tree.c:180: warning: Excess function parameter 'addr' description in 
'radix_tree_find_next_bit'
radix-tree.c:180: warning: Excess function parameter 'size' description in 
'radix_tree_find_next_bit'
radix-tree.c:931: warning: Function parameter or member 'iter' not described in 
'radix_tree_iter_replace'

Signed-off-by: Randy Dunlap 
Cc: Andrew Morton 
Cc: Philipp Reisner 
Cc: Lars Ellenberg 
Cc: drbd-...@lists.linbit.com
Cc: Jiri Pirko 
Cc: netdev@vger.kernel.org
Cc: Matthew Wilcox 
---
 lib/earlycpio.c  |4 ++--
 lib/lru_cache.c  |3 ++-
 lib/parman.c |4 ++--
 lib/radix-tree.c |   11 ++-
 4 files changed, 12 insertions(+), 10 deletions(-)

--- linux-next-20210409.orig/lib/earlycpio.c
+++ linux-next-20210409/lib/earlycpio.c
@@ -40,7 +40,7 @@ enum cpio_fields {
 };
 
 /**
- * cpio_data find_cpio_data - Search for files in an uncompressed cpio
+ * find_cpio_data - Search for files in an uncompressed cpio
  * @path:   The directory to search for, including a slash at the end
  * @data:   Pointer to the cpio archive or a header inside
  * @len:Remaining length of the cpio based on data pointer
@@ -49,7 +49,7 @@ enum cpio_fields {
  *  matching file itself. It can be used to iterate through the 
cpio
  *  to find all files inside of a directory path.
  *
- * @return: struct cpio_data containing the address, length and
+ * Return:  &struct cpio_data containing the address, length and
  *  filename (with the directory path cut off) of the found file.
  *  If you search for a filename and not for files in a directory,
  *  pass the absolute path of the filename in the cpio and make 
sure
--- linux-next-20210409.orig/lib/lru_cache.c
+++ linux-next-20210409/lib/lru_cache.c
@@ -76,6 +76,7 @@ int lc_try_lock(struct lru_cache *lc)
 /**
  * lc_create - prepares to track objects in an active set
  * @name: descriptive name only used in lc_seq_printf_stats and 
lc_seq_dump_details
+ * @cache: cache root pointer
  * @max_pending_changes: maximum changes to accumulate until a transaction is 
required
  * @e_count: number of elements allowed to be active simultaneously
  * @e_size: size of the tracked objects
@@ -627,7 +628,7 @@ void lc_set(struct lru_cache *lc, unsign
 }
 
 /**
- * lc_dump - Dump a complete LRU cache to seq in textual form.
+ * lc_seq_dump_details - Dump a complete LRU cache to seq in textual form.
  * @lc: the lru cache to operate on
  * @seq: the &struct seq_file pointer to seq_printf into
  * @utext: user supplied additional "heading" or other info
--- linux-next-20210409.orig/lib/parman.c
+++ linux-next-20210409/lib/parman.c
@@ -297,7 +297,7 @@ EXPORT_SYMBOL(parman_destroy);
  * parman_prio_init - initializes a parman priority chunk
  * @parman:parman instance
  * @prio:  parman prio structure to be initialized
- * @prority:   desired priority of the chunk
+ * @priority:  desired priority of the chunk
  *
  * Note: all locking must be provided by the caller.
  *
@@ -356,7 +356,7 @@ int parman_item_add(struct parman *parma
 EXPORT_SYMBOL(parman_item_add);
 
 /**
- * parman_item_del - deletes parman item
+ * parman_item_remove - deletes parman item
  * @parman:parman instance
  * @prio:  parman prio instance to delete the item from
  * @item:  parman item instance
--- linux-next-20210409.orig/lib/radix-tree.c
+++ linux-next-20210409/lib/radix-tree.c
@@ -166,9 +166,9 @@ static inline void all_tag_set(struct ra
 /**
  * radix_tree_find_next_bit - find the next set bit in a memory region
  *
- * @addr: The address to base the search on
- * @size: The bitmap size in bits
- * @offset: The bitnumber to start searching at
+ * @node: where to begin the search
+ * @tag: the tag index
+ * @offset: the bitnumber to start searching at
  *
  * Unrollable variant of find_next_bit() for constant size arrays.
  * Tail bits starting from size to roundup(size, BI

Re: mmotm 2021-04-11-20-47 uploaded (bpf: xsk.c)

2021-04-12 Thread Randy Dunlap
On 4/11/21 8:48 PM, a...@linux-foundation.org wrote:
> The mm-of-the-moment snapshot 2021-04-11-20-47 has been uploaded to
> 
>https://www.ozlabs.org/~akpm/mmotm/
> 
> mmotm-readme.txt says
> 
> README for mm-of-the-moment:
> 
> https://www.ozlabs.org/~akpm/mmotm/
> 
> This is a snapshot of my -mm patch queue.  Uploaded at random hopefully
> more than once a week.
> 
> You will need quilt to apply these patches to the latest Linus release (5.x
> or 5.x-rcY).  The series file is in broken-out.tar.gz and is duplicated in
> https://ozlabs.org/~akpm/mmotm/series
> 
> The file broken-out.tar.gz contains two datestamp files: .DATE and
> .DATE--mm-dd-hh-mm-ss.  Both contain the string -mm-dd-hh-mm-ss,
> followed by the base kernel version against which this patch series is to
> be applied.
> 
> This tree is partially included in linux-next.  To see which patches are
> included in linux-next, consult the `series' file.  Only the patches
> within the #NEXT_PATCHES_START/#NEXT_PATCHES_END markers are included in
> linux-next.
> 
> 
> A full copy of the full kernel tree with the linux-next and mmotm patches
> already applied is available through git within an hour of the mmotm
> release.  Individual mmotm releases are tagged.  The master branch always
> points to the latest release, so it's constantly rebasing.
> 
>   https://github.com/hnaz/linux-mm
> 
> The directory https://www.ozlabs.org/~akpm/mmots/ (mm-of-the-second)
> contains daily snapshots of the -mm tree.  It is updated more frequently
> than mmotm, and is untested.
> 
> A git copy of this tree is also available at
> 
>   https://github.com/hnaz/linux-mm

on x86_64:

xsk.c: In function ‘xsk_socket__create_shared’:
xsk.c:1027:7: error: redeclaration of ‘unmap’ with no linkage
  bool unmap = umem->fill_save != fill;
   ^
xsk.c:1020:7: note: previous declaration of ‘unmap’ was here
  bool unmap, rx_setup_done = false, tx_setup_done = false;
   ^
xsk.c:1028:7: error: redefinition of ‘rx_setup_done’
  bool rx_setup_done = false, tx_setup_done = false;
   ^
xsk.c:1020:14: note: previous definition of ‘rx_setup_done’ was here
  bool unmap, rx_setup_done = false, tx_setup_done = false;
  ^
xsk.c:1028:30: error: redefinition of ‘tx_setup_done’
  bool rx_setup_done = false, tx_setup_done = false;
  ^
xsk.c:1020:37: note: previous definition of ‘tx_setup_done’ was here
  bool unmap, rx_setup_done = false, tx_setup_done = false;
 ^


Full randconfig file is attached.

-- 
~Randy
Reported-by: Randy Dunlap 


config-r8702.gz
Description: application/gzip


Re: [PATCH] lib: remove "expecting prototype" kernel-doc warnings

2021-04-13 Thread Randy Dunlap
On 4/13/21 11:18 AM, Andrew Morton wrote:
> On Sun, 11 Apr 2021 15:17:56 -0700 Randy Dunlap  wrote:
> 
>> Fix various kernel-doc warnings in lib/ due to missing or
>> erroneous function names.
>> Add kernel-doc for some function parameters that was missing.
>> Use kernel-doc "Return:" notation in earlycpio.c.
>>
>> Quietens the following warnings:
>>
>> ../lib/earlycpio.c:61: warning: expecting prototype for cpio_data 
>> find_cpio_data(). Prototype was for find_cpio_data() instead
>>
>> ../lib/lru_cache.c:640: warning: expecting prototype for lc_dump(). 
>> Prototype was for lc_seq_dump_details() instead
>> lru_cache.c:90: warning: Function parameter or member 'cache' not described 
>> in 'lc_create'
> 
> I'm still seeing this.
> 

Weird. I can't reproduce it.

>> lru_cache.c:90: warning: Function parameter or member 'cache' not described 
>> in 'lc_create'
> 
> But it looks OK:
> 

Yes.

> /**
>  * lc_create - prepares to track objects in an active set
>  * @name: descriptive name only used in lc_seq_printf_stats and 
> lc_seq_dump_details
>  * @cache: cache root pointer
>  * @max_pending_changes: maximum changes to accumulate until a transaction is 
> required
>  * @e_count: number of elements allowed to be active simultaneously
>  * @e_size: size of the tracked objects
>  * @e_off: offset to the &struct lc_element member in a tracked object
>  *
>  * Returns a pointer to a newly initialized struct lru_cache on success,
>  * or NULL on (allocation) failure.
>  */
> struct lru_cache *lc_create(const char *name, struct kmem_cache *cache,
>   unsigned max_pending_changes,
>   unsigned e_count, size_t e_size, size_t e_off)
> {
> 

I'll keep looking...

-- 
~Randy



Re: mmotm 2021-04-11-20-47 uploaded (bpf: xsk.c)

2021-04-13 Thread Randy Dunlap
On 4/13/21 3:18 PM, Andrii Nakryiko wrote:
> On Mon, Apr 12, 2021 at 9:38 AM Randy Dunlap  wrote:
>>
>> On 4/11/21 8:48 PM, a...@linux-foundation.org wrote:
>>> The mm-of-the-moment snapshot 2021-04-11-20-47 has been uploaded to
>>>
>>>https://www.ozlabs.org/~akpm/mmotm/
>>>
>>> mmotm-readme.txt says
>>>
>>> README for mm-of-the-moment:
>>>
>>> https://www.ozlabs.org/~akpm/mmotm/
>>>
>>> This is a snapshot of my -mm patch queue.  Uploaded at random hopefully
>>> more than once a week.
>>>
>>> You will need quilt to apply these patches to the latest Linus release (5.x
>>> or 5.x-rcY).  The series file is in broken-out.tar.gz and is duplicated in
>>> https://ozlabs.org/~akpm/mmotm/series
>>>
>>> The file broken-out.tar.gz contains two datestamp files: .DATE and
>>> .DATE--mm-dd-hh-mm-ss.  Both contain the string -mm-dd-hh-mm-ss,
>>> followed by the base kernel version against which this patch series is to
>>> be applied.
>>>
>>> This tree is partially included in linux-next.  To see which patches are
>>> included in linux-next, consult the `series' file.  Only the patches
>>> within the #NEXT_PATCHES_START/#NEXT_PATCHES_END markers are included in
>>> linux-next.
>>>
>>>
>>> A full copy of the full kernel tree with the linux-next and mmotm patches
>>> already applied is available through git within an hour of the mmotm
>>> release.  Individual mmotm releases are tagged.  The master branch always
>>> points to the latest release, so it's constantly rebasing.
>>>
>>>   https://github.com/hnaz/linux-mm
>>>
>>> The directory https://www.ozlabs.org/~akpm/mmots/ (mm-of-the-second)
>>> contains daily snapshots of the -mm tree.  It is updated more frequently
>>> than mmotm, and is untested.
>>>
>>> A git copy of this tree is also available at
>>>
>>>   https://github.com/hnaz/linux-mm
>>
>> on x86_64:
>>
>> xsk.c: In function ‘xsk_socket__create_shared’:
>> xsk.c:1027:7: error: redeclaration of ‘unmap’ with no linkage
>>   bool unmap = umem->fill_save != fill;
>>^
>> xsk.c:1020:7: note: previous declaration of ‘unmap’ was here
>>   bool unmap, rx_setup_done = false, tx_setup_done = false;
>>^
>> xsk.c:1028:7: error: redefinition of ‘rx_setup_done’
>>   bool rx_setup_done = false, tx_setup_done = false;
>>^
>> xsk.c:1020:14: note: previous definition of ‘rx_setup_done’ was here
>>   bool unmap, rx_setup_done = false, tx_setup_done = false;
>>   ^
>> xsk.c:1028:30: error: redefinition of ‘tx_setup_done’
>>   bool rx_setup_done = false, tx_setup_done = false;
>>   ^
>> xsk.c:1020:37: note: previous definition of ‘tx_setup_done’ was here
>>   bool unmap, rx_setup_done = false, tx_setup_done = false;
>>  ^
>>
>>
>> Full randconfig file is attached.
> 
> What SHA are you on? I checked that github tree, the source code there
> doesn't correspond to the errors here (i.e., there is no unmap
> redefinition on lines 1020 and 1027). Could it be some local merge
> conflict?

Yes, it seems to have been a merge problem in mmotm 2021-04-11.
It is fixed/OK in today's mmotm 2021-04013.

thanks.

-- 
~Randy



[PATCH net-next] net: xilinx: drivers need/depend on HAS_IOMEM

2021-04-16 Thread Randy Dunlap
kernel test robot reports build errors in 3 Xilinx ethernet drivers.
They all use ioremap functions that are only available when HAS_IOMEM
is set/enabled. If it is not enabled, they all have build errors,
so make these 3 drivers depend on HAS_IOMEM.

ld: drivers/net/ethernet/xilinx/xilinx_emaclite.o: in function 
`xemaclite_of_probe':
xilinx_emaclite.c:(.text+0x9fc): undefined reference to `devm_ioremap_resource'

ld: drivers/net/ethernet/xilinx/xilinx_axienet_main.o: in function 
`axienet_probe':
xilinx_axienet_main.c:(.text+0x942): undefined reference to 
`devm_ioremap_resource'

ld: drivers/net/ethernet/xilinx/ll_temac_main.o: in function `temac_probe':
ll_temac_main.c:(.text+0x1283): undefined reference to 
`devm_platform_ioremap_resource_byname'
ld: ll_temac_main.c:(.text+0x13ad): undefined reference to `devm_of_iomap'
ld: ll_temac_main.c:(.text+0x162e): undefined reference to 
`devm_platform_ioremap_resource'

Fixes: 8a3b7a252dca ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet 
driver")
Signed-off-by: Randy Dunlap 
Reported-by: kernel test robot 
Cc: Radhey Shyam Pandey 
Cc: Gary Guo 
Cc: Zhang Changzhong 
Cc: Andre Przywara 
Cc: sta...@vger.kernel.org
Cc: Daniel Borkmann 
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
Cc: netdev@vger.kernel.org
---
 drivers/net/ethernet/xilinx/Kconfig |3 +++
 1 file changed, 3 insertions(+)

--- linux-next-20210416.orig/drivers/net/ethernet/xilinx/Kconfig
+++ linux-next-20210416/drivers/net/ethernet/xilinx/Kconfig
@@ -18,12 +18,14 @@ if NET_VENDOR_XILINX
 
 config XILINX_EMACLITE
tristate "Xilinx 10/100 Ethernet Lite support"
+   depends on HAS_IOMEM
select PHYLIB
help
  This driver supports the 10/100 Ethernet Lite from Xilinx.
 
 config XILINX_AXI_EMAC
tristate "Xilinx 10/100/1000 AXI Ethernet support"
+   depends on HAS_IOMEM
select PHYLINK
help
  This driver supports the 10/100/1000 Ethernet from Xilinx for the
@@ -31,6 +33,7 @@ config XILINX_AXI_EMAC
 
 config XILINX_LL_TEMAC
tristate "Xilinx LL TEMAC (LocalLink Tri-mode Ethernet MAC) driver"
+   depends on HAS_IOMEM
select PHYLIB
help
  This driver supports the Xilinx 10/100/1000 LocalLink TEMAC


Re: linux-next: Tree for Jan 28 [drivers/net/dsa/hirschmann/hellcreek_sw]

2021-01-28 Thread Randy Dunlap
On 1/28/21 1:11 AM, Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20210127:
> 


on i386:

ERROR: modpost: "taprio_offload_get" 
[drivers/net/dsa/hirschmann/hellcreek_sw.ko] undefined!
ERROR: modpost: "taprio_offload_free" 
[drivers/net/dsa/hirschmann/hellcreek_sw.ko] undefined!

Full randconfig file is attached.

-- 
~Randy
Reported-by: Randy Dunlap 



config-r7455.gz
Description: application/gzip


Re: [PATCH net-next] net: dsa: hellcreek: Add missing TAPRIO dependency

2021-01-28 Thread Randy Dunlap
On 1/28/21 8:33 AM, Kurt Kanzenbach wrote:
> Add missing dependency to TAPRIO to avoid build failures such as:
> 
> |ERROR: modpost: "taprio_offload_get" 
> [drivers/net/dsa/hirschmann/hellcreek_sw.ko] undefined!
> |ERROR: modpost: "taprio_offload_free" 
> [drivers/net/dsa/hirschmann/hellcreek_sw.ko] undefined!
> 
> Fixes: 24dfc6eb39b2 ("net: dsa: hellcreek: Add TAPRIO offloading support")
> Reported-by: Randy Dunlap 
> Signed-off-by: Kurt Kanzenbach 
> ---
>  drivers/net/dsa/hirschmann/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> Note: It's not against net, because the fixed commit is not in net tree, yet.
> 
> diff --git a/drivers/net/dsa/hirschmann/Kconfig 
> b/drivers/net/dsa/hirschmann/Kconfig
> index e01191107a4b..9ea2c643f8f8 100644
> --- a/drivers/net/dsa/hirschmann/Kconfig
> +++ b/drivers/net/dsa/hirschmann/Kconfig
> @@ -5,6 +5,7 @@ config NET_DSA_HIRSCHMANN_HELLCREEK
>   depends on NET_DSA
>   depends on PTP_1588_CLOCK
>   depends on LEDS_CLASS
> + depends on NET_SCH_TAPRIO
>   select NET_DSA_TAG_HELLCREEK
>   help
>     This driver adds support for Hirschmann Hellcreek TSN switches.
> 

Thanks. This fixes the build errors.
Acked-by: Randy Dunlap  # build-tested
 

However, I do see this in the build output when
NET_DSA_HIRSCHMANN_HELLCREEK is disabled:

  AR  drivers/net/dsa/hirschmann/built-in.a

That is an empty archive file (8 bytes), which is caused by
drivers/net/dsa/Makefile:

obj-y       += hirschmann/


Is there some reason that it's not done like this?
This passes my y/m/n testing.

---
From: Randy Dunlap 

This prevents descending into the net/dsa/hirschmann/ subdirectory
and building an empty archive file:

  AR  drivers/net/dsa/hirschmann/built-in.a

Signed-off-by: Randy Dunlap 
---
 drivers/net/dsa/Makefile |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20210128.orig/drivers/net/dsa/Makefile
+++ linux-next-20210128/drivers/net/dsa/Makefile
@@ -18,7 +18,7 @@ obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX) +=
 obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX_PLATFORM) += vitesse-vsc73xx-platform.o
 obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX_SPI) += vitesse-vsc73xx-spi.o
 obj-y  += b53/
-obj-y  += hirschmann/
+obj-$(CONFIG_NET_DSA_HIRSCHMANN_HELLCREEK) += hirschmann/
 obj-y  += microchip/
 obj-y  += mv88e6xxx/
 obj-y  += ocelot/






  1   2   3   4   5   6   7   >