24 Mar, 2020
2 commits
-
Packet trap groups are now explicitly registered by drivers and not
implicitly registered when the packet traps are registered. Therefore,
there is no need to encode entire group structure the trap is associated
with inside the trap structure.Instead, only pass the group identifier. Refer to it as initial group
identifier, as future patches will allow user space to move traps
between groups.Signed-off-by: Ido Schimmel
Reviewed-by: Jiri Pirko
Signed-off-by: David S. Miller -
Currently, packet trap groups are implicitly registered by drivers upon
packet trap registration. When the traps are registered, each is
associated with a group and the group is created by devlink, if it does
not exist already.This makes it difficult for drivers to pass additional attributes for
the groups.Therefore, as a preparation for future patches that require passing
additional group attributes, add an API to explicitly register /
unregister these groups.Next patches will convert existing drivers to use this API.
Signed-off-by: Ido Schimmel
Reviewed-by: Jiri Pirko
Signed-off-by: David S. Miller
21 Mar, 2020
1 commit
-
The nfp driver uses ``fw.bundle_id`` to represent a unique identifier of the
entire firmware bundle.A future change is going to introduce a similar notion in the ice
driver, so promote ``fw.bundle_id`` into a generic version now.Signed-off-by: Jacob Keller
Reviewed-by: Jakub Kicinski
Tested-by: Andrew Bowers
Signed-off-by: Jeff Kirsher
26 Feb, 2020
2 commits
-
Add cookie argument to devlink_trap_report() allowing driver to pass in
the user cookie. Pass on the cookie down to drop monitor code.Signed-off-by: Jiri Pirko
Signed-off-by: Ido Schimmel
Reviewed-by: Jakub Kicinski
Signed-off-by: David S. Miller -
Allow driver to indicate cookie metadata for registered traps.
Signed-off-by: Jiri Pirko
Signed-off-by: Ido Schimmel
Reviewed-by: Jakub Kicinski
Signed-off-by: David S. Miller
25 Feb, 2020
1 commit
-
Add packet traps that can report packets that were dropped during ACL
processing.Signed-off-by: Jiri Pirko
Signed-off-by: Ido Schimmel
Signed-off-by: David S. Miller
19 Feb, 2020
1 commit
-
Add a new API for start/end binary array brackets [] to force array
around binary data as required from JSON. With this restriction, re-open
API to set binary fmsg data.Signed-off-by: Aya Levin
Reviewed-by: Jiri Pirko
Signed-off-by: Saeed Mahameed
27 Jan, 2020
1 commit
-
Add definition and documentation for the new generic info "fw.roce".
v2: Remove board.nvm_cfg since fw.psid is similar.
Cc: Jiri Pirko
Cc: Jakub Kicinski
Signed-off-by: Vasundhara Volam
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller
20 Jan, 2020
1 commit
19 Jan, 2020
3 commits
-
Add packet trap that can report NVE packets that the device decided to
drop because their overlay source MAC is multicast.Signed-off-by: Amit Cohen
Acked-by: Jiri Pirko
Signed-off-by: Ido Schimmel
Signed-off-by: David S. Miller -
Add packet traps that can report packets that were dropped during tunnel
decapsulation.Signed-off-by: Amit Cohen
Acked-by: Jiri Pirko
Signed-off-by: Ido Schimmel
Signed-off-by: David S. Miller -
Add packet trap that can report packets that reached the router, but are
non-routable. For example, IGMP queries can be flooded by the device in
layer 2 and reach the router. Such packets should not be routed and
instead dropped.Signed-off-by: Amit Cohen
Signed-off-by: Ido Schimmel
Signed-off-by: David S. Miller
12 Jan, 2020
1 commit
-
The function to obtain a unique snapshot id was mistakenly typo'd as
devlink_region_shapshot_id_get. Fix this typo by renaming the function
and all of its users.Signed-off-by: Jacob Keller
Acked-by: Jiri Pirko
Signed-off-by: David S. Miller
11 Jan, 2020
2 commits
-
Combine the documentation for devlink into a subfolder, and provide an
index.rst file that can be used to generally describe devlink.Signed-off-by: Jacob Keller
Signed-off-by: David S. Miller -
The "fw.psid" devlink info version is documented in devlink-info.rst,
and used by one driver. However, there is no associated macro for this
firmware version like there is for others. Add one now.Signed-off-by: Jacob Keller
Signed-off-by: David S. Miller
09 Jan, 2020
1 commit
-
It is possible that a reporter recovery completion do not finish
successfully when recovery is triggered via
devlink_health_reporter_recover as recovery could be processed in
different context. In such scenario an error is returned by driver when
recover hook is invoked and successful recovery completion is
intimated later.
Expose devlink recover done API to update recovery stats.Signed-off-by: Vikas Gupta
Signed-off-by: David S. Miller
14 Nov, 2019
1 commit
-
1) New generic devlink param "enable_roce", for downstream devlink
reload support2) Do vport ACL configuration on per vport basis when
enabling/disabling a vport. This enables to have vports enabled/disabled
outside of eswitch config for future3) Split the code for legacy vs offloads mode and make it clear
4) Tide up vport locking and workqueue usage
5) Fix metadata enablement for ECPF
6) Make explicit use of VF property to publish IB_DEVICE_VIRTUAL_FUNCTION
7) E-Switch and flow steering core low level support and refactoring for
netfilter flowtables offloadSigned-off-by: Saeed Mahameed
13 Nov, 2019
1 commit
-
Devlink supports pair output of name and value. When the value is
binary, it must be presented in an array. If the length of the binary
value exceeds fmsg limitation, break the value into chunks internally.Signed-off-by: Aya Levin
Acked-by: Jiri Pirko
Signed-off-by: David S. Miller
12 Nov, 2019
1 commit
-
New device parameter to enable/disable handling of RoCE traffic in the
device.Signed-off-by: Michael Guralnik
Acked-by: Jiri Pirko
Reviewed-by: Maor Gottlieb
Signed-off-by: Saeed Mahameed
09 Nov, 2019
1 commit
-
There is a race between driver code that does setup/cleanup of device
and devlink reload operation that in some drivers works with the same
code. Use after free could we easily obtained by running:while true; do
echo 10 > /sys/bus/netdevsim/new_device
devlink dev reload netdevsim/netdevsim10 &
echo 10 > /sys/bus/netdevsim/del_device
doneFix this by enabling reload only after setup of device is complete and
disabling it at the beginning of the cleanup process.Reported-by: Ido Schimmel
Fixes: 2d8dc5bbf4e7 ("devlink: Add support for reload")
Signed-off-by: Jiri Pirko
Acked-by: Jakub Kicinski
Signed-off-by: David S. Miller
08 Nov, 2019
2 commits
-
Add layer 3 generic packet exception traps that can report trapped
packets and documentation of the traps.Unlike drop traps, these exception traps also need to inject the packet
to the kernel's receive path. For example, a packet that was trapped due
to unreachable neighbour need to be injected into the kernel so that it
will trigger an ARP request or a neighbour solicitation message.Signed-off-by: Amit Cohen
Acked-by: Jiri Pirko
Signed-off-by: Ido Schimmel
Signed-off-by: David S. Miller -
Add packet traps that can report packets that were dropped during layer
3 forwarding.Signed-off-by: Amit Cohen
Acked-by: Jiri Pirko
Signed-off-by: Ido Schimmel
Signed-off-by: David S. Miller
12 Oct, 2019
1 commit
-
During health reporter operations, driver might want to fill-up
the extack message, so propagate extack down to the health reporter ops.Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
06 Oct, 2019
1 commit
-
For newly allocated devlink instance allow drivers to set net struct
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
05 Oct, 2019
2 commits
-
All devlink instances are created in init_net and stay there for a
lifetime. Allow user to be able to move devlink instances into
namespaces during devlink reload operation. That ensures proper
re-instantiation of driver objects, including netdevices.Signed-off-by: Jiri Pirko
Acked-by: Jakub Kicinski
Signed-off-by: David S. Miller -
Allow drivers to get net struct for devlink instance.
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
14 Sep, 2019
2 commits
-
Currently the fact that devlink reload failed is stored in drivers.
Move this flag into devlink core. Also, expose it to the user.Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller -
In order to properly implement failure indication during reload,
split the reload op into two ops, one for down phase and one for
up phase.Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
11 Sep, 2019
1 commit
-
Add the 'reset_dev_on_drv_probe' devlink parameter, controlling the
device reset policy on driver probe.This parameter is useful in conjunction with the existing
'fw_load_policy' parameter.Signed-off-by: Dirk van der Merwe
Signed-off-by: Jakub Kicinski
Signed-off-by: Simon Horman
Signed-off-by: David S. Miller
05 Sep, 2019
1 commit
-
The current tag set is still rather small and needs a couple
more tags to help with ASIC identification and to have a
more generic FW version.Cc: Jiri Pirko
Acked-by: Jakub Kicinski
Signed-off-by: Shannon Nelson
Signed-off-by: David S. Miller
01 Sep, 2019
1 commit
-
Devlink port index attribute is returned to users as u32 through
netlink response.
Change index data type from 'unsigned' to 'unsigned int' to avoid
below checkpatch.pl warning.WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
81: FILE: include/net/devlink.h:81:
+ unsigned index;Acked-by: Jiri Pirko
Signed-off-by: Parav Pandit
Signed-off-by: David S. Miller
18 Aug, 2019
3 commits
-
Add initial documentation of the devlink-trap mechanism, explaining the
background, motivation and the semantics of the interface.Signed-off-by: Ido Schimmel
Acked-by: Jiri Pirko
Signed-off-by: David S. Miller -
Add generic packet traps and groups that can report dropped packets as
well as exceptions such as TTL error.Signed-off-by: Ido Schimmel
Acked-by: Jiri Pirko
Signed-off-by: David S. Miller -
Add the basic packet trap infrastructure that allows device drivers to
register their supported packet traps and trap groups with devlink.Each driver is expected to provide basic information about each
supported trap, such as name and ID, but also the supported metadata
types that will accompany each packet trapped via the trap. The
currently supported metadata type is just the input port, but more will
be added in the future. For example, output port and traffic class.Trap groups allow users to set the action of all member traps. In
addition, users can retrieve per-group statistics in case per-trap
statistics are too narrow. In the future, the trap group object can be
extended with more attributes, such as policer settings which will limit
the amount of traffic generated by member traps towards the CPU.Beside registering their packet traps with devlink, drivers are also
expected to report trapped packets to devlink along with relevant
metadata. devlink will maintain packets and bytes statistics for each
packet trap and will potentially report the trapped packet with its
metadata to user space via drop monitor netlink channel.The interface towards the drivers is simple and allows devlink to set
the action of the trap. Currently, only two actions are supported:
'trap' and 'drop'. When set to 'trap', the device is expected to provide
the sole copy of the packet to the driver which will pass it to devlink.
When set to 'drop', the device is expected to drop the packet and not
send a copy to the driver. In the future, more actions can be added,
such as 'mirror'.Signed-off-by: Ido Schimmel
Acked-by: Jiri Pirko
Signed-off-by: David S. Miller
10 Aug, 2019
1 commit
-
The size of the snapshot has to be the same as the size of the region,
therefore no need to pass it again during snapshot creation. Remove the
arg and use region->size instead.Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
10 Jul, 2019
3 commits
-
In an eswitch, PCI VF may have port which is normally represented using
a representor netdevice.
To have better visibility of eswitch port, its association with VF,
and its representor netdevice, introduce a PCI VF port flavour.When devlink port flavour is PCI VF, fill up PCI VF attributes of
the port.Extend port name creation using PCI PF and VF number scheme on best
effort basis, so that vendor drivers can skip defining their own scheme.$ devlink port show
pci/0000:05:00.0/0: type eth netdev eth0 flavour pcipf pfnum 0
pci/0000:05:00.0/1: type eth netdev eth1 flavour pcivf pfnum 0 vfnum 0
pci/0000:05:00.0/2: type eth netdev eth2 flavour pcivf pfnum 0 vfnum 1Acked-by: Jiri Pirko
Signed-off-by: Parav Pandit
Signed-off-by: David S. Miller -
In an eswitch, PCI PF may have port which is normally represented
using a representor netdevice.
To have better visibility of eswitch port, its association with
PF and a representor netdevice, introduce a PCI PF port
flavour and port attriute.When devlink port flavour is PCI PF, fill up PCI PF attributes of the
port.Extend port name creation using PCI PF number on best effort basis.
So that vendor drivers can skip defining their own scheme.$ devlink port show
pci/0000:05:00.0/0: type eth netdev eth0 flavour pcipf pfnum 0Acked-by: Jiri Pirko
Signed-off-by: Parav Pandit
Signed-off-by: David S. Miller -
To support additional devlink port flavours and to support few common
and few different port attributes, move physical port attributes to a
different structure.Acked-by: Jiri Pirko
Signed-off-by: Parav Pandit
Signed-off-by: David S. Miller
29 Jun, 2019
1 commit
-
Misc updates from mlx5-next branch:
1) E-Switch vport metadata support for source vport matching
2) Convert mkey_table to XArray
3) Shared IRQs and to use single IRQ for all async EQsSigned-off-by: Saeed Mahameed
16 Jun, 2019
1 commit
-
Devlink has UAPI declaration for encap mode, so there is no
need to be loose on the data get/set by drivers.Update call sites to use enum devlink_eswitch_encap_mode
instead of plain u8.Suggested-by: Parav Pandit
Signed-off-by: Leon Romanovsky
Acked-by: Jiri Pirko
Reviewed-by: Parav Pandit
Reviewed-by: Petr Vorel