OSDN Git Service

uclinux-h8/linux.git
3 years agonet: pcs: xpcs: convert to mdio_device
Vladimir Oltean [Wed, 2 Jun 2021 16:20:18 +0000 (19:20 +0300)]
net: pcs: xpcs: convert to mdio_device

Unify the 2 existing PCS drivers (lynx and xpcs) by doing a similar
thing on probe, which is to have a *_create function that takes a
struct mdio_device * given by the caller, and builds a private PCS
structure around that.

This changes stmmac to hold only a pointer to the xpcs, as opposed to
the full structure. This will be used in the next patch when struct
mdio_xpcs_ops is removed. Currently a pointer to struct mdio_xpcs_ops
is used as a shorthand to determine whether the port has an XPCS or not.
We can do the same now with the mdio_xpcs_args pointer.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: pcs: xpcs: use mdiobus_c45_addr in xpcs_{read,write}
Vladimir Oltean [Wed, 2 Jun 2021 16:20:17 +0000 (19:20 +0300)]
net: pcs: xpcs: use mdiobus_c45_addr in xpcs_{read,write}

Use the dedicated helper for abstracting away how the clause 45 address
is packed in reg_addr.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: pcs: xpcs: export xpcs_probe
Vladimir Oltean [Wed, 2 Jun 2021 16:20:16 +0000 (19:20 +0300)]
net: pcs: xpcs: export xpcs_probe

Similar to the other recently functions, it is not necessary for
xpcs_probe to be a function pointer, so export it so that it can be
called directly.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: pcs: xpcs: export xpcs_config_eee
Vladimir Oltean [Wed, 2 Jun 2021 16:20:15 +0000 (19:20 +0300)]
net: pcs: xpcs: export xpcs_config_eee

There is no good reason why we need to go through:

stmmac_xpcs_config_eee
-> stmmac_do_callback
   -> mdio_xpcs_ops->config_eee
      -> xpcs_config_eee

when we can simply call xpcs_config_eee.

priv->hw->xpcs is of the type "const struct mdio_xpcs_ops *" and is used
as a placeholder/synonym for priv->plat->mdio_bus_data->has_xpcs. It is
done that way because the mdio_bus_data pointer might or might not be
populated in all stmmac instantiations.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: pcs: xpcs: export xpcs_validate
Vladimir Oltean [Wed, 2 Jun 2021 16:20:14 +0000 (19:20 +0300)]
net: pcs: xpcs: export xpcs_validate

Calling a function pointer with a single implementation through
struct mdio_xpcs_ops is clunky, and the stmmac_do_callback system forces
this to return int, even though it always returns zero.

Simply remove the "validate" function pointer from struct mdio_xpcs_ops
and replace it with an exported xpcs_validate symbol which is called
directly by stmmac.

priv->hw->xpcs is of the type "const struct mdio_xpcs_ops *" and is used
as a placeholder/synonym for priv->plat->mdio_bus_data->has_xpcs. It is
done that way because the mdio_bus_data pointer might or might not be
populated in all stmmac instantiations.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: pcs: xpcs: make the checks related to the PHY interface mode stateless
Vladimir Oltean [Wed, 2 Jun 2021 16:20:13 +0000 (19:20 +0300)]
net: pcs: xpcs: make the checks related to the PHY interface mode stateless

The operating mode of the driver is currently to populate its
struct mdio_xpcs_args::supported and struct mdio_xpcs_args::an_mode
statically in xpcs_probe(), based on the passed phy_interface_t,
and work with those.

However this is not the operation that phylink expects from a PCS
driver, because the port might be attached to an SFP cage that triggers
changes of the phy_interface_t dynamically as one SFP module is
unpluggged and another is plugged.

To migrate towards that model, the struct mdio_xpcs_args should not
cache anything related to the phy_interface_t, but just look up the
statically defined, const struct xpcs_compat structure corresponding to
the detected PCS OUI/model number.

So we delete the "supported" and "an_mode" members of struct
mdio_xpcs_args, and add the "id" structure there (since the ID is not
expected to change at runtime).

Since xpcs->supported is used deep in the code in _xpcs_config_aneg_c73(),
we need to modify some function headers to pass the xpcs_compat from all
callers. In turn, the xpcs_compat is always supplied externally to the
xpcs module:
- Most of the time by phylink
- In xpcs_probe() it is needed because xpcs_soft_reset() writes to
  MDIO_MMD_PCS or to MDIO_MMD_VEND2 depending on whether an_mode is clause
  37 or clause 73. In order to not introduce functional changes related
  to when the soft reset is issued, we continue to require the initial
  phy_interface_t argument to be passed to xpcs_probe() so we can pass
  this on to xpcs_soft_reset().
- stmmac_open() wants to know whether to call stmmac_init_phy() or not,
  and for that it looks inside xpcs->an_mode, because the clause 73
  (backplane) AN modes supposedly do not have a PHY. Because we moved
  an_mode outside of struct mdio_xpcs_args, this is now no longer
  directly possible, so we introduce a helper function xpcs_get_an_mode()
  which protects the data encapsulation of the xpcs module and requires
  a phy_interface_t to be passed as argument. This function can look up
  the appropriate compat based on the phy_interface_t.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: pcs: xpcs: there is only one PHY ID
Vladimir Oltean [Wed, 2 Jun 2021 16:20:12 +0000 (19:20 +0300)]
net: pcs: xpcs: there is only one PHY ID

The xpcs driver has an apparently inadequate structure for the actual
hardware it drives.

These defines and the xpcs_probe() function would suggest that there is
one PHY ID per supported PHY interface type, and the driver simply
validates whether the mode it should operate in (the argument of
xpcs_probe) matches what the hardware is capable of:

#define SYNOPSYS_XPCS_USXGMII_ID 0x7996ced0
#define SYNOPSYS_XPCS_10GKR_ID 0x7996ced0
#define SYNOPSYS_XPCS_XLGMII_ID 0x7996ced0
#define SYNOPSYS_XPCS_SGMII_ID 0x7996ced0
#define SYNOPSYS_XPCS_MASK 0xffffffff

but that is not the case, because upon closer inspection, all the above
4 PHY ID definitions are in fact equal.

So it is the same XPCS that is compatible with all 4 sets of PHY
interface types.

This change introduces an array of struct xpcs_compat which is populated
by the single struct xpcs_id instance. It also eliminates the bogus
defines for multiple Synopsys XPCS PHY IDs and replaces them with a
single XPCS_ID, which better reflects the way in which the hardware
operates.

Because we are touching this area of the code anyway, the new array of
struct xpcs_compat, as well as the array of xpcs_id, have been moved
towards the end of the file, since they are variable declarations not
definitions. If whichever of struct xpcs_compat or struct xpcs_id need
to gain a function pointer member in the future, it is easier to
reference functions (no forward declarations needed) if we have the
const variable declarations at the end of the file.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: pcs: xpcs: delete shim definition for mdio_xpcs_get_ops()
Vladimir Oltean [Wed, 2 Jun 2021 16:20:11 +0000 (19:20 +0300)]
net: pcs: xpcs: delete shim definition for mdio_xpcs_get_ops()

CONFIG_STMMAC_ETH selects CONFIG_PCS_XPCS, so there should be no
situation where the shim should be needed.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agoMerge branch 'hdlc_cisco-cleanups'
David S. Miller [Thu, 3 Jun 2021 20:27:37 +0000 (13:27 -0700)]
Merge branch 'hdlc_cisco-cleanups'

Peng Li says:

====================
net: hdlc_cisco: clean up some code style issues

This patchset clean up some code style issues.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: hdlc_cisco: remove redundant space
Peng Li [Wed, 2 Jun 2021 11:01:16 +0000 (19:01 +0800)]
net: hdlc_cisco: remove redundant space

Space prohibited between function name and open parenthesis '('.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: hdlc_cisco: add blank line after declaration
Peng Li [Wed, 2 Jun 2021 11:01:15 +0000 (19:01 +0800)]
net: hdlc_cisco: add blank line after declaration

This patch fixes the checkpatch error about missing a blank line
after declarations.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: hdlc_cisco: remove unnecessary out of memory message
Peng Li [Wed, 2 Jun 2021 11:01:14 +0000 (19:01 +0800)]
net: hdlc_cisco: remove unnecessary out of memory message

This patch removes unnecessary out of memory message,
to fix the following checkpatch.pl warning:
"WARNING: Possible unnecessary 'out of memory' message"

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: hdlc_cisco: add some required spaces
Peng Li [Wed, 2 Jun 2021 11:01:13 +0000 (19:01 +0800)]
net: hdlc_cisco: add some required spaces

Add spaces required after the close parenthesis '}'.
Add spaces required after that ','.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: hdlc_cisco: fix the code style issue about "foo* bar"
Peng Li [Wed, 2 Jun 2021 11:01:12 +0000 (19:01 +0800)]
net: hdlc_cisco: fix the code style issue about "foo* bar"

Fix the checkpatch error as "foo* bar" and should be "foo *bar",
and "(foo*)" should be "(foo *)".

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: hdlc_cisco: remove redundant blank lines
Peng Li [Wed, 2 Jun 2021 11:01:11 +0000 (19:01 +0800)]
net: hdlc_cisco: remove redundant blank lines

This patch removes some redundant blank lines.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agolibceph: Fix spelling mistakes
Zheng Yongjun [Wed, 2 Jun 2021 06:56:35 +0000 (14:56 +0800)]
libceph: Fix spelling mistakes

Fix some spelling mistakes in comments:
enconding  ==> encoding
ambigous  ==> ambiguous
orignal  ==> original
encyption  ==> encryption

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agortnetlink: Fix spelling mistakes
Zheng Yongjun [Wed, 2 Jun 2021 06:56:23 +0000 (14:56 +0800)]
rtnetlink: Fix spelling mistakes

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agoMerge branch 'devlink-rate-objects'
David S. Miller [Wed, 2 Jun 2021 21:08:37 +0000 (14:08 -0700)]
Merge branch 'devlink-rate-objects'

Dmytro Linkin says:

====================
devlink: rate objects API

Resending without RFC.

Currently kernel provides a way to change tx rate of single VF in
switchdev mode via tc-police action. When lots of VFs are configured
management of theirs rates becomes non-trivial task and some grouping
mechanism is required. Implementing such grouping in tc-police will bring
flow related limitations and unwanted complications, like:
- tc-police is a policer and there is a user request for a traffic
  shaper, so shared tc-police action is not suitable;
- flows requires net device to be placed on, means "groups" wouldn't
  have net device instance itself. Taking into the account previous
  point was reviewed a sollution, when representor have a policer and
  the driver use a shaper if qdisc contains group of VFs - such approach
  ugly, compilated and misleading;
- TC is ingress only, while configuring "other" side of the wire looks
  more like a "real" picture where shaping is outside of the steering
  world, similar to "ip link" command;

According to that devlink is the most appropriate place.

This series introduces devlink API for managing tx rate of single devlink
port or of a group by invoking callbacks (see below) of corresponding
driver. Also devlink port or a group can be added to the parent group,
where driver responsible to handle rates of a group elements. To achieve
all of that new rate object is added. It can be one of the two types:
- leaf - represents a single devlink port; created/destroyed by the
  driver and bound to the devlink port. As example, some driver may
  create leaf rate object for every devlink port associated with VF.
  Since leaf have 1to1 mapping to it's devlink port, in user space it is
  referred as pci/<bus_addr>/<port_index>;
- node - represents a group of rate objects; created/deleted by request
  from the userspace; initially empty (no rate objects added). In
  userspace it is referred as pci/<bus_addr>/<node_name>, where node name
  can be any, except decimal number, to avoid collisions with leafs.

devlink_ops extended with following callbacks:
- rate_{leaf|node}_tx_{share|max}_set
- rate_node_{new|del}
- rate_{leaf|node}_parent_set

KAPI provides:
- creation/destruction of the leaf rate object associated with devlink
  port
- destruction of rate nodes to allow a vendor driver to free allocated
  resources on driver removal or due to the other reasons when nodes
  destruction required

UAPI provides:
- dumping all or single rate objects
- setting tx_{share|max} of rate object of any type
- creating/deleting node rate object
- setting/unsetting parent of any rate object

Added devlink rate object support for netdevsim driver

Issues/open questions:
- Does user need DEVLINK_CMD_RATE_DEL_ALL_CHILD command to clean all
  children of particular parent node? For example:
  $ devlink port function rate flush netdevsim/netdevsim10/group
- priv pointer passed to the callbacks is a source of bugs; in leaf case
  driver can embed rate object into internal structure and use
  container_of() on it; in node case it cannot be done since nodes are
  created from userspace

v1->v2:
- fixed kernel-doc for devlink_rate_leaf_{create|destroy}()
- s/func/function/ for all devlink port command occurences

v2->v3:
- devlink:
  - added devlink_rate_nodes_destroy() function
- netdevsim:
  - added call of devlink_rate_nodes_destroy() function
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agoDocumentation: devlink rate objects
Dmytro Linkin [Wed, 2 Jun 2021 12:17:31 +0000 (15:17 +0300)]
Documentation: devlink rate objects

Add devlink rate objects section at devlink port documentation.
Add devlink rate support info at netdevsim devlink documentation.

Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agoselftest: netdevsim: Add devlink rate grouping test
Dmytro Linkin [Wed, 2 Jun 2021 12:17:30 +0000 (15:17 +0300)]
selftest: netdevsim: Add devlink rate grouping test

Test verifies that netdevsim correctly implements devlink ops callbacks
that set node as a parent of devlink leaf or node rate object.

Co-developed-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonetdevsim: Allow setting parent node of rate objects
Dmytro Linkin [Wed, 2 Jun 2021 12:17:29 +0000 (15:17 +0300)]
netdevsim: Allow setting parent node of rate objects

Implement new devlink ops that allow setting rate node as a parent for
devlink port (leaf) or another devlink node through devlink API.
Expose parent names to netdevsim debugfs in read only mode.

Co-developed-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agodevlink: Allow setting parent node of rate objects
Dmytro Linkin [Wed, 2 Jun 2021 12:17:28 +0000 (15:17 +0300)]
devlink: Allow setting parent node of rate objects

Refactor DEVLINK_CMD_RATE_{GET|SET} command handlers to support setting
a node as a parent for another rate object (leaf or node) by means of
new attribute DEVLINK_ATTR_RATE_PARENT_NODE_NAME. Extend devlink ops
with new callbacks rate_{leaf|node}_parent_set() to set node as a parent
for rate object to allow supporting drivers to implement rate grouping
through devlink. Driver implementations are allowed to support leafs
or node children only. Invoking callback with NULL as parent should be
threated by the driver as unset parent action.
Extend rate object struct with reference counter to disallow deleting a
node with any child pointing to it. User should unset parent for the
child explicitly.

Example:

$ devlink port function rate add netdevsim/netdevsim10/group1

$ devlink port function rate add netdevsim/netdevsim10/group2

$ devlink port function rate set netdevsim/netdevsim10/group1 parent group2

$ devlink port function rate show netdevsim/netdevsim10/group1
netdevsim/netdevsim10/group1: type node parent group2

$ devlink port function rate set netdevsim/netdevsim10/group1 noparent

Co-developed-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agoselftest: netdevsim: Add devlink rate nodes test
Dmytro Linkin [Wed, 2 Jun 2021 12:17:27 +0000 (15:17 +0300)]
selftest: netdevsim: Add devlink rate nodes test

Test verifies that it is possible to create, delete and set min/max tx
rate of devlink rate node on netdevsim VF.

Co-developed-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonetdevsim: Implement support for devlink rate nodes
Dmytro Linkin [Wed, 2 Jun 2021 12:17:26 +0000 (15:17 +0300)]
netdevsim: Implement support for devlink rate nodes

Implement new devlink ops that allow creation, deletion and setting of
shared/max tx rate of devlink rate nodes through devlink API.
Expose rate node and it's tx rates to netdevsim debugfs.

Co-developed-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agodevlink: Introduce rate nodes
Dmytro Linkin [Wed, 2 Jun 2021 12:17:25 +0000 (15:17 +0300)]
devlink: Introduce rate nodes

Implement support for DEVLINK_CMD_RATE_{NEW|DEL} commands that are used
to create and delete devlink rate nodes. Add new attribute
DEVLINK_ATTR_RATE_NODE_NAME that specify node name string. The node name
is an alphanumeric identifier. No valid node name can be a devlink port
index, eg. decimal number. Extend devlink ops with new callbacks
rate_node_{new|del}() and rate_node_tx_{share|max}_set() to allow
supporting drivers to implement ports rate grouping and setting tx rate
of rate nodes through devlink.
Expose devlink_rate_nodes_destroy() function to allow vendor driver do
proper cleanup of internally allocated resources for the nodes if the
driver goes down or due to any other reasons which requires nodes to be
destroyed.
Disallow moving device from switchdev to legacy mode if any node exists
on that device. User must explicitly delete nodes before switching mode.

Example:

$ devlink port function rate add netdevsim/netdevsim10/group1

$ devlink port function rate set netdevsim/netdevsim10/group1 \
        tx_share 10mbit tx_max 100mbit

Add + set command can be combined:

$ devlink port function rate add netdevsim/netdevsim10/group1 \
        tx_share 10mbit tx_max 100mbit

$ devlink port function rate show netdevsim/netdevsim10/group1
netdevsim/netdevsim10/group1: type node tx_share 10mbit tx_max 100mbit

$ devlink port function rate del netdevsim/netdevsim10/group1

Co-developed-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agoselftest: netdevsim: Add devlink port shared/max tx rate test
Dmytro Linkin [Wed, 2 Jun 2021 12:17:24 +0000 (15:17 +0300)]
selftest: netdevsim: Add devlink port shared/max tx rate test

Test verifies that netdevsim VFs can set and retrieve shared/max tx
rate through new devlink API.

Co-developed-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonetdevsim: Implement devlink rate leafs tx rate support
Dmytro Linkin [Wed, 2 Jun 2021 12:17:23 +0000 (15:17 +0300)]
netdevsim: Implement devlink rate leafs tx rate support

Implement new devlink ops that allow shared and max tx rate control for
devlink port rate objects (leafs) through devlink API.

Expose rate values of VF ports to netdevsim debugfs.

Co-developed-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agodevlink: Allow setting tx rate for devlink rate leaf objects
Dmytro Linkin [Wed, 2 Jun 2021 12:17:22 +0000 (15:17 +0300)]
devlink: Allow setting tx rate for devlink rate leaf objects

Implement support for DEVLINK_CMD_RATE_SET command with new attributes
DEVLINK_ATTR_RATE_TX_{SHARE|MAX} that are used to set devlink rate
shared/max tx rate values. Extend devlink ops with new callbacks
rate_leaf_tx_{share|max}_set() to allow supporting drivers to implement
rate control through devlink.

New attributes are optional. Driver implementations are allowed to
support either or both of them.

Shared rate example:

$ devlink port function rate set netdevsim/netdevsim10/0 tx_share 10mbit

$ devlink port function rate show netdevsim/netdevsim10/0
netdevsim/netdevsim10/0: type leaf tx_share 10mbit

Max rate example:

$ devlink port function rate set netdevsim/netdevsim10/0 tx_max 100mbit

$ devlink port function rate show netdevsim/netdevsim10/0
netdevsim/netdevsim10/0: type leaf tx_max 100mbit

Co-developed-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agoselftest: netdevsim: Add devlink rate test
Dmytro Linkin [Wed, 2 Jun 2021 12:17:21 +0000 (15:17 +0300)]
selftest: netdevsim: Add devlink rate test

Test verifies that all netdevsim VF ports have rate leaf object created
by default.

Co-developed-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonetdevsim: Register devlink rate leaf objects per VF
Dmytro Linkin [Wed, 2 Jun 2021 12:17:20 +0000 (15:17 +0300)]
netdevsim: Register devlink rate leaf objects per VF

Register devlink rate leaf objects per VF.

Co-developed-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agodevlink: Introduce rate object
Dmytro Linkin [Wed, 2 Jun 2021 12:17:19 +0000 (15:17 +0300)]
devlink: Introduce rate object

Allow registering rate object for devlink ports with dedicated
devlink_rate_leaf_{create|destroy}() API. Implement new netlink
DEVLINK_CMD_RATE_GET command that is used to retrieve rate object info.
Add new DEVLINK_CMD_RATE_{NEW|DEL} commands that are used for
notifications when creating/deleting leaf rate object.

Rate API is intended to be used for rate limiting of individual
devlink ports (leafs) and their aggregates (nodes).

Example:

$ devlink port show
pci/0000:03:00.0/0
pci/0000:03:00.0/1

$ devlink port function rate show
pci/0000:03:00.0/0: type leaf
pci/0000:03:00.0/1: type leaf

Co-developed-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonetdevsim: Implement legacy/switchdev mode for VFs
Dmytro Linkin [Wed, 2 Jun 2021 12:17:18 +0000 (15:17 +0300)]
netdevsim: Implement legacy/switchdev mode for VFs

Implement callbacks to set/get eswitch mode value. Add helpers to check
current mode.

Instantiate VFs' net devices and devlink ports on switchdev enabling and
remove them on legacy enabling. Changing number of VFs while in
switchdev mode triggers VFs creation/deletion.

Also disable NDO API callback to set VF rate, since it's legacy API.
Switchdev API to set VF rate will be implemented in one of the next
patches.

Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonetdevsim: Implement VFs
Dmytro Linkin [Wed, 2 Jun 2021 12:17:17 +0000 (15:17 +0300)]
netdevsim: Implement VFs

Allow creation of netdevsim ports for VFs along with allocations of
corresponding net devices and devlink ports.
Add enums and helpers to distinguish PFs' ports from VFs' ports.

Ports creation/deletion debugfs API intended to be used with physical
ports only.
VFs instantiation will be done in one of the next patches.

Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonetdevsim: Implement port types and indexing
Dmytro Linkin [Wed, 2 Jun 2021 12:17:16 +0000 (15:17 +0300)]
netdevsim: Implement port types and indexing

Define type of ports, which netdevsim driver currently operates with as
PF. Define new port type - VF, which will be implemented in following
patches. Add helper functions to distinguish them. Add helper function
to get VF index from port index.

Add port indexing logic where PFs' indexes starts from 0, VFs' - from
NSIM_DEV_VF_PORT_INDEX_BASE.
All ports uses same index pool, which means that PF port may be created
with index from VFs' indexes range.
Maximum number of VFs, which the driver can allocate, is limited by
UINT_MAX - BASE.

Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonetdevsim: Disable VFs on nsim_dev_reload_destroy() call
Dmytro Linkin [Wed, 2 Jun 2021 12:17:15 +0000 (15:17 +0300)]
netdevsim: Disable VFs on nsim_dev_reload_destroy() call

Move VFs disabling from device release() to nsim_dev_reload_destroy() to
make VFs disabling and ports removal simultaneous.
This is a requirement for VFs ports implemented in next patches.

Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonetdevsim: Add max_vfs to bus_dev
Dmytro Linkin [Wed, 2 Jun 2021 12:17:14 +0000 (15:17 +0300)]
netdevsim: Add max_vfs to bus_dev

Currently there is no limit to the number of VFs netdevsim can enable.
In a real systems this value exist and used by the driver.
Fore example, some features might need to consider this value when
allocating memory.

Expose max_vfs variable to debugfs as configurable resource. If are VFs
configured (num_vfs != 0) then changing of max_vfs not allowed.

Co-developed-by: Yuval Avnery <yuvalav@nvidia.com>
Signed-off-by: Yuval Avnery <yuvalav@nvidia.com>
Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agoMerge branch 'nfp-ct-offload'
David S. Miller [Wed, 2 Jun 2021 21:04:42 +0000 (14:04 -0700)]
Merge branch 'nfp-ct-offload'

Simon Horman says:

====================
Introduce conntrack offloading to the nfp driver

Louis Peens says:

This is the first in a series of patches to offload conntrack
to the nfp. The approach followed is to flatten out three
different flow rules into a single offloaded flow. The three
different flows are:

1) The rule sending the packet to conntrack (pre_ct)
2) The rule matching on +trk+est after a packet has been through
   conntrack. (post_ct)
3) The rule received via callback from the netfilter (nft)

In order to offload a flow we need a combination of all three flows, but
they could be added/deleted at different times and in different order.

To solve this we save potential offloadable CT flows in the driver,
and every time we receive a callback we check against these saved flows
for valid merges. Once we have a valid combination of all three flows
this will be offloaded to the NFP. This is demonstrated in the diagram
below.

+-------------+                      +----------+
| pre_ct flow +--------+             | nft flow |
+-------------+        v             +------+---+
                  +----------+              |
                  | tc_merge +--------+     |
                  +----------+        v     v
+--------------+       ^           +-------------+
| post_ct flow +-------+       +---+nft_tc merge |
+--------------+               |   +-------------+
                               |
                               |
                               |
                               v
                        Offload to nfp

This series is only up to the point of the pre_ct and post_ct
merges into the tc_merge. Follow up series will continue
to add the nft flows and merging of these flows with the result
of the pre_ct and post_ct merged flows.

Changes since v2:
- nfp: flower-ct: add zone table entry when handling pre/post_ct flows
    Fixed another docstring. Should finally have the patch check
    environment properly configured now to avoid more of these.
- nfp: flower-ct: add tc merge functionality
    Fixed warning found by "kernel test robot <lkp@intel.com>"
    Added code comment explaining chain_index comparison

Changes since v1:
- nfp: flower-ct: add ct zone table
    Fixed unused variable compile warning
    Fixed missing colon in struct description
====================

Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonfp: flower-ct: add tc merge functionality
Louis Peens [Wed, 2 Jun 2021 11:59:52 +0000 (13:59 +0200)]
nfp: flower-ct: add tc merge functionality

Add merging of pre/post_ct flow rules into the tc_merge table.
Pre_ct flows needs to be merge with post_ct flows and vice versa.

This needs to be done for all flows in the same zone table, as well
as with the wc_zone_table, which is for flows masking out ct_zone
info.

Cleanup is happening when all the tables are cleared up and prints
a warning traceback as this is not expected in the final version.
At this point we are not actually returning success for the offload,
so we do not get any delete requests for flows, so we can't delete
them that way yet. This means that cleanup happens in what would
usually be an exception path.

Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonfp: flower-ct: add tc_merge_tb
Louis Peens [Wed, 2 Jun 2021 11:59:51 +0000 (13:59 +0200)]
nfp: flower-ct: add tc_merge_tb

Add the table required to store the merge result of pre_ct and post_ct
flows. This is just the initial setup and teardown of the table,
the implementation will be in follow-up patches.

Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonfp: flower-ct: add a table to map flow cookies to ct flows
Louis Peens [Wed, 2 Jun 2021 11:59:50 +0000 (13:59 +0200)]
nfp: flower-ct: add a table to map flow cookies to ct flows

Add a hashtable which contains entries to map flow cookies to ct
flow entries. Currently the entries are added and not used, but
follow-up patches will use this for stats updates and flow deletes.

Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonfp: flower-ct: add nfp_fl_ct_flow_entries
Louis Peens [Wed, 2 Jun 2021 11:59:49 +0000 (13:59 +0200)]
nfp: flower-ct: add nfp_fl_ct_flow_entries

This commit starts adding the structures and lists that will
be used in follow up commits to enable offloading of conntrack.
Some stub functions are also introduced as placeholders by
this commit.

Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonfp: flower-ct: add zone table entry when handling pre/post_ct flows
Louis Peens [Wed, 2 Jun 2021 11:59:48 +0000 (13:59 +0200)]
nfp: flower-ct: add zone table entry when handling pre/post_ct flows

Start populating the pre/post_ct handler functions. Add a zone entry
to the zone table, based on the zone information from the flow. In
the case of a post_ct flow which has a wildcarded match on the zone
create a special entry.

Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonfp: flower-ct: add ct zone table
Louis Peens [Wed, 2 Jun 2021 11:59:47 +0000 (13:59 +0200)]
nfp: flower-ct: add ct zone table

Add initial zone table to nfp_flower_priv. This table will be used
to store all the information required to offload conntrack.

Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonfp: flower-ct: add pre and post ct checks
Louis Peens [Wed, 2 Jun 2021 11:59:46 +0000 (13:59 +0200)]
nfp: flower-ct: add pre and post ct checks

Add checks to see if a flow is a conntrack flow we can potentially
handle. Just stub out the handling the different conntrack flows.

Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonfp: flower: move non-zero chain check
Louis Peens [Wed, 2 Jun 2021 11:59:45 +0000 (13:59 +0200)]
nfp: flower: move non-zero chain check

This is in preparation for conntrack offload support which makes
used of different chains. Add explicit checks for conntrack and
non-zero chains in the add_offload path.

Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agodecnet: Fix spelling mistakes
Zheng Yongjun [Wed, 2 Jun 2021 06:55:44 +0000 (14:55 +0800)]
decnet: Fix spelling mistakes

Fix some spelling mistakes in comments:
thats  ==> that's
serivce  ==> service
varience  ==> variance

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agorxrpc: Fix a typo
Zheng Yongjun [Wed, 2 Jun 2021 06:55:08 +0000 (14:55 +0800)]
rxrpc: Fix a typo

targetted  ==> targeted

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agoBluetooth: Fix spelling mistakes
Zheng Yongjun [Wed, 2 Jun 2021 06:54:58 +0000 (14:54 +0800)]
Bluetooth: Fix spelling mistakes

Fix some spelling mistakes in comments:
udpate  ==> update
retreive  ==> retrieve
accidentially  ==> accidentally
correspondig  ==> corresponding
adddress  ==> address
estabilish  ==> establish
commplete  ==> complete
Unkown  ==> Unknown
triggerd  ==> triggered
transtion  ==> transition

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years ago9p/trans_virtio: Fix spelling mistakes
Zheng Yongjun [Wed, 2 Jun 2021 06:54:42 +0000 (14:54 +0800)]
9p/trans_virtio: Fix spelling mistakes

reseting  ==> resetting
alloced  ==> allocated
accomodate  ==> accommodate

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agoethtool: Fix a typo
Zheng Yongjun [Wed, 2 Jun 2021 06:54:28 +0000 (14:54 +0800)]
ethtool: Fix a typo

atribute  ==> attribute

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agosit: replace 68 with micro IPV4_MIN_MTU
zhang kai [Wed, 2 Jun 2021 01:50:39 +0000 (09:50 +0800)]
sit: replace 68 with micro IPV4_MIN_MTU

Use meaningfull micro IPV4_MIN_MTU

Signed-off-by: zhang kai <zhangkaiheb@126.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agodt-bindings: net: brcm,iproc-mdio: convert to the json-schema
Rafał Miłecki [Thu, 27 May 2021 20:28:15 +0000 (22:28 +0200)]
dt-bindings: net: brcm,iproc-mdio: convert to the json-schema

This helps validating DTS files.

Introduced changes:
1. Swapped #address-cells and #size-cells values
2. Renamed node: s/enet-gphy/ethernet-phy@/

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next
David S. Miller [Wed, 2 Jun 2021 00:15:14 +0000 (17:15 -0700)]
Merge git://git./linux/kernel/git/pablo/nf-next

Pablo Neira Ayuso says:

====================
Netfilter updates for net-next

The following patchset contains Netfilter updates for net-next:

1) Support for SCTP chunks matching on nf_tables, from Phil Sutter.

2) Skip LDMXCSR, we don't need a valid MXCSR state. From Stefano Brivio.

3) CONFIG_RETPOLINE for nf_tables set lookups, from Florian Westphal.

4) A few Kconfig leading spaces removal, from Juerg Haefliger.

5) Remove spinlock from xt_limit, from Jason Baron.

6) Remove useless initialization in xt_CT, oneliner from Yang Li.

7) Tree-wide replacement of netlink_unicast() by nfnetlink_unicast().

8) Reduce footprint of several structures: xt_action_param,
   nft_pktinfo and nf_hook_state, from Florian.

10) Add nft_thoff() and nft_sk() helpers and use them, also from Florian.

11) Fix documentation in nf_tables pipapo avx2, from Florian Westphal.

12) Fix clang-12 fmt string warnings, also from Florian.
====================

3 years agoMerge branch 'qualcomm-rmnet-mapv5'
David S. Miller [Wed, 2 Jun 2021 00:11:41 +0000 (17:11 -0700)]
Merge branch 'qualcomm-rmnet-mapv5'

Sharath Chandra Vurukala says:

====================
net: qualcomm: rmnet: Enable Mapv5

This series introduces the MAPv5 packet format.

   Patch 0 documents the MAPv4/v5.
   Patch 1 introduces the MAPv5 and the Inline checksum offload for RX/Ingress.
   Patch 2 introduces the MAPv5 and the Inline checksum offload for TX/Egress.

   A new checksum header format is used as part of MAPv5.For RX checksum offload,
   the checksum is verified by the HW and the validity is marked in the checksum
   header of MAPv5. For TX, the required metadata is filled up so hardware can
   compute the checksum.

   v1->v2:
   - Fixed the compilation errors, warnings reported by kernel test robot.
   - Checksum header definition is expanded to support big, little endian
           formats as mentioned by Jakub.

   v2->v3:
   - Fixed compilation errors reported by kernel bot for big endian flavor.

   v3->v4:
   - Made changes to use masks instead of C bit-fields as suggested by Jakub/Alex.

   v4->v5:
   - Corrected checkpatch errors and warnings reported by patchwork.

   v5->v6:
   - Corrected the bug identified by Alex and incorporated all his comments.

   v6->v7:
   - Removed duplicate inclusion of linux/bitfield.h in rmnet_map_data.c

   v7->v8:
   - Have addressed comments given by JAkub on v7 patches.
   - As suggested by Jakub, skb_cow_head() is used instead of expanding
     the head directly. This is now done in  rmnet_map_egress_handler().
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: ethernet: rmnet: Add support for MAPv5 egress packets
Sharath Chandra Vurukala [Tue, 1 Jun 2021 19:28:36 +0000 (00:58 +0530)]
net: ethernet: rmnet: Add support for MAPv5 egress packets

Adding support for MAPv5 egress packets.

This involves adding the MAPv5 header and setting the csum_valid_required
in the checksum header to request HW compute the checksum.

Corresponding stats are incremented based on whether the checksum is
computed in software or HW.

New stat has been added which represents the count of packets whose
checksum is calculated by the HW.

Signed-off-by: Sharath Chandra Vurukala <sharathv@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: ethernet: rmnet: Support for ingress MAPv5 checksum offload
Sharath Chandra Vurukala [Tue, 1 Jun 2021 19:28:35 +0000 (00:58 +0530)]
net: ethernet: rmnet: Support for ingress MAPv5 checksum offload

Adding support for processing of MAPv5 downlink packets.
It involves parsing the Mapv5 packet and checking the csum header
to know whether the hardware has validated the checksum and is
valid or not.

Based on the checksum valid bit the corresponding stats are
incremented and skb->ip_summed is marked either CHECKSUM_UNNECESSARY
or left as CHEKSUM_NONE to let network stack revalidate the checksum
and update the respective snmp stats.

Current MAPV1 header has been modified, the reserved field in the
Mapv1 header is now used for next header indication.

Signed-off-by: Sharath Chandra Vurukala <sharathv@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agodocs: networking: Add documentation for MAPv5
Sharath Chandra Vurukala [Tue, 1 Jun 2021 19:28:34 +0000 (00:58 +0530)]
docs: networking: Add documentation for MAPv5

Adding documentation explaining the new MAPv4/v5 packet formats
and the corresponding checksum offload headers.

Signed-off-by: Sharath Chandra Vurukala <sharathv@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agoMerge branch 'iwl-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/linux
David S. Miller [Wed, 2 Jun 2021 00:07:56 +0000 (17:07 -0700)]
Merge branch 'iwl-next' of git://git./linux/kernel/git/tnguy/linux

Tony Nguyen says:

====================
iwl-next Intel Wired LAN Driver Updates 2021-06-01

This pull request is targeting net-next and rdma-next branches.
These patches have been reviewed by netdev and rdma mailing lists[1].

This series adds RDMA support to the ice driver for E810 devices and
converts the i40e driver to use the auxiliary bus infrastructure
for X722 devices. The PCI netdev drivers register auxiliary RDMA devices
that will bind to auxiliary drivers registered by the new irdma module.

[1] https://lore.kernel.org/netdev/20210520143809.819-1-shiraz.saleem@intel.com/
---
v3:
- ice_aq_add_rdma_qsets(), ice_cfg_vsi_rdma(), ice_[ena|dis]_vsi_rdma_qset(),
and ice_cfg_rdma_fltr() no longer return ice_status
- Remove null check from ice_aq_add_rdma_qsets()

v2:
- Added patch 'i40e: Replace one-element array with flexible-array
member'

Changes since linked review (v6):
- Removed unnecessary checks in i40e_client_device_register() and
i40e_client_device_unregister()
- Simplified the i40e_client_device_register() API
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: mdio: Fix spelling mistakes
Zheng Yongjun [Tue, 1 Jun 2021 14:18:59 +0000 (22:18 +0800)]
net: mdio: Fix spelling mistakes

informations  ==> information
typicaly  ==> typically
derrive  ==> derive
eventhough  ==> even though

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: usb: Fix spelling mistakes
Zheng Yongjun [Tue, 1 Jun 2021 14:18:13 +0000 (22:18 +0800)]
net: usb: Fix spelling mistakes

wierdness  ==> weirdness
multicat  ==> multicast
limite  ==> limit
adddress  ==> address
operater  ==> operator
intial  ==> initial
smaler  ==> smaller
Communcation  ==> Communication
funcitons  ==> functions
everytime  ==> every time
Neigbor  ==> Neighbor
performace  ==> performance

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agovrf: Fix a typo
Zheng Yongjun [Tue, 1 Jun 2021 14:16:35 +0000 (22:16 +0800)]
vrf: Fix a typo

possibile  ==> possible

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agogtp: Fix a typo
Zheng Yongjun [Tue, 1 Jun 2021 14:16:25 +0000 (22:16 +0800)]
gtp: Fix a typo

Suppport  ==> Support

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agomacvlan: Fix a typo
Zheng Yongjun [Tue, 1 Jun 2021 14:16:10 +0000 (22:16 +0800)]
macvlan: Fix a typo

underlaying  ==> underlying

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: Return the correct errno code
Zheng Yongjun [Tue, 1 Jun 2021 14:14:07 +0000 (22:14 +0800)]
net: Return the correct errno code

When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: dcb: Return the correct errno code
Zheng Yongjun [Tue, 1 Jun 2021 14:13:58 +0000 (22:13 +0800)]
net: dcb: Return the correct errno code

When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agoigb: Fix -Wunused-const-variable warning
YueHaibing [Tue, 1 Jun 2021 14:02:38 +0000 (22:02 +0800)]
igb: Fix -Wunused-const-variable warning

If CONFIG_IGB_HWMON is n, gcc warns:

drivers/net/ethernet/intel/igb/e1000_82575.c:2765:17:
 warning: ‘e1000_emc_therm_limit’ defined but not used [-Wunused-const-variable=]
 static const u8 e1000_emc_therm_limit[4] = {
                 ^~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/igb/e1000_82575.c:2759:17:
 warning: ‘e1000_emc_temp_data’ defined but not used [-Wunused-const-variable=]
 static const u8 e1000_emc_temp_data[4] = {
                 ^~~~~~~~~~~~~~~~~~~

Move it into #ifdef block to fix this.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agocxgb4: Fix -Wunused-const-variable warning
YueHaibing [Tue, 1 Jun 2021 14:01:48 +0000 (22:01 +0800)]
cxgb4: Fix -Wunused-const-variable warning

If CONFIG_PCI_IOV is n, make W=1 warns:

drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:3909:33:
 warning: ‘cxgb4_mgmt_ethtool_ops’ defined but not used [-Wunused-const-variable=]
 static const struct ethtool_ops cxgb4_mgmt_ethtool_ops = {
                                 ^~~~~~~~~~~~~~~~~~~~~~

Move it into #ifdef block to fix this.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agohamradio: bpqether: Fix -Wunused-const-variable warning
YueHaibing [Tue, 1 Jun 2021 14:00:52 +0000 (22:00 +0800)]
hamradio: bpqether: Fix -Wunused-const-variable warning

If CONFIG_PROC_FS is n, gcc warns:

drivers/net/hamradio/bpqether.c:437:36:
 warning: ‘bpq_seqops’ defined but not used [-Wunused-const-variable=]
 static const struct seq_operations bpq_seqops = {
                                    ^~~~~~~~~~
Use #ifdef macro to gurad this.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: stmmac: enable platform specific safety features
Wong Vee Khee [Tue, 1 Jun 2021 13:52:35 +0000 (21:52 +0800)]
net: stmmac: enable platform specific safety features

On Intel platforms, not all safety features are enabled on the hardware.
The current implementation enable all safety features by default. This
will cause mass error and warning printouts after the module is loaded.

Introduce platform specific safety features flag to enable or disable
each safety features.

Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agoNFC: microread: Remove redundant assignment to variable err
Nigel Christian [Tue, 1 Jun 2021 13:35:33 +0000 (09:35 -0400)]
NFC: microread: Remove redundant assignment to variable err

In the case MICROREAD_CB_TYPE_READER_ALL clang reports a dead code
warning. The error code assigned to variable err is already passed
to async_cb(). The assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Nigel Christian <nigel.l.christian@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agoMerge branch 'hdlc-cleanups'
David S. Miller [Tue, 1 Jun 2021 23:57:47 +0000 (16:57 -0700)]
Merge branch 'hdlc-cleanups'

Peng Li says:

====================
net: hdlc: clean up some code style issues

This patchset clean up some code style issues.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: hdlc: add braces {} to all arms of the statement
Peng Li [Tue, 1 Jun 2021 13:23:22 +0000 (21:23 +0800)]
net: hdlc: add braces {} to all arms of the statement

Braces {} should be used on all arms of this statement.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: hdlc: move out assignment in if condition
Peng Li [Tue, 1 Jun 2021 13:23:21 +0000 (21:23 +0800)]
net: hdlc: move out assignment in if condition

Should not use assignment in if condition.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: hdlc: replace comparison to NULL with "!param"
Peng Li [Tue, 1 Jun 2021 13:23:20 +0000 (21:23 +0800)]
net: hdlc: replace comparison to NULL with "!param"

According to the chackpatch.pl, comparison to NULL could
be written "!param".

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: hdlc: fix an code style issue about EXPORT_SYMBOL(foo)
Peng Li [Tue, 1 Jun 2021 13:23:19 +0000 (21:23 +0800)]
net: hdlc: fix an code style issue about EXPORT_SYMBOL(foo)

According to the chackpatch.pl,
EXPORT_SYMBOL(foo); should immediately follow its function/variable.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: hdlc: fix an code style issue about "foo* bar"
Peng Li [Tue, 1 Jun 2021 13:23:18 +0000 (21:23 +0800)]
net: hdlc: fix an code style issue about "foo* bar"

Fix the checkpatch error as "foo* bar" and should be "foo *bar".

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: hdlc: add blank line after declarations
Peng Li [Tue, 1 Jun 2021 13:23:17 +0000 (21:23 +0800)]
net: hdlc: add blank line after declarations

This patch fixes the checkpatch error about missing a blank line
after declarations.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: hdlc: remove redundant blank lines
Peng Li [Tue, 1 Jun 2021 13:23:16 +0000 (21:23 +0800)]
net: hdlc: remove redundant blank lines

This patch removes some redundant blank lines.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agoMerge branch 'act_vlan-allow-modify-zero'
David S. Miller [Tue, 1 Jun 2021 23:54:42 +0000 (16:54 -0700)]
Merge branch 'act_vlan-allow-modify-zero'

Boris Sukholitko says:

====================
net/sched: act_vlan: Fix modify to allow 0

Currently vlan modification action checks existence of vlan priority by
comparing it to 0. Therefore it is impossible to modify existing vlan
tag to have priority 0.

For example, the following tc command will change the vlan id but will
not affect vlan priority:

tc filter add dev eth1 ingress matchall action vlan modify id 300 \
        priority 0 pipe mirred egress redirect dev eth2

The incoming packet on eth1:

ethertype 802.1Q (0x8100), vlan 200, p 4, ethertype IPv4

will be changed to:

ethertype 802.1Q (0x8100), vlan 300, p 4, ethertype IPv4

although the user has intended to have p == 0.

The fix is to add tcfv_push_prio_exists flag to struct tcf_vlan_params
and rely on it when deciding to set the priority.

The same flag is used to avoid dumping unset vlan priority.

Change Log:
v3 -> v4:
- revert tcf_vlan_get_fill_size change: total size calculation may race vs dump

v2 -> v3:
- Push assumes that the priority is being set
- tcf_vlan_get_fill_size accounts for priority existence

v1 -> v2:
- Do not dump unset priority and fix tests accordingly
- Test for priority 0 modification
====================

Reviewed-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet/sched: act_vlan: Test priority 0 modification
Boris Sukholitko [Tue, 1 Jun 2021 12:30:52 +0000 (15:30 +0300)]
net/sched: act_vlan: Test priority 0 modification

Because explicitly being set, the priority 0 should appear
in the output.

Signed-off-by: Boris Sukholitko <boris.sukholitko@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet/sched: act_vlan: No dump for unset priority
Boris Sukholitko [Tue, 1 Jun 2021 12:30:51 +0000 (15:30 +0300)]
net/sched: act_vlan: No dump for unset priority

Dump vlan priority only if it has been previously set.

Fix the tests accordingly.

Signed-off-by: Boris Sukholitko <boris.sukholitko@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet/sched: act_vlan: Fix modify to allow 0
Boris Sukholitko [Tue, 1 Jun 2021 12:30:50 +0000 (15:30 +0300)]
net/sched: act_vlan: Fix modify to allow 0

Currently vlan modification action checks existence of vlan priority by
comparing it to 0. Therefore it is impossible to modify existing vlan
tag to have priority 0.

For example, the following tc command will change the vlan id but will
not affect vlan priority:

tc filter add dev eth1 ingress matchall action vlan modify id 300 \
        priority 0 pipe mirred egress redirect dev eth2

The incoming packet on eth1:

ethertype 802.1Q (0x8100), vlan 200, p 4, ethertype IPv4

will be changed to:

ethertype 802.1Q (0x8100), vlan 300, p 4, ethertype IPv4

although the user has intended to have p == 0.

The fix is to add tcfv_push_prio_exists flag to struct tcf_vlan_params
and rely on it when deciding to set the priority.

Fixes: 45a497f2d149a4a8061c (net/sched: act_vlan: Introduce TCA_VLAN_ACT_MODIFY vlan action)
Signed-off-by: Boris Sukholitko <boris.sukholitko@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agoocteontx2-af: Fix spelling mistake "vesion" -> "version"
Colin Ian King [Tue, 1 Jun 2021 10:31:44 +0000 (11:31 +0100)]
octeontx2-af: Fix spelling mistake "vesion" -> "version"

There is a spelling mistake in a dev_warning message. Fix it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agoNFC: nci: Remove redundant assignment to len
Yang Li [Tue, 1 Jun 2021 09:49:50 +0000 (17:49 +0800)]
NFC: nci: Remove redundant assignment to len

Variable 'len' is set to conn_info->max_pkt_payload_len but this
value is never read as it is overwritten with a new value later on,
hence it is a redundant assignment and can be removed.

Clean up the following clang-analyzer warning:

net/nfc/nci/hci.c:164:3: warning: Value stored to 'len' is never read
[clang-analyzer-deadcode.DeadStores]

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: vxge: Declare the function vxge_reset_all_vpaths as void
Zheng Yongjun [Tue, 1 Jun 2021 08:23:04 +0000 (16:23 +0800)]
net: vxge: Declare the function vxge_reset_all_vpaths as void

variable 'status' is unneeded and it's noneed to check the
return value of function vxge_reset_all_vpaths,so declare
it as void.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agor8152: support pauseparam of ethtool_ops
Hayes Wang [Tue, 1 Jun 2021 07:37:12 +0000 (15:37 +0800)]
r8152: support pauseparam of ethtool_ops

Support get_pauseparam and set_pauseparam of ethtool_ops.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agoqlcnic: Remove the repeated declaration
Shaokun Zhang [Tue, 1 Jun 2021 06:57:58 +0000 (14:57 +0800)]
qlcnic: Remove the repeated declaration

Function 'qlcnic_82xx_hw_write_wx_2M' is declared twice, so remove the
repeated declaration.

Cc: Shahed Shaikh <shshaikh@marvell.com>
Cc: Manish Chopra <manishc@marvell.com>
Cc: GR-Linux-NIC-Dev@marvell.com
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agofjes: Use DEFINE_RES_MEM() and DEFINE_RES_IRQ() to simplify code
Zhen Lei [Tue, 1 Jun 2021 06:27:36 +0000 (14:27 +0800)]
fjes: Use DEFINE_RES_MEM() and DEFINE_RES_IRQ() to simplify code

No functional change.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: enetc: catch negative return code from enetc_pf_to_port()
Vladimir Oltean [Mon, 31 May 2021 16:17:07 +0000 (19:17 +0300)]
net: enetc: catch negative return code from enetc_pf_to_port()

After the refactoring introduced in commit 87614b931c24 ("net: enetc:
create a common enetc_pf_to_port helper"), enetc_pf_to_port was coded up
to return -1 in case the passed PCIe device does not have a recognized
BDF.

Make sure the -1 value is checked by the callers, to appease static
checkers.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonetpoll: don't require irqs disabled in rt kernels
Wander Lairson Costa [Mon, 31 May 2021 15:23:23 +0000 (12:23 -0300)]
netpoll: don't require irqs disabled in rt kernels

write_msg(netconsole.c:836) calls netpoll_send_udp after a call to
spin_lock_irqsave, which normally disables interrupts; but in PREEMPT_RT
this call just locks an rt_mutex without disabling irqs. In this case,
netpoll_send_udp is called with interrupts enabled.

Signed-off-by: Wander Lairson Costa <wander@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agoMerge branch 'marvell-prestera-firmware-3-0'
David S. Miller [Tue, 1 Jun 2021 22:11:57 +0000 (15:11 -0700)]
Merge branch 'marvell-prestera-firmware-3-0'

Vadym Kochan says:

====================
Marvell Prestera Switchdev initial updates for firmware version 3.0

This series adds minimal support for firmware version 3.0 which
has such changes like:

    - initial routing support

    - LAG support

    - events interrupt handling changes

Changes just make able to work with new firmware version but
supported features in driver will be added later.

New firmware version was recently merged into linux-firmware tree.

Added ability of loading previous fw major version if the latest one
is missing, also add support for previous FW ABI.

PATCH -> RFC:
    1) Load previous fw version if the latest one is missing (suggested by Andrew Lunn)

    2) Add support for previous FW ABI version (suggested by Andrew Lunn)

RFC v2:
    1) Get rid of automatic decrementing of
       major version but hard code it.

    2) Print error message with file path if
       previous FW could not be loaded.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: marvell: prestera: try to load previous fw version
Vadym Kochan [Mon, 31 May 2021 14:32:46 +0000 (17:32 +0300)]
net: marvell: prestera: try to load previous fw version

Lets try to load previous fw version in case the latest one is missing on
existing system.

Signed-off-by: Vadym Kochan <vkochan@marvell.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: marvell: prestera: bump supported firmware version to 3.0
Vadym Kochan [Mon, 31 May 2021 14:32:45 +0000 (17:32 +0300)]
net: marvell: prestera: bump supported firmware version to 3.0

New firmware version has some ABI and feature changes like:

    - LAG support
    - initial L3 support
    - changed events handling logic

Signed-off-by: Vadym Kochan <vkochan@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: marvell: prestera: align flood setting according to latest firmware version
Vadym Kochan [Mon, 31 May 2021 14:32:44 +0000 (17:32 +0300)]
net: marvell: prestera: align flood setting according to latest firmware version

Latest FW IPC flood message format was changed to configure uc/mc
flooding separately, so change code according to this.

Signed-off-by: Vadym Kochan <vkochan@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: marvell: prestera: disable events interrupt while handling
Vadym Kochan [Mon, 31 May 2021 14:32:43 +0000 (17:32 +0300)]
net: marvell: prestera: disable events interrupt while handling

There are change in firmware which requires that receiver will
disable event interrupts before handling them and enable them
after finish with handling. Events still may come into the queue
but without receiver interruption.

Signed-off-by: Vadym Kochan <vkochan@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonet: neterion: fix doc warnings in s2io.c
Yang Yingliang [Mon, 31 May 2021 12:48:59 +0000 (20:48 +0800)]
net: neterion: fix doc warnings in s2io.c

Add description for may_sleep to fix the W=1 warnings:

  drivers/net/ethernet/neterion/s2io.c:1110: warning: Function parameter or member 'may_sleep' not described in 'init_tti'
  drivers/net/ethernet/neterion/s2io.c:3335: warning: Function parameter or member 'may_sleep' not described in 'wait_for_cmd_complete'
  drivers/net/ethernet/neterion/s2io.c:4881: warning: Function parameter or member 'may_sleep' not described in 's2io_set_multicast'

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3 years agonetfilter: fix clang-12 fmt string warnings
Florian Westphal [Sat, 29 May 2021 16:53:25 +0000 (18:53 +0200)]
netfilter: fix clang-12 fmt string warnings

nf_conntrack_h323_main.c:198:6: warning: format specifies type 'unsigned short' but
xt_AUDIT.c:121:9: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat]

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
3 years agonetfilter: nft_set_pipapo_avx2: fix up description warnings
Florian Westphal [Sat, 29 May 2021 16:50:45 +0000 (18:50 +0200)]
netfilter: nft_set_pipapo_avx2: fix up description warnings

W=1:
net/netfilter/nft_set_pipapo_avx2.c:159: warning: Excess function parameter 'len' description in 'nft_pipapo_avx2_refill'
net/netfilter/nft_set_pipapo_avx2.c:1124: warning: Function parameter or member 'key' not described in 'nft_pipapo_avx2_lookup'
net/netfilter/nft_set_pipapo_avx2.c:1124: warning: Excess function parameter 'elem' description in 'nft_pipapo_avx2_lookup'

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
3 years agoMerge branch 'net-hns3-add-vlan-filter-control-support'
Jakub Kicinski [Tue, 1 Jun 2021 05:53:10 +0000 (22:53 -0700)]
Merge branch 'net-hns3-add-vlan-filter-control-support'

Huazhong Tan says:

====================
net: hns3: add VLAN filter control support

This patchset add VLAN filter control support for HNS3 driver.
====================

Link: https://lore.kernel.org/r/1622428725-30049-1-git-send-email-tanhuazhong@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
3 years agonet: hns3: add debugfs support for vlan configuration
Jian Shen [Mon, 31 May 2021 02:38:45 +0000 (10:38 +0800)]
net: hns3: add debugfs support for vlan configuration

Add debugfs support for vlan configuraion. create a single file
"vlan_config" for it, and query it by command "cat vlan_config",
return the result to userspace.

The new display style is below:
$ cat vlan_config
I_PORT_VLAN_FILTER: on
E_PORT_VLAN_FILTER: off
FUNC_ID  I_VF_VLAN_FILTER  E_VF_VLAN_FILTER  PORT_VLAN_FILTER_BYPASS
pf       off               on                off
vf0      off               on                off
FUNC_ID  PVID    ACCEPT_TAG1  ACCEPT_TAG2  ACCEPT_UNTAG1  ACCEPT_UNTAG2
pf       0       on           on           on             on
vf0      0       on           on           on             on

Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>