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

    Ido Schimmel
     
  • 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

    Ido Schimmel
     

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

    Jacob Keller
     

26 Feb, 2020

2 commits


25 Feb, 2020

1 commit


19 Feb, 2020

1 commit


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

    Vasundhara Volam
     

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

    Amit Cohen
     
  • 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

    Amit Cohen
     
  • 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

    Amit Cohen
     

12 Jan, 2020

1 commit


11 Jan, 2020

2 commits


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

    Vikas Gupta
     

14 Nov, 2019

1 commit

  • 1) New generic devlink param "enable_roce", for downstream devlink
    reload support

    2) 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 future

    3) 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 offload

    Signed-off-by: Saeed Mahameed

    Saeed Mahameed
     

13 Nov, 2019

1 commit


12 Nov, 2019

1 commit


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
    done

    Fix 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

    Jiri Pirko
     

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

    Amit Cohen
     
  • 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

    Amit Cohen
     

12 Oct, 2019

1 commit


06 Oct, 2019

1 commit


05 Oct, 2019

2 commits


14 Sep, 2019

2 commits


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

    Dirk van der Merwe
     

05 Sep, 2019

1 commit


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

    Parav Pandit
     

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

    Ido Schimmel
     
  • 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

    Ido Schimmel
     
  • 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

    Ido Schimmel
     

10 Aug, 2019

1 commit


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 1

    Acked-by: Jiri Pirko
    Signed-off-by: Parav Pandit
    Signed-off-by: David S. Miller

    Parav Pandit
     
  • 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 0

    Acked-by: Jiri Pirko
    Signed-off-by: Parav Pandit
    Signed-off-by: David S. Miller

    Parav Pandit
     
  • 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

    Parav Pandit
     

29 Jun, 2019

1 commit


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

    Leon Romanovsky