Commit Graph

2081 Commits

Author SHA1 Message Date
Michal Schmidt 7052eaa805 net: Add struct kernel_ethtool_ts_info
JIRA: https://issues.redhat.com/browse/RHEL-57750

commit 2111375b85ad173d58e7b8604246a3de60950ac8
Author: Kory Maincent <kory.maincent@bootlin.com>
Date:   Tue Jul 9 15:53:38 2024 +0200

    net: Add struct kernel_ethtool_ts_info

    In prevision to add new UAPI for hwtstamp we will be limited to the struct
    ethtool_ts_info that is currently passed in fixed binary format through the
    ETHTOOL_GET_TS_INFO ethtool ioctl. It would be good if new kernel code
    already started operating on an extensible kernel variant of that
    structure, similar in concept to struct kernel_hwtstamp_config vs struct
    hwtstamp_config.

    Since struct ethtool_ts_info is in include/uapi/linux/ethtool.h, here
    we introduce the kernel-only structure in include/linux/ethtool.h.
    The manual copy is then made in the function called by ETHTOOL_GET_TS_INFO.

    Acked-by: Shannon Nelson <shannon.nelson@amd.com>
    Acked-by: Alexandra Winter <wintera@linux.ibm.com>
    Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
    Link: https://patch.msgid.link/20240709-feature_ptp_netnext-v17-6-b5317f50df2a@bootlin.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Conflicts:
	drivers/net/dsa/microchip/ksz_ptp.c
	drivers/net/dsa/microchip/ksz_ptp.h
	drivers/net/ethernet/engleder/tsnep_ethtool.c
	drivers/net/ethernet/fungible/funeth/funeth_ethtool.c
	drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c
	drivers/net/ethernet/renesas/rtsn.c
	net/dsa/user.c
	- code not present in RHEL

	drivers/net/ethernet/microchip/sparx5/sparx5_ethtool.c
	drivers/net/ethernet/mscc/ocelot_ptp.c
	- code disabled in RHEL config

	drivers/net/ethernet/hisilicon/hns3/hnae3.h
	drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c
	drivers/net/ethernet/sfc/ptp.h
	- context conflicts due to patching out-of-order

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
2024-10-01 12:19:15 +02:00
Ivan Vecera fa738d292c ethtool: replace struct ethtool_eee with a new struct ethtool_keee on kernel side
JIRA: https://issues.redhat.com/browse/RHEL-32101

Conflicts:
- hunks for missing files were omitted
- conversion for qca was done in drivers/net/dsa/qca/qca8k.c due to
  missing commits in qca driver
- net/dsa changes were done in net/dsa/slave.c due to missing commits
  in DSA subsystem

commit d80a52335374e484a4ff2afdc9af843e73273945
Author: Heiner Kallweit <hkallweit1@gmail.com>
Date:   Sat Jan 27 14:25:09 2024 +0100

    ethtool: replace struct ethtool_eee with a new struct ethtool_keee on kernel side

    In order to pass EEE link modes beyond bit 32 to userspace we have to
    complement the 32 bit bitmaps in struct ethtool_eee with linkmode
    bitmaps. Therefore, similar to ethtool_link_settings and
    ethtool_link_ksettings, add a struct ethtool_keee. In a first step
    it's an identical copy of ethtool_eee. This patch simply does a
    s/ethtool_eee/ethtool_keee/g for all users.
    No functional change intended.

    Suggested-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
2024-04-29 12:11:22 +02:00
Lucas Zampieri cdaa424a4d Merge: CNB95: ethtool: Add ethtool_puts() and convert drivers to use it
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3989

JIRA: https://issues.redhat.com/browse/RHEL-31886  
Tested: Just built, no functional change  

Commits:
```
ed9417206de7 ("net: dsa: lantiq_gswip: replace deprecated strncpy with ethtool_sprintf")
ac49b992578d ("net: dsa: mt7530: replace deprecated strncpy with ethtool_sprintf")
659ce55fddd2 ("net: fec: replace deprecated strncpy with ethtool_sprintf")
e3bbab4754de ("net: dsa: vsc73xx: replace deprecated strncpy with ethtool_sprintf")
e343023e03d2 ("net: sparx5: replace deprecated strncpy with ethtool_sprintf")
c3983d5e99b2 ("net: phy: tja11xx: replace deprecated strncpy with ethtool_sprintf")
4ddc1f1f7339 ("net: phy: smsc: replace deprecated strncpy with ethtool_sprintf")
d97af2440a0c ("intel: fix format warnings")
2a48c635fd9a ("ethtool: Implement ethtool_puts()")
9b5f621cea6e ("checkpatch: add ethtool_sprintf rules")
e403cffff1a4 ("net: Convert some ethtool_sprintf() to ethtool_puts()")
```

Signed-off-by: Ivan Vecera <ivecera@redhat.com>

Approved-by: Corinna Vinschen <vinschen@redhat.com>
Approved-by: Petr Oros <poros@redhat.com>
Approved-by: Guillaume Nault <gnault@redhat.com>

Merged-by: Lucas Zampieri <lzampier@redhat.com>
2024-04-22 12:45:33 +00:00
Ivan Vecera da99183327 net: Convert some ethtool_sprintf() to ethtool_puts()
JIRA: https://issues.redhat.com/browse/RHEL-31886

Conflicts:
- hunks for missing files were skipped
- drivers/net/ethernet/freescale/fec_main.c
  adjusted due to missing commit 6970ef27ff7fd ("net: fec: add xdp and
  page pool statistics")
- drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
  adjusted due to missing commit 15137daef7b0d ("nfp: add support for
  'ethtool -t DEVNAME' command")

commit e403cffff1a46ab1a95d3bc72e92634445d68328
Author: justinstitt@google.com <justinstitt@google.com>
Date:   Wed Dec 6 23:16:12 2023 +0000

    net: Convert some ethtool_sprintf() to ethtool_puts()

    This patch converts some basic cases of ethtool_sprintf() to
    ethtool_puts().

    The conversions are used in cases where ethtool_sprintf() was being used
    with just two arguments:
    |       ethtool_sprintf(&data, buffer[i].name);
    or when it's used with format string: "%s"
    |       ethtool_sprintf(&data, "%s", buffer[i].name);
    which both now become:
    |       ethtool_puts(&data, buffer[i].name);

    Signed-off-by: Justin Stitt <justinstitt@google.com>
    Reviewed-by: Wei Fang <wei.fang@nxp.com>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Reviewed-by: Louis Peens <louis.peens@corigine.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
2024-04-05 11:27:44 +02:00
Ivan Vecera c8a48a8e32 net: dsa: vsc73xx: replace deprecated strncpy with ethtool_sprintf
JIRA: https://issues.redhat.com/browse/RHEL-31886

commit e3bbab4754dec801cefdd1b55920aff1bffac09d
Author: Justin Stitt <justinstitt@google.com>
Date:   Tue Oct 10 22:32:35 2023 +0000

    net: dsa: vsc73xx: replace deprecated strncpy with ethtool_sprintf

    `strncpy` is deprecated for use on NUL-terminated destination strings
    [1] and as such we should prefer more robust and less ambiguous string
    interfaces.

    ethtool_sprintf() is designed specifically for get_strings() usage.
    Let's replace strncpy in favor of this more robust and easier to
    understand interface.

    This change could result in misaligned strings when if(cnt) fails. To
    combat this, use ternary to place empty string in buffer and properly
    increment pointer to next string slot.

    Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
    Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2]
    Link: https://github.com/KSPP/linux/issues/90
    Signed-off-by: Justin Stitt <justinstitt@google.com>
    Reviewed-by: Kees Cook <keescook@chromium.org>
    Link: https://lore.kernel.org/r/20231010-strncpy-drivers-net-dsa-vitesse-vsc73xx-core-c-v2-1-ba4416a9ff23@google.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
2024-04-05 11:27:12 +02:00
Ivan Vecera 06f80604a4 net: dsa: mt7530: replace deprecated strncpy with ethtool_sprintf
JIRA: https://issues.redhat.com/browse/RHEL-31886

commit ac49b992578d366bde19cfb9316d07784e255d2c
Author: Justin Stitt <justinstitt@google.com>
Date:   Mon Oct 9 18:29:19 2023 +0000

    net: dsa: mt7530: replace deprecated strncpy with ethtool_sprintf

    `strncpy` is deprecated for use on NUL-terminated destination strings
    [1] and as such we should prefer more robust and less ambiguous string
    interfaces.

    ethtool_sprintf() is designed specifically for get_strings() usage.
    Let's replace strncpy in favor of this more robust and easier to
    understand interface.

    Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
    Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2]
    Link: https://github.com/KSPP/linux/issues/90
    Signed-off-by: Justin Stitt <justinstitt@google.com>
    Reviewed-by: Kees Cook <keescook@chromium.org>
    Acked-by: Daniel Golle <daniel@makrotopia.org>
    Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Link: https://lore.kernel.org/r/20231009-strncpy-drivers-net-dsa-mt7530-c-v1-1-ec6677a6436a@google.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
2024-04-05 11:27:00 +02:00
Ivan Vecera ee14c1cc97 net: dsa: lantiq_gswip: replace deprecated strncpy with ethtool_sprintf
JIRA: https://issues.redhat.com/browse/RHEL-31886

commit ed9417206de7d306d6f79340fbe4849d3bdfae4e
Author: Justin Stitt <justinstitt@google.com>
Date:   Mon Oct 9 18:24:20 2023 +0000

    net: dsa: lantiq_gswip: replace deprecated strncpy with ethtool_sprintf

    `strncpy` is deprecated for use on NUL-terminated destination strings
    [1] and as such we should prefer more robust and less ambiguous string
    interfaces.

    ethtool_sprintf() is designed specifically for get_strings() usage.
    Let's replace strncpy in favor of this more robust and easier to
    understand interface.

    Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
    Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2]
    Link: https://github.com/KSPP/linux/issues/90
    Signed-off-by: Justin Stitt <justinstitt@google.com>
    Reviewed-by: Kees Cook <keescook@chromium.org>
    Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
    Link: https://lore.kernel.org/r/20231009-strncpy-drivers-net-dsa-lantiq_gswip-c-v1-1-d55a986a14cc@google.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
2024-04-05 11:26:49 +02:00
Ivan Vecera a2e239b543 net: flow_dissector: Use 64bits for used_keys
JIRA: https://issues.redhat.com/browse/RHEL-29648

Conflicts:
- many conflicts caused by absence of certain changes in network drivers
  and netfilter core. The resolution were done by replacing BIT by BIT_ULL
  where FLOW_DISSECTOR_KEY_* are used and by replacing '%x' by '%llx'
  where used_keys is used as format string argument.

commit 2b3082c6ef3b0104d822f6f18d2afbe5fc9a5c2c
Author: Ratheesh Kannoth <rkannoth@marvell.com>
Date:   Sat Jul 29 04:52:15 2023 +0530

    net: flow_dissector: Use 64bits for used_keys

    As 32bits of dissector->used_keys are exhausted,
    increase the size to 64bits.

    This is base change for ESP/AH flow dissector patch.
    Please find patch and discussions at
    https://lore.kernel.org/netdev/ZMDNjD46BvZ5zp5I@corigine.com/T/#t

    Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
    Reviewed-by: Petr Machata <petrm@nvidia.com> # for mlxsw
    Tested-by: Petr Machata <petrm@nvidia.com>
    Reviewed-by: Martin Habets <habetsm.xilinx@gmail.com>
    Reviewed-by: Simon Horman <simon.horman@corigine.com>
    Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
2024-03-25 14:11:42 +01:00
Ivan Vecera b1b78e0dab net/sched: taprio: replace tc_taprio_qopt_offload :: enable with a "cmd" enum
JIRA: https://issues.redhat.com/browse/RHEL-1773

Conflicts:
- N/A hunks for unsupported drivers were removed

commit 2d800bc500fb3fb07a0fb42e2d0a1356fb9e1e8f
Author: Vladimir Oltean <vladimir.oltean@nxp.com>
Date:   Tue May 30 12:19:45 2023 +0300

    net/sched: taprio: replace tc_taprio_qopt_offload :: enable with a "cmd" enum

    Inspired from struct flow_cls_offload :: cmd, in order for taprio to be
    able to report statistics (which is future work), it seems that we need
    to drill one step further with the ndo_setup_tc(TC_SETUP_QDISC_TAPRIO)
    multiplexing, and pass the command as part of the common portion of the
    muxed structure.

    Since we already have an "enable" variable in tc_taprio_qopt_offload,
    refactor all drivers to check for "cmd" instead of "enable", and reject
    every other command except "replace" and "destroy" - to be future proof.

    Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
    Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> # for lan966x
    Acked-by: Kurt Kanzenbach <kurt@linutronix.de> # hellcreek
    Reviewed-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
    Reviewed-by: Gerhard Engleder <gerhard@engleder-embedded.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
2023-10-13 09:03:09 +02:00
Mark Langsdorf f2ff71d7be net: Convert more users of mdiobus_* to mdiodev_*
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2178302

commit 65aa371ea52a92dd10826a2ea74bd2c395ee90a8
Author: Sean Anderson <sean.anderson@seco.com>
Date:   Fri Oct 22 11:59:14 2021 -0400

This converts users of mdiobus to mdiodev using the following semantic
patch:

@@
identifier mdiodev;
expression regnum;
@@

- mdiobus_read(mdiodev->bus, mdiodev->addr, regnum)
+ mdiodev_read(mdiodev, regnum)

@@
identifier mdiodev;
expression regnum, val;
@@

- mdiobus_write(mdiodev->bus, mdiodev->addr, regnum, val)
+ mdiodev_write(mdiodev, regnum, val)

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2023-06-08 12:33:10 -04:00
Petr Oros 2c8dee9554 net: devlink: let the core report the driver name instead of the drivers
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2172273

Conflicts:
-  drivers/ptp/ptp_ocp.c: chunk skipped due to missing
   773bda96492153 ("ptp: ocp: Expose various resources on the
   timecard.")
-  Unmerged, because file missing in rhel:
    drivers/net/ethernet/fungible/funeth/funeth_devlink.c
    drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c
    drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_devlink.c

Upstream commit(s):
commit 226bf980550627c88549b112ac6c8fb40873afb4
Author: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Date:   Tue Nov 29 18:51:38 2022 +0900

    net: devlink: let the core report the driver name instead of the drivers

    The driver name is available in device_driver::name. Right now,
    drivers still have to report this piece of information themselves in
    their devlink_ops::info_get callback function.

    In order to factorize code, make devlink_nl_info_fill() add the driver
    name attribute.

    Now that the core sets the driver name attribute, drivers are not
    supposed to call devlink_info_driver_name_put() anymore. Remove
    devlink_info_driver_name_put() and clean-up all the drivers using this
    function in their callback.

    Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
    Tested-by: Ido Schimmel <idosch@nvidia.com> # mlxsw
    Reviewed-by: Jacob Keller  <jacob.e.keller@intel.com>
    Reviewed-by: Jiri Pirko <jiri@nvidia.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Petr Oros <poros@redhat.com>
2023-04-03 14:06:02 +02:00
Jan Stancek 12f19869a5 Merge: CNB: net: move from strlcpy with unused retval to strscpy
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/2125

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2175236
Tested: Just build

Commits:
```
f029c781dd6d ("net: ethernet: move from strlcpy with unused retval to strscpy")
fb3ceec187e8 ("net: move from strlcpy with unused retval to strscpy")
```

Signed-off-by: Ivan Vecera <ivecera@redhat.com>

Approved-by: Mohamed Gamal Morsy <mgamal@redhat.com>
Approved-by: José Ignacio Tornos Martínez <jtornosm@redhat.com>
Approved-by: Petr Oros <poros@redhat.com>
Approved-by: Jiri Benc <jbenc@redhat.com>
Approved-by: John W. Linville <linville@redhat.com>
Approved-by: Íñigo Huguet <ihuguet@redhat.com>
Approved-by: Corinna Vinschen <vinschen@redhat.com>

Signed-off-by: Jan Stancek <jstancek@redhat.com>
2023-03-29 12:09:13 +02:00
Ivan Vecera d1e58e3d4c net: move from strlcpy with unused retval to strscpy
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2175236

Conflicts:
- hunk for vmxnet3 was omitted as it is already applied

commit fb3ceec187e8bca474340e361a18163a2e79c0a2
Author: Wolfram Sang <wsa+renesas@sang-engineering.com>
Date:   Tue Aug 30 22:14:52 2022 +0200

    net: move from strlcpy with unused retval to strscpy

    Follow the advice of the below link and prefer 'strscpy' in this
    subsystem. Conversion is 1:1 because the return value is not used.
    Generated by a coccinelle script.

    Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
    Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
    Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> # for CAN
    Link: https://lore.kernel.org/r/20220830201457.7984-1-wsa+renesas@sang-engineering.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
2023-03-14 14:32:35 +01:00
Juri Lelli 3df2721aac net: dsa: xrs700x: Use irqsave variant for u64 stats update
Bugzilla: https://bugzilla.redhat.com/2171995

commit 3f8ae9fe0409698799e173f698b714f34570b64b
Author:    Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date:      Thu Aug 25 13:36:44 2022 +0200

    net: dsa: xrs700x: Use irqsave variant for u64 stats update

    xrs700x_read_port_counters() updates the stats from a worker using the
    u64_stats_update_begin() version. This is okay on 32-UP since on the
    reader side preemption is disabled.
    On 32bit-SMP the writer can be preempted by the reader at which point
    the reader will spin on the seqcount until writer continues and
    completes the update.

    Assigning the mib_mutex mutex to the underlying seqcount would ensure
    proper synchronisation. The API for that on the u64_stats_init() side
    isn't available. Since it is the only user, just use disable interrupts
    during the update.

    Use u64_stats_update_begin_irqsave() on the writer side to ensure an
    uninterrupted update.

    Fixes: ee00b24f32 ("net: dsa: add Arrow SpeedChips XRS700x driver")
    Cc: Andrew Lunn <andrew@lunn.ch>
    Cc: Florian Fainelli <f.fainelli@gmail.com>
    Cc: George McCollister <george.mccollister@gmail.com>
    Cc: Vivien Didelot <vivien.didelot@gmail.com>
    Cc: Vladimir Oltean <olteanv@gmail.com>
    Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Acked-by: George McCollister <george.mccollister@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
2023-02-27 13:46:07 +01:00
Mark Salter b812acb336 net: make xpcs_do_config to accept advertising for pcs-xpcs and sja1105
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2122226

commit fa9c562f9735d24c3253747eb21f3f0c0f6de48e
Author: Ong Boon Leong <boon.leong.ong@intel.com>
Date: Wed, 15 Jun 2022 16:39:04 +0800

    xpcs_config() has 'advertising' input that is required for C37 1000BASE-X
    AN in later patch series. So, we prepare xpcs_do_config() for it.

    For sja1105, xpcs_do_config() is used for xpcs configuration without
    depending on advertising input, so set to NULL.

    Reported-by: kernel test robot <lkp@intel.com>
    Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Mark Salter <msalter@redhat.com>
2022-10-17 14:49:17 -04:00
Mark Salter f7526b99f0 net: update NXP copyright text
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2122226

commit 3c9cfb5269f76d447dbadb67835368f3111a91d7
Author: Vladimir Oltean <vladimir.oltean@nxp.com>
Date: Fri, 17 Sep 2021 14:17:35 +0300

    NXP Legal insists that the following are not fine:

    - Saying "NXP Semiconductors" instead of "NXP", since the company's
      registered name is "NXP"

    - Putting a "(c)" sign in the copyright string

    - Putting a comma in the copyright string

    The only accepted copyright string format is "Copyright <year-range> NXP".

    This patch changes the copyright headers in the networking files that
    were sent by me, or derived from code sent by me.

    Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Mark Salter <msalter@redhat.com>
2022-10-17 14:49:09 -04:00
Petr Oros 21e2fb0e83 net: Don't include filter.h from net/sock.h
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2101792

Conflicts:
drivers/infiniband/core/cache.c
- adjusted context conflict due to missing b74525f21e33ab ("RDMA/core:
  Delete useless module.h include")
drivers/infiniband/hw/mlx5/fs.c
- missing upstream commit ffa501ef196312 ("RDMA/mlx5: Add steering support in
  optional flow counters") adding net/inet_ecn.h. Without inet_ecn.h missing
  declarations for ether_addr_copy() and is_multicast_ether_addr()
  We add net/inet_ecn.h include in this commit.
drivers/net/amt.c
- Unmerged because file missing in RHEL

Upstream commit(s):
commit b6459415b384cb829f0b2a4268f211c789f6cf0b
Author: Jakub Kicinski <kuba@kernel.org>
Date:   Tue Dec 28 16:49:13 2021 -0800

    net: Don't include filter.h from net/sock.h

    sock.h is pretty heavily used (5k objects rebuilt on x86 after
    it's touched). We can drop the include of filter.h from it and
    add a forward declaration of struct sk_filter instead.
    This decreases the number of rebuilt objects when bpf.h
    is touched from ~5k to ~1k.

    There's a lot of missing includes this was masking. Primarily
    in networking tho, this time.

    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Acked-by: Florian Fainelli <f.fainelli@gmail.com>
    Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
    Acked-by: Stefano Garzarella <sgarzare@redhat.com>
    Link: https://lore.kernel.org/bpf/20211229004913.513372-1-kuba@kernel.org

Signed-off-by: Petr Oros <poros@redhat.com>
2022-07-13 10:49:16 +02:00
Patrick Talbert 164ce13234 Merge: CNB: Update TC subsystem to upstream v5.18
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/971

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2090410
Depends: https://bugzilla.redhat.com/show_bug.cgi?id=2094002
Tested: Using TC related kernel self-tests

The series rebases TC subsystem to upstream v5.18

Commits:
```
f79a3bcb1a50 ("net/sched: Remove unnecessary if statement")
409f386b8e5d ("qdisc: add new field for qdisc_enqueue tracepoint")
56af5e749f20 ("net/sched: act_skbmod: Add SKBMOD_F_ECN option support")
68f9884837c6 ("tc-testing: Add control-plane selftest for skbmod SKBMOD_F_ECN option")
695176bfe5de ("net_sched: refactor TC action init API")
625af9f0298b ("tc-testing: Add control-plane selftests for sch_mq")
a5397d68b2db ("net/sched: cls_api, reset flags on replay")
efe487fce306 ("fix array-index-out-of-bounds in taprio_change")
1e080f17750d ("net: sched: update default qdisc visibility after Tx queue cnt changes")
2e367522ce6b ("netdevsim: add ability to change channel count")
2d6a58996ee2 ("selftests: net: test ethtool -L vs mq")
f7116fb46085 ("net: sched: move and reuse mq_change_real_num_tx()")
b193e15ac69d ("net: prevent user from passing illegal stab size")
69508d43334e ("net_sched: Use struct_size() and flex_array_size() helpers")
129291980f49 ("net: sched: Use struct_size() helper in kvmalloc()")
fbf307c89eb0 ("gen_stats: Add instead Set the value in __gnet_stats_copy_basic().")
448e163f8b9b ("gen_stats: Add gnet_stats_add_queue().")
7361df4606ba ("mq, mqprio: Use gnet_stats_add_queue().")
10940eb746d4 ("gen_stats: Move remaining users to gnet_stats_add_queue().")
f2efdb179289 ("u64_stats: Introduce u64_stats_set()")
67c9e6270f30 ("net: sched: Protect Qdisc::bstats with u64_stats")
f56940daa5a7 ("net: sched: Use _bstats_update/set() instead of raw writes")
50dc9a8572aa ("net: sched: Merge Qdisc::bstats and Qdisc::cpu_bstats data types")
29cbcd858283 ("net: sched: Remove Qdisc::running sequence counter")
4c57e2fac41c ("net: sched: fix logic error in qdisc_run_begin()")
97604c65bcda ("net: sched: remove one pair of atomic operations")
6b3efbfa4e68 ("net: sch_tbf: Add a graft command")
e22db7bd552f ("net: sched: Allow statistics reads from softirq.")
c5c6e589a8c8 ("net: stats: Read the statistics in ___gnet_stats_copy_basic() instead of adding.")
f25c0515c521 ("net: sched: gred: dynamically allocate tc_gred_qopt_offload")
267463823adb ("net: sch: eliminate unnecessary RCU waits in mini_qdisc_pair_swap()")
85c0c3eb9a66 ("net: sch: simplify condtion for selecting mini_Qdisc_pair buffer")
648a991cf316 ("sch_htb: Add extack messages for EOPNOTSUPP errors")
6de6e46d27ef ("cls_flower: Fix inability to match GRE/IPIP packets")
af0a51113cb7 ("selftests: forwarding: Fix packet matching in mirroring selftests")
cb3ef7b00042 ("net: sched: sch_netem: Refactor code in 4-state loss generator")
bdf1565fe03d ("selftests/tc-testing: match any qdisc type")
b43c2793f5e9 ("netfilter: nfnetlink_queue: silence bogus compiler warning")
43332cf97425 ("net/sched: act_ct: Offload only ASSURED connections")
40bd094d65fc ("flow_offload: fill flags to action structure")
144d4c9e800d ("flow_offload: reject to offload tc actions in offload drivers")
5a9959008fb6 ("flow_offload: add index to flow_action_entry structure")
9c1c0e124ca2 ("flow_offload: rename offload functions with offload instead of flow")
c54e1d920f04 ("flow_offload: add ops to tc_action_ops for flow action setup")
8cbfe939abe9 ("flow_offload: allow user to offload tc action to net device")
7adc57651211 ("flow_offload: add skip_hw and skip_sw to control if offload the action")
bcd64368584b ("flow_offload: rename exts stats update functions with hw")
c7a66f8d8a94 ("flow_offload: add process to update action stats from hardware")
e8cb5bcf6ed6 ("net: sched: save full flags for tc action")
13926d19a11e ("flow_offload: add reoffload process to update hw_count")
c86e0209dc77 ("flow_offload: validate flags of filter and actions")
eb473bac4a4b ("selftests: tc-testing: add action offload selftest for action and filter")
c48c94b0ab75 ("net/sched: use min() macro instead of doing it manually")
963178a06352 ("flow_offload: fix suspicious RCU usage when offloading tc action")
9795ded7f924 ("net/sched: act_ct: Fill offloading tuple iifidx")
b702436a51df ("net: openvswitch: Fill act ct extension")
7d18a07897d0 ("sch_qfq: prevent shift-out-of-bounds in qfq_init_qdisc")
c25af830ab26 ("sch_cake: revise Diffserv docs")
719774377622 ("netfilter: conntrack: convert to refcount_t api")
3fce16493dc1 ("netfilter: core: move ip_ct_attach indirection to struct nf_ct_hook")
285c8a7a5815 ("netfilter: make function op structures const")
6ae7989c9af0 ("netfilter: conntrack: avoid useless indirection during conntrack destruction")
408bdcfce8df ("net: prefer nf_ct_put instead of nf_conntrack_put")
fb80445c438c ("net_sched: restore "mpu xxx" handling")
973bf8fdd12f ("net: sched: Clarify error message when qdisc kind is unknown")
bb62a765b1b5 ("netfilter: conntrack: make all extensions 8-byte alignned")
5f31edc0676b ("netfilter: conntrack: move extension sizes into core")
1bc91a5ddf3e ("netfilter: conntrack: handle ->destroy hook via nat_ops instead")
1015c3de23ee ("netfilter: conntrack: remove extension register api")
34243b9ec856 ("netfilter: nft_ct: fix use after free when attaching zone template")
429c3be8a5e2 ("sch_htb: Fail on unsupported parameters when offload is requested")
98b608629746 ("net: sched: remove psched_tdiff_bounded()")
a459bc9a3a68 ("net: sched: remove qdisc_qlen_cpu()")
04c2a47ffb13 ("net: sched: fix use-after-free in tc_new_tfilter()")
35d39fecbc24 ("net/sched: Enable tc skb ext allocation on chain miss only when needed")
4ddc844eb81d ("net/sched: act_police: more accurate MTU policing")
5891cd5ec46c ("net_sched: add __rcu annotation to netdev->qdisc")
5740d0689096 ("net: sched: limit TC_ACT_REPEAT loops")
2f131de361f6 ("net/sched: act_ct: Fix flow table lookup after ct clear or switching zones")
ecf4a24cf978 ("net: sched: avoid newline at end of message in NL_SET_ERR_MSG_MOD")
b8cd5831c61c ("net: flow_offload: add tc police action parameters")
d97b4b105ce7 ("flow_offload: reject offload for all drivers with invalid police parameters")
fcb6aa86532c ("act_ct: Support GRE offload")
db6140e5e35a ("net/sched: act_ct: Fix flow table lookup failure with no originating ifindex")
d922a99b96d0 ("flow_offload: improve extack msg for user when adding invalid filter")
ab95465cde23 ("net/sched: add vlan push_eth and pop_eth action to the hardware IR")
054d5575cd6e ("net/sched: fix incorrect vlan_push_eth dest field")
bcb74e132a76 ("net/sched: act_ct: fix ref leak when switching zones")
2105f700b53c ("net/sched: flower: fix parsing of ethertype following VLAN header")
e65812fd22eb ("net/sched: fix initialization order when updating chain 0 head")
e8a64bbaaad1 ("net/sched: taprio: Check if socket flags are valid")
3db09e762dc7 ("net/sched: cls_u32: fix netns refcount changes in u32_change()")
ec5b0f605b10 ("net/sched: cls_u32: fix possible leak in u32_init_knode()")
8b796475fd78 ("net/sched: act_pedit: really ensure the skb is writable")
4d42d54a7d6a ("net/sched: act_pedit: sanitize shift argument before usage")
86360030cc51 ("net/sched: act_api: fix error code in tcf_ct_flow_table_fill_tuple_ipv6()")
```

Signed-off-by: Ivan Vecera <ivecera@redhat.com>

Approved-by: Marcelo Ricardo Leitner <mleitner@redhat.com>
Approved-by: Corinna Vinschen <vinschen@redhat.com>
Approved-by: Jarod Wilson <jarod@redhat.com>
Approved-by: Davide Caratti <dcaratti@redhat.com>
Approved-by: Petr Oros <poros@redhat.com>

Signed-off-by: Patrick Talbert <ptalbert@redhat.com>
2022-06-21 10:07:08 +02:00
Patrick Talbert 0b353d8be8 Merge: CNB: net: consolidate neif_rx() and make it callable from any context
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/968

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2089703
Tested: basic network tests on lo, tun, veth

Series consolidate neif_rx() and make it callable from any context.
It is backport for these upstream series:
 da54d75bebf4d8 ("Merge branch 'netdev-RT'")
 9f9919f73c94ae ("Merge branch 'netif_rx'")
 83b7b77af37a89 ("Merge branch 'netif_rx-conversions-part2'")
 e21af12622c0fb ("Merge branch 'netif_rx-part3'")

Omitted-fix: b903117b48681e12fae38e09c874f38c45186dc6
Omitted-fix: e1f9e434617fb28097223d9484de66218bc0b52d

Signed-off-by: Petr Oros <poros@redhat.com>

Approved-by: Jiri Benc <jbenc@redhat.com>
Approved-by: Hangbin Liu <haliu@redhat.com>
Approved-by: John W. Linville <linville@redhat.com>

Signed-off-by: Patrick Talbert <ptalbert@redhat.com>
2022-06-10 09:44:49 +02:00
Ivan Vecera 26efa3d722 flow_offload: reject offload for all drivers with invalid police parameters
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2090410

Conflicts:
- small context conflicts due to missing commits de5bbb6f7e4c ("net: mscc:
  ocelot: support egress VLAN rewriting via VCAP ES0") and
  bbab5f9332ee ("nfp: refactor policer config to support ingress/egress
  meter")

commit d97b4b105ce71f9f907f1511986cc1d224126772
Author: Jianbo Liu <jianbol@nvidia.com>
Date:   Thu Feb 24 10:29:08 2022 +0000

    flow_offload: reject offload for all drivers with invalid police parameters

    As more police parameters are passed to flow_offload, driver can check
    them to make sure hardware handles packets in the way indicated by tc.
    The conform-exceed control should be drop/pipe or drop/ok. Besides,
    for drop/ok, the police should be the last action. As hardware can't
    configure peakrate/avrate/overhead, offload should not be supported if
    any of them is configured.

    Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
    Reviewed-by: Ido Schimmel <idosch@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
2022-06-06 16:32:25 +02:00
Ivan Vecera 0f80ae1519 flow_offload: add index to flow_action_entry structure
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2090410

Conflicts:
- N/A chunks for unsupported drivers were removed

commit 5a9959008fb63191538ab0f7800f4cf26afe7750
Author: Baowen Zheng <baowen.zheng@corigine.com>
Date:   Fri Dec 17 19:16:19 2021 +0100

    flow_offload: add index to flow_action_entry structure

    Add index to flow_action_entry structure and delete index from police and
    gate child structure.

    We make this change to offload tc action for driver to identify a tc
    action.

    Signed-off-by: Baowen Zheng <baowen.zheng@corigine.com>
    Signed-off-by: Simon Horman <simon.horman@corigine.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
2022-06-06 16:31:16 +02:00
Petr Oros d4a784f482 net: dsa: Use netif_rx().
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2089703

Upstream commit(s):
commit db00cc9da079315f199e2b65cc4e05eeb94236e2
Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date:   Thu Mar 3 18:15:01 2022 +0100

    net: dsa: Use netif_rx().

    Since commit
       baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.")

    the function netif_rx() can be used in preemptible/thread context as
    well as in interrupt context.

    Use netif_rx().

    Cc: Kurt Kanzenbach <kurt@linutronix.de>
    Cc: Andrew Lunn <andrew@lunn.ch>
    Cc: Vivien Didelot <vivien.didelot@gmail.com>
    Cc: Florian Fainelli <f.fainelli@gmail.com>
    Cc: Vladimir Oltean <olteanv@gmail.com>
    Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Acked-by: Kurt Kanzenbach <kurt@linutronix.de> # hellcreek
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Petr Oros <poros@redhat.com>
2022-06-06 11:54:24 +02:00
Hangbin Liu 2821f7d854 ethernet: fix PTP_1588_CLOCK dependencies
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2066451
Upstream Status: net.git commit e5f31552674e

Conflicts: context conflicts due to apply commit
55c8fca1da ("ptp_pch: Restore dependency on PCI") first.

commit e5f31552674e88bff3a4e3ca3e5357668b5f2973
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Thu Aug 12 20:33:58 2021 +0200

    ethernet: fix PTP_1588_CLOCK dependencies

    The 'imply' keyword does not do what most people think it does, it only
    politely asks Kconfig to turn on another symbol, but does not prevent
    it from being disabled manually or built as a loadable module when the
    user is built-in. In the ICE driver, the latter now causes a link failure:

    aarch64-linux-ld: drivers/net/ethernet/intel/ice/ice_main.o: in function `ice_eth_ioctl':
    ice_main.c:(.text+0x13b0): undefined reference to `ice_ptp_get_ts_config'
    ice_main.c:(.text+0x13b0): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `ice_ptp_get_ts_config'
    aarch64-linux-ld: ice_main.c:(.text+0x13bc): undefined reference to `ice_ptp_set_ts_config'
    ice_main.c:(.text+0x13bc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `ice_ptp_set_ts_config'
    aarch64-linux-ld: drivers/net/ethernet/intel/ice/ice_main.o: in function `ice_prepare_for_reset':
    ice_main.c:(.text+0x31fc): undefined reference to `ice_ptp_release'
    ice_main.c:(.text+0x31fc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `ice_ptp_release'
    aarch64-linux-ld: drivers/net/ethernet/intel/ice/ice_main.o: in function `ice_rebuild':

    This is a recurring problem in many drivers, and we have discussed
    it several times befores, without reaching a consensus. I'm providing
    a link to the previous email thread for reference, which discusses
    some related problems.

    To solve the dependency issue better than the 'imply' keyword, introduce a
    separate Kconfig symbol "CONFIG_PTP_1588_CLOCK_OPTIONAL" that any driver
    can depend on if it is able to use PTP support when available, but works
    fine without it. Whenever CONFIG_PTP_1588_CLOCK=m, those drivers are
    then prevented from being built-in, the same way as with a 'depends on
    PTP_1588_CLOCK || !PTP_1588_CLOCK' dependency that does the same trick,
    but that can be rather confusing when you first see it.

    Since this should cover the dependencies correctly, the IS_REACHABLE()
    hack in the header is no longer needed now, and can be turned back
    into a normal IS_ENABLED() check. Any driver that gets the dependency
    wrong will now cause a link time failure rather than being unable to use
    PTP support when that is in a loadable module.

    However, the two recently added ptp_get_vclocks_index() and
    ptp_convert_timestamp() interfaces are only called from builtin code with
    ethtool and socket timestamps, so keep the current behavior by stubbing
    those out completely when PTP is in a loadable module. This should be
    addressed properly in a follow-up.

    As Richard suggested, we may want to actually turn PTP support into a
    'bool' option later on, preventing it from being a loadable module
    altogether, which would be one way to solve the problem with the ethtool
    interface.

    Fixes: 06c16d89d2 ("ice: register 1588 PTP clock device object for E810 devices")
    Link: https://lore.kernel.org/netdev/20210804121318.337276-1-arnd@kernel.org/
    Link: https://lore.kernel.org/netdev/CAK8P3a06enZOf=XyZ+zcAwBczv41UuCTz+=0FMf2gBz1_cOnZQ@mail.gmail.com/
    Link: https://lore.kernel.org/netdev/CAK8P3a3=eOxE-K25754+fB_-i_0BZzf9a9RfPTX3ppSwu9WZXw@mail.gmail.com/
    Link: https://lore.kernel.org/netdev/20210726084540.3282344-1-arnd@kernel.org/
    Acked-by: Shannon Nelson <snelson@pensando.io>
    Acked-by: Jacob Keller <jacob.e.keller@intel.com>
    Acked-by: Richard Cochran <richardcochran@gmail.com>
    Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Link: https://lore.kernel.org/r/20210812183509.1362782-1-arnd@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Hangbin Liu <haliu@redhat.com>
2022-05-16 12:22:59 +08:00
Petr Oros 53d6114661 net_tstamp: add new flag HWTSTAMP_FLAG_BONDED_PHC_INDEX
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2073458

Conflicts:
- adjusted context conflicts: drivers/net/ethernet/intel/i40e/i40e_ptp.c
  drivers/net/ethernet/xscale/ixp4xx_eth.c
- unmerged path (not in RHEL): drivers/net/ethernet/engleder/tsnep_ptp.c

Upstream commit(s):
commit 9c9211a3fc7aa41b2952765b62000443b3bb6f23
Author: Hangbin Liu <liuhangbin@gmail.com>
Date:   Fri Dec 10 16:59:58 2021 +0800

    net_tstamp: add new flag HWTSTAMP_FLAG_BONDED_PHC_INDEX

    Since commit 94dd016ae538 ("bond: pass get_ts_info and SIOC[SG]HWTSTAMP
    ioctl to active device") the user could get bond active interface's
    PHC index directly. But when there is a failover, the bond active
    interface will change, thus the PHC index is also changed. This may
    break the user's program if they did not update the PHC timely.

    This patch adds a new hwtstamp_config flag HWTSTAMP_FLAG_BONDED_PHC_INDEX.
    When the user wants to get the bond active interface's PHC, they need to
    add this flag and be aware the PHC index may be changed.

    With the new flag. All flag checks in current drivers are removed. Only
    the checking in net_hwtstamp_validate() is kept.

    Suggested-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Petr Oros <poros@redhat.com>
2022-04-08 23:16:36 +02:00
Kurt Kanzenbach b7658ed35a net: dsa: hellcreek: Adjust schedule look ahead window
Traffic schedules can only be started up to eight seconds within the
future. Therefore, the driver periodically checks every two seconds whether the
admin base time provided by the user is inside that window. If so the schedule
is started. Otherwise the check is deferred.

However, according to the programming manual the look ahead window size should
be four - not eight - seconds. By using the proposed value of four seconds
starting a schedule at a specified admin base time actually works as expected.

Fixes: 24dfc6eb39 ("net: dsa: hellcreek: Add TAPRIO offloading support")
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-26 10:26:06 +01:00
Kurt Kanzenbach a7db5ed863 net: dsa: hellcreek: Fix incorrect setting of GCL
Currently the gate control list which is programmed into the hardware is
incorrect resulting in wrong traffic schedules. The problem is the loop
variables are incremented before they are referenced. Therefore, move the
increment to the end of the loop.

Fixes: 24dfc6eb39 ("net: dsa: hellcreek: Add TAPRIO offloading support")
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-26 10:26:05 +01:00
Nathan Rossi 3b0720ba00 net: dsa: mv88e6xxx: Update mv88e6393x serdes errata
In early erratas this issue only covered port 0 when changing from
[x]MII (rev A 3.6). In subsequent errata versions this errata changed to
cover the additional "Hardware reset in CPU managed mode" condition, and
removed the note specifying that it only applied to port 0.

In designs where the device is configured with CPU managed mode
(CPU_MGD), on reset all SERDES ports (p0, p9, p10) have a stuck power
down bit and require this initial power up procedure. As such apply this
errata to all three SERDES ports of the mv88e6393x.

Signed-off-by: Nathan Rossi <nathan.rossi@digi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-24 10:48:46 +01:00
Vladimir Oltean ed5d2937a6 net: dsa: sja1105: fix use-after-free after calling of_find_compatible_node, or worse
It seems that of_find_compatible_node has a weird calling convention in
which it calls of_node_put() on the "from" node argument, instead of
leaving that up to the caller. This comes from the fact that
of_find_compatible_node with a non-NULL "from" argument it only supposed
to be used as the iterator function of for_each_compatible_node(). OF
iterator functions call of_node_get on the next OF node and of_node_put()
on the previous one.

When of_find_compatible_node calls of_node_put, it actually never
expects the refcount to drop to zero, because the call is done under the
atomic devtree_lock context, and when the refcount drops to zero it
triggers a kobject and a sysfs file deletion, which assume blocking
context.

So any driver call to of_find_compatible_node is probably buggy because
an unexpected of_node_put() takes place.

What should be done is to use the of_get_compatible_child() function.

Fixes: 5a8f09748e ("net: dsa: sja1105: register the MDIO buses for 100base-T1 and 100base-TX")
Link: https://lore.kernel.org/netdev/20210814010139.kzryimmp4rizlznt@skbuf/
Suggested-by: Frank Rowand <frowand.list@gmail.com>
Suggested-by: Rob Herring <robh+dt@kernel.org>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-18 10:21:01 +01:00
Vladimir Oltean 700fa08da4 net: dsa: sja1105: unregister the MDIO buses during teardown
The call to sja1105_mdiobus_unregister is present in the error path but
absent from the main driver unbind path.

Fixes: 5a8f09748e ("net: dsa: sja1105: register the MDIO buses for 100base-T1 and 100base-TX")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-12 10:53:40 +01:00
Vladimir Oltean 21b52fed92 net: dsa: sja1105: fix broken backpressure in .port_fdb_dump
rtnl_fdb_dump() has logic to split a dump of PF_BRIDGE neighbors into
multiple netlink skbs if the buffer provided by user space is too small
(one buffer will typically handle a few hundred FDB entries).

When the current buffer becomes full, nlmsg_put() in
dsa_slave_port_fdb_do_dump() returns -EMSGSIZE and DSA saves the index
of the last dumped FDB entry, returns to rtnl_fdb_dump() up to that
point, and then the dump resumes on the same port with a new skb, and
FDB entries up to the saved index are simply skipped.

Since dsa_slave_port_fdb_do_dump() is pointed to by the "cb" passed to
drivers, then drivers must check for the -EMSGSIZE error code returned
by it. Otherwise, when a netlink skb becomes full, DSA will no longer
save newly dumped FDB entries to it, but the driver will continue
dumping. So FDB entries will be missing from the dump.

Fix the broken backpressure by propagating the "cb" return code and
allow rtnl_fdb_dump() to restart the FDB dump with a new skb.

Fixes: 291d1e72b7 ("net: dsa: sja1105: Add support for FDB and MDB management")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-10 13:17:22 +01:00
Vladimir Oltean 871a73a1c8 net: dsa: lantiq: fix broken backpressure in .port_fdb_dump
rtnl_fdb_dump() has logic to split a dump of PF_BRIDGE neighbors into
multiple netlink skbs if the buffer provided by user space is too small
(one buffer will typically handle a few hundred FDB entries).

When the current buffer becomes full, nlmsg_put() in
dsa_slave_port_fdb_do_dump() returns -EMSGSIZE and DSA saves the index
of the last dumped FDB entry, returns to rtnl_fdb_dump() up to that
point, and then the dump resumes on the same port with a new skb, and
FDB entries up to the saved index are simply skipped.

Since dsa_slave_port_fdb_do_dump() is pointed to by the "cb" passed to
drivers, then drivers must check for the -EMSGSIZE error code returned
by it. Otherwise, when a netlink skb becomes full, DSA will no longer
save newly dumped FDB entries to it, but the driver will continue
dumping. So FDB entries will be missing from the dump.

Fix the broken backpressure by propagating the "cb" return code and
allow rtnl_fdb_dump() to restart the FDB dump with a new skb.

Fixes: 58c59ef9e9 ("net: dsa: lantiq: Add Forwarding Database access")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-10 13:17:22 +01:00
Vladimir Oltean ada2fee185 net: dsa: lan9303: fix broken backpressure in .port_fdb_dump
rtnl_fdb_dump() has logic to split a dump of PF_BRIDGE neighbors into
multiple netlink skbs if the buffer provided by user space is too small
(one buffer will typically handle a few hundred FDB entries).

When the current buffer becomes full, nlmsg_put() in
dsa_slave_port_fdb_do_dump() returns -EMSGSIZE and DSA saves the index
of the last dumped FDB entry, returns to rtnl_fdb_dump() up to that
point, and then the dump resumes on the same port with a new skb, and
FDB entries up to the saved index are simply skipped.

Since dsa_slave_port_fdb_do_dump() is pointed to by the "cb" passed to
drivers, then drivers must check for the -EMSGSIZE error code returned
by it. Otherwise, when a netlink skb becomes full, DSA will no longer
save newly dumped FDB entries to it, but the driver will continue
dumping. So FDB entries will be missing from the dump.

Fix the broken backpressure by propagating the "cb" return code and
allow rtnl_fdb_dump() to restart the FDB dump with a new skb.

Fixes: ab335349b8 ("net: dsa: lan9303: Add port_fast_age and port_fdb_dump methods")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-10 13:17:22 +01:00
Vladimir Oltean cd391280bf net: dsa: hellcreek: fix broken backpressure in .port_fdb_dump
rtnl_fdb_dump() has logic to split a dump of PF_BRIDGE neighbors into
multiple netlink skbs if the buffer provided by user space is too small
(one buffer will typically handle a few hundred FDB entries).

When the current buffer becomes full, nlmsg_put() in
dsa_slave_port_fdb_do_dump() returns -EMSGSIZE and DSA saves the index
of the last dumped FDB entry, returns to rtnl_fdb_dump() up to that
point, and then the dump resumes on the same port with a new skb, and
FDB entries up to the saved index are simply skipped.

Since dsa_slave_port_fdb_do_dump() is pointed to by the "cb" passed to
drivers, then drivers must check for the -EMSGSIZE error code returned
by it. Otherwise, when a netlink skb becomes full, DSA will no longer
save newly dumped FDB entries to it, but the driver will continue
dumping. So FDB entries will be missing from the dump.

Fix the broken backpressure by propagating the "cb" return code and
allow rtnl_fdb_dump() to restart the FDB dump with a new skb.

Fixes: e4b27ebc78 ("net: dsa: Add DSA driver for Hirschmann Hellcreek switches")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Acked-by: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-10 13:17:22 +01:00
Ben Hutchings 411d466d94 net: dsa: microchip: ksz8795: Don't use phy_port_cnt in VLAN table lookup
The magic number 4 in VLAN table lookup was the number of entries we
can read and write at once.  Using phy_port_cnt here doesn't make
sense and presumably broke VLAN filtering for 3-port switches.  Change
it back to 4.

Fixes: 4ce2a984ab ("net: dsa: microchip: ksz8795: use phy_port_cnt ...")
Signed-off-by: Ben Hutchings <ben.hutchings@mind.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-10 09:58:15 +01:00
Ben Hutchings 164844135a net: dsa: microchip: ksz8795: Fix VLAN filtering
Currently ksz8_port_vlan_filtering() sets or clears the VLAN Enable
hardware flag.  That controls discarding of packets with a VID that
has not been enabled for any port on the switch.

Since it is a global flag, set the dsa_switch::vlan_filtering_is_global
flag so that the DSA core understands this can't be controlled per
port.

When VLAN filtering is enabled, the switch should also discard packets
with a VID that's not enabled on the ingress port.  Set or clear each
external port's VLAN Ingress Filter flag in ksz8_port_vlan_filtering()
to make that happen.

Fixes: e66f840c08 ("net: dsa: ksz: Add Microchip KSZ8795 DSA driver")
Signed-off-by: Ben Hutchings <ben.hutchings@mind.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-10 09:58:15 +01:00
Ben Hutchings 9130c2d30c net: dsa: microchip: ksz8795: Use software untagging on CPU port
On the CPU port, we can support both tagged and untagged VLANs at the
same time by doing any necessary untagging in software rather than
hardware.  To enable that, keep the CPU port's Remove Tag flag cleared
and set the dsa_switch::untag_bridge_pvid flag.

Fixes: e66f840c08 ("net: dsa: ksz: Add Microchip KSZ8795 DSA driver")
Signed-off-by: Ben Hutchings <ben.hutchings@mind.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-10 09:58:15 +01:00
Ben Hutchings af01754f9e net: dsa: microchip: ksz8795: Fix VLAN untagged flag change on deletion
When a VLAN is deleted from a port, the flags in struct
switchdev_obj_port_vlan are always 0.  ksz8_port_vlan_del() copies the
BRIDGE_VLAN_INFO_UNTAGGED flag to the port's Tag Removal flag, and
therefore always clears it.

In case there are multiple VLANs configured as untagged on this port -
which seems useless, but is allowed - deleting one of them changes the
remaining VLANs to be tagged.

It's only ever necessary to change this flag when a VLAN is added to
the port, so leave it unchanged in ksz8_port_vlan_del().

Fixes: e66f840c08 ("net: dsa: ksz: Add Microchip KSZ8795 DSA driver")
Signed-off-by: Ben Hutchings <ben.hutchings@mind.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-10 09:58:15 +01:00
Ben Hutchings 8f4f58f88f net: dsa: microchip: ksz8795: Reject unsupported VLAN configuration
The switches supported by ksz8795 only have a per-port flag for Tag
Removal.  This means it is not possible to support both tagged and
untagged VLANs on the same port.  Reject attempts to add a VLAN that
requires the flag to be changed, unless there are no VLANs currently
configured.

VID 0 is excluded from this check since it is untagged regardless of
the state of the flag.

On the CPU port we could support tagged and untagged VLANs at the same
time.  This will be enabled by a later patch.

Fixes: e66f840c08 ("net: dsa: ksz: Add Microchip KSZ8795 DSA driver")
Signed-off-by: Ben Hutchings <ben.hutchings@mind.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-10 09:58:14 +01:00
Ben Hutchings ef3b02a1d7 net: dsa: microchip: ksz8795: Fix PVID tag insertion
ksz8795 has never actually enabled PVID tag insertion, and it also
programmed the PVID incorrectly.  To fix this:

* Allow tag insertion to be controlled per ingress port.  On most
  chips, set bit 2 in Global Control 19.  On KSZ88x3 this control
  flag doesn't exist.

* When adding a PVID:
  - Set the appropriate register bits to enable tag insertion on
    egress at every other port if this was the packet's ingress port.
  - Mask *out* the VID from the default tag, before or-ing in the new
    PVID.

* When removing a PVID:
  - Clear the same control bits to disable tag insertion.
  - Don't update the default tag.  This wasn't doing anything useful.

Fixes: e66f840c08 ("net: dsa: ksz: Add Microchip KSZ8795 DSA driver")
Signed-off-by: Ben Hutchings <ben.hutchings@mind.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-10 09:58:14 +01:00
Ben Hutchings c34f674c88 net: dsa: microchip: Fix ksz_read64()
ksz_read64() currently does some dubious byte-swapping on the two
halves of a 64-bit register, and then only returns the high bits.
Replace this with a straightforward expression.

Fixes: e66f840c08 ("net: dsa: ksz: Add Microchip KSZ8795 DSA driver")
Signed-off-by: Ben Hutchings <ben.hutchings@mind.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-10 09:58:14 +01:00
Oleksij Rempel 47fac45600 net: dsa: qca: ar9331: make proper initial port defaults
Make sure that all external port are actually isolated from each other,
so no packets are leaked.

Fixes: ec6698c272 ("net: dsa: add support for Atheros AR9331 built-in switch")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-07 09:34:35 +01:00
DENG Qingfang aff51c5da3 net: dsa: mt7530: add the missing RxUnicast MIB counter
Add the missing RxUnicast counter.

Fixes: b8f126a8d5 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
Signed-off-by: DENG Qingfang <dqfext@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-06 12:08:30 +01:00
Oleksij Rempel d1a58c013a net: dsa: qca: ar9331: reorder MDIO write sequence
In case of this switch we work with 32bit registers on top of 16bit
bus. Some registers (for example access to forwarding database) have
trigger bit on the first 16bit half of request and the result +
configuration of request in the second half. Without this patch, we would
trigger database operation and overwrite result in one run.

To make it work properly, we should do the second part of transfer
before the first one is done.

So far, this rule seems to work for all registers on this switch.

Fixes: ec6698c272 ("net: dsa: add support for Atheros AR9331 built-in switch")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://lore.kernel.org/r/20210803063746.3600-1-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-08-03 14:35:28 -07:00
Vladimir Oltean 47c2c0c231 net: dsa: sja1105: match FDB entries regardless of inner/outer VLAN tag
On SJA1105P/Q/R/S and SJA1110, the L2 Lookup Table entries contain a
maskable "inner/outer tag" bit which means:
- when set to 1: match single-outer and double tagged frames
- when set to 0: match untagged and single-inner tagged frames
- when masked off: match all frames regardless of the type of tag

This driver does not make any meaningful distinction between inner tags
(matches on TPID) and outer tags (matches on TPID2). In fact, all VLAN
table entries are installed as SJA1110_VLAN_D_TAG, which means that they
match on both inner and outer tags.

So it does not make sense that we install FDB entries with the IOTAG bit
set to 1.

In VLAN-unaware mode, we set both TPID and TPID2 to 0xdadb, so the
switch will see frames as outer-tagged or double-tagged (never inner).
So the FDB entries will match if IOTAG is set to 1.

In VLAN-aware mode, we set TPID to 0x8100 and TPID2 to 0x88a8. So the
switch will see untagged and 802.1Q-tagged packets as inner-tagged, and
802.1ad-tagged packets as outer-tagged. So untagged and 802.1Q-tagged
packets will not match FDB entries if IOTAG is set to 1, but 802.1ad
tagged packets will. Strange.

To fix this, simply mask off the IOTAG bit from FDB entries, and make
them match regardless of whether the VLAN tag is inner or outer.

Fixes: 1da7382134 ("net: dsa: sja1105: Add FDB operations for P/Q/R/S series")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-02 14:28:28 +01:00
Vladimir Oltean 589918df93 net: dsa: sja1105: be stateless with FDB entries on SJA1105P/Q/R/S/SJA1110 too
Similar but not quite the same with what was done in commit b11f0a4c0c81
("net: dsa: sja1105: be stateless when installing FDB entries") for
SJA1105E/T, it is desirable to drop the priv->vlan_aware check and
simply go ahead and install FDB entries in the VLAN that was given by
the bridge.

As opposed to SJA1105E/T, in SJA1105P/Q/R/S and SJA1110, the FDB is a
maskable TCAM, and we are installing VLAN-unaware FDB entries with the
VLAN ID masked off. However, such FDB entries might completely obscure
VLAN-aware entries where the VLAN ID is included in the search mask,
because the switch looks up the FDB from left to right and picks the
first entry which results in a masked match. So it depends on whether
the bridge installs first the VLAN-unaware or the VLAN-aware FDB entries.

Anyway, if we had a VLAN-unaware FDB entry towards one set of DESTPORTS
and a VLAN-aware one towards other set of DESTPORTS, the result is that
the packets in VLAN-aware mode will be forwarded towards the DESTPORTS
specified by the VLAN-unaware entry.

To solve this, simply do not use the masked matching ability of the FDB
for VLAN ID, and always match precisely on it. In VLAN-unaware mode, we
configure the switch for shared VLAN learning, so the VLAN ID will be
ignored anyway during lookup, so it is redundant to mask it off in the
TCAM.

This patch conflicts with net-next commit 0fac6aa098ed ("net: dsa: sja1105:
delete the best_effort_vlan_filtering mode") which changed this line:
	if (priv->vlan_state != SJA1105_VLAN_UNAWARE) {
into:
	if (priv->vlan_aware) {

When merging with net-next, the lines added by this patch should take
precedence in the conflict resolution (i.e. the "if" condition should be
deleted in both cases).

Fixes: 1da7382134 ("net: dsa: sja1105: Add FDB operations for P/Q/R/S series")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-02 14:28:28 +01:00
Vladimir Oltean 728db843df net: dsa: sja1105: ignore the FDB entry for unknown multicast when adding a new address
Currently, when sja1105pqrs_fdb_add() is called for a host-joined IPv6
MDB entry such as 33:33:00:00:00:6a, the search for that address will
return the FDB entry for SJA1105_UNKNOWN_MULTICAST, which has a
destination MAC of 01:00:00:00:00:00 and a mask of 01:00:00:00:00:00.
It returns that entry because, well, it matches, in the sense that
unknown multicast is supposed by design to match it...

But the issue is that we then proceed to overwrite this entry with the
one for our precise host-joined multicast address, and the unknown
multicast entry is no longer there - unknown multicast is now flooded to
the same group of ports as broadcast, which does not look up the FDB.

To solve this problem, we should ignore searches that return the unknown
multicast address as the match, and treat them as "no match" which will
result in the entry being installed to hardware.

For this to work properly, we need to put the result of the FDB search
in a temporary variable in order to avoid overwriting the l2_lookup
entry we want to program. The l2_lookup entry returned by the search
might not have the same set of DESTPORTS and not even the same MACADDR
as the entry we're trying to add.

Fixes: 4d94235495 ("net: dsa: sja1105: offload bridge port flags to device")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-02 14:28:28 +01:00
Vladimir Oltean 6c5fc159e0 net: dsa: sja1105: invalidate dynamic FDB entries learned concurrently with statically added ones
The procedure to add a static FDB entry in sja1105 is concurrent with
dynamic learning performed on all bridge ports and the CPU port.

The switch looks up the FDB from left to right, and also learns
dynamically from left to right, so it is possible that between the
moment when we pick up a free slot to install an FDB entry, another slot
to the left of that one becomes free due to an address ageing out, and
that other slot is then immediately used by the switch to learn
dynamically the same address as we're trying to add statically.

The result is that we succeeded to add our static FDB entry, but it is
being shadowed by a dynamic FDB entry to its left, and the switch will
behave as if our static FDB entry did not exist.

We cannot really prevent this from happening unless we make the entire
process to add a static FDB entry a huge critical section where address
learning is temporarily disabled on _all_ ports, and then re-enabled
according to the configuration done by sja1105_port_set_learning.
However, that is kind of disruptive for the operation of the network.

What we can do alternatively is to simply read back the FDB for dynamic
entries located before our newly added static one, and delete them.
This will guarantee that our static FDB entry is now operational. It
will still not guarantee that there aren't dynamic FDB entries to the
_right_ of that static FDB entry, but at least those entries will age
out by themselves since they aren't hit, and won't bother anyone.

Fixes: 291d1e72b7 ("net: dsa: sja1105: Add support for FDB and MDB management")
Fixes: 1da7382134 ("net: dsa: sja1105: Add FDB operations for P/Q/R/S series")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-02 14:28:28 +01:00
Vladimir Oltean e11e865bf8 net: dsa: sja1105: overwrite dynamic FDB entries with static ones in .port_fdb_add
The SJA1105 switch family leaves it up to software to decide where
within the FDB to install a static entry, and to concatenate destination
ports for already existing entries (the FDB is also used for multicast
entries), it is not as simple as just saying "please add this entry".

This means we first need to search for an existing FDB entry before
adding a new one. The driver currently manages to fool itself into
thinking that if an FDB entry already exists, there is nothing to be
done. But that FDB entry might be dynamically learned, case in which it
should be replaced with a static entry, but instead it is left alone.

This patch checks the LOCKEDS ("locked/static") bit from found FDB
entries, and lets the code "goto skip_finding_an_index;" if the FDB
entry was not static. So we also need to move the place where we set
LOCKEDS = true, to cover the new case where a dynamic FDB entry existed
but was dynamic.

Fixes: 291d1e72b7 ("net: dsa: sja1105: Add support for FDB and MDB management")
Fixes: 1da7382134 ("net: dsa: sja1105: Add FDB operations for P/Q/R/S series")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-02 14:28:28 +01:00
Vladimir Oltean cb81698fdd net: dsa: sja1105: fix static FDB writes for SJA1110
The blamed commit made FDB access on SJA1110 functional only as far as
dumping the existing entries goes, but anything having to do with an
entry's index (adding, deleting) is still broken.

There are in fact 2 problems, all caused by improperly inheriting the
code from SJA1105P/Q/R/S:
- An entry size is SJA1110_SIZE_L2_LOOKUP_ENTRY (24) bytes and not
  SJA1105PQRS_SIZE_L2_LOOKUP_ENTRY (20) bytes
- The "index" field within an FDB entry is at bits 10:1 for SJA1110 and
  not 15:6 as in SJA1105P/Q/R/S

This patch moves the packing function for the cmd->index outside of
sja1105pqrs_common_l2_lookup_cmd_packing() and into the device specific
functions sja1105pqrs_l2_lookup_cmd_packing and
sja1110_l2_lookup_cmd_packing.

Fixes: 74e7feff0e ("net: dsa: sja1105: fix dynamic access to L2 Address Lookup table for SJA1110")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-02 14:28:28 +01:00
Vladimir Oltean c92c74131a net: dsa: mv88e6xxx: silently accept the deletion of VID 0 too
The blamed commit modified the driver to accept the addition of VID 0
without doing anything, but deleting that VID still fails:

[   32.080780] mv88e6085 d0032004.mdio-mii:10 lan8: failed to kill vid 0081/0

Modify mv88e6xxx_port_vlan_leave() to do the same thing as the addition.

Fixes: b8b79c414e ("net: dsa: mv88e6xxx: Fix adding vlan 0")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-07-23 17:13:02 +01:00