01 Apr, 2018

1 commit

  • [ Upstream commit 7fe4d6dcbcb43fe0282d4213fc52be178bb30e91 ]

    The current code performs unneeded free. Remove the redundant skb freeing
    during the error path.

    Fixes: 1555d204e743 ("devlink: Support for pipeline debug (dpipe)")
    Signed-off-by: Arkadi Sharshevsky
    Acked-by: Jiri Pirko
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Arkadi Sharshevsky
     

01 Sep, 2017

1 commit

  • This will be used by the IPv6 host table which will be introduced in the
    following patches. The fields in the header are added per-use. This header
    is global and can be reused by many drivers.

    Signed-off-by: Arkadi Sharshevsky
    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Arkadi Sharshevsky
     

31 Aug, 2017

1 commit


25 Aug, 2017

4 commits


05 Jun, 2017

1 commit


23 Apr, 2017

1 commit

  • This is an e-switch global knob to enable HW support for applying
    encapsulation/decapsulation to VF traffic as part of SRIOV e-switch offloading.

    The actual encap/decap is carried out (along with the matching and other actions)
    per offloaded e-switch rules, e.g as done when offloading the TC tunnel key action.

    Signed-off-by: Roi Dayan
    Reviewed-by: Or Gerlitz
    Acked-by: Jiri Pirko
    Signed-off-by: Saeed Mahameed

    Roi Dayan
     

12 Apr, 2017

1 commit


29 Mar, 2017

1 commit

  • The pipeline debug is used to export the pipeline abstractions for the
    main objects - tables, headers and entries. The only support for set is
    for changing the counter parameter on specific table.

    The basic structures:

    Header - can represent a real protocol header information or internal
    metadata. Generic protocol headers like IPv4 can be shared
    between drivers. Each driver can add local headers.

    Field - part of a header. Can represent protocol field or specific ASIC
    metadata field. Hardware special metadata fields can be mapped
    to different resources, for example switch ASIC ports can have
    internal number which from the systems point of view is mapped
    to netdeivce ifindex.

    Match - represent specific match rule. Can describe match on specific
    field or header. The header index should be specified as well
    in order to support several header instances of the same type
    (tunneling).

    Action - represents specific action rule. Actions can describe operations
    on specific field values for example like set, increment, etc.
    And header operation like add and delete.

    Value - represents value which can be associated with specific match or
    action.

    Table - represents a hardware block which can be described with match/
    action behavior. The match/action can be done on the packets
    data or on the internal metadata that it gathered along the
    packets traversal throw the pipeline which is vendor specific
    and should be exported in order to provide understanding of
    ASICs behavior.

    Entry - represents single record in a specific table. The entry is
    identified by specific combination of values for match/action.

    Prior to accessing the tables/entries the drivers provide the header/
    field data base which is used by driver to user-space. The data base
    is split between the shared headers and unique headers.

    Signed-off-by: Arkadi Sharshevsky
    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Arkadi Sharshevsky
     

11 Feb, 2017

4 commits


25 Nov, 2016

1 commit

  • Some HWs need the VF driver to put part of the packet headers on the
    TX descriptor so the e-switch can do proper matching and steering.

    The supported modes: none, link, network, transport.

    Signed-off-by: Roi Dayan
    Reviewed-by: Or Gerlitz
    Signed-off-by: Saeed Mahameed
    Signed-off-by: David S. Miller

    Roi Dayan
     

28 Oct, 2016

3 commits

  • Now genl_register_family() is the only thing (other than the
    users themselves, perhaps, but I didn't find any doing that)
    writing to the family struct.

    In all families that I found, genl_register_family() is only
    called from __init functions (some indirectly, in which case
    I've add __init annotations to clarifly things), so all can
    actually be marked __ro_after_init.

    This protects the data structure from accidental corruption.

    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     
  • Instead of providing macros/inline functions to initialize
    the families, make all users initialize them statically and
    get rid of the macros.

    This reduces the kernel code size by about 1.6k on x86-64
    (with allyesconfig).

    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     
  • Static family IDs have never really been used, the only
    use case was the workaround I introduced for those users
    that assumed their family ID was also their multicast
    group ID.

    Additionally, because static family IDs would never be
    reserved by the generic netlink code, using a relatively
    low ID would only work for built-in families that can be
    registered immediately after generic netlink is started,
    which is basically only the control family (apart from
    the workaround code, which I also had to add code for so
    it would reserve those IDs)

    Thus, anything other than GENL_ID_GENERATE is flawed and
    luckily not used except in the cases I mentioned. Move
    those workarounds into a few lines of code, and then get
    rid of GENL_ID_GENERATE entirely, making it more robust.

    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     

27 Oct, 2016

1 commit


13 Jul, 2016

1 commit


03 Jul, 2016

1 commit

  • Add the commands to set and show the mode of SRIOV E-Switch, two modes
    are supported:

    * legacy: operating in the "old" L2 based mode (DMAC --> VF vport)

    * switchdev: the E-Switch is referred to as whitebox switch configured
    using standard tools such as tc, bridge, openvswitch etc. To allow
    working with the tools, for each VF, a VF representor netdevice is
    created by the E-Switch manager vendor device driver instance (e.g PF).

    Signed-off-by: Or Gerlitz
    Signed-off-by: Saeed Mahameed
    Signed-off-by: David S. Miller

    Or Gerlitz
     

15 Apr, 2016

2 commits

  • User needs to monitor shared buffer occupancy. For that, he issues a
    snapshot command in order to instruct hardware to catch current and
    maximal occupancy values, and clear command in order to clear the
    historical maximal values.

    Also port-pool and tc-pool-bind command response messages are extended to
    carry occupancy values.

    Signed-off-by: Jiri Pirko
    Reviewed-by: Ido Schimmel
    Signed-off-by: David S. Miller

    Jiri Pirko
     
  • Define userspace API and drivers API for configuration of shared
    buffers. Four basic objects are defined:
    shared buffer - attributes are size, number of pools and TCs
    pool - chunk of sharedbuffer definition, it has some size and either
    static or dynamic threshold
    port pool threshold - to set per-port threshold for each pool
    port tc threshold bind - to bind port and TC to specified pool
    with threshold.

    Signed-off-by: Jiri Pirko
    Reviewed-by: Ido Schimmel
    Signed-off-by: David S. Miller

    Jiri Pirko
     

09 Apr, 2016

2 commits


02 Mar, 2016

1 commit

  • Introduce devlink infrastructure for drivers to register and expose to
    userspace via generic Netlink interface.

    There are two basic objects defined:
    devlink - one instance for every "parent device", for example switch ASIC
    devlink port - one instance for every physical port of the device.

    This initial portion implements basic get/dump of objects to userspace.
    Also, port splitter and port type setting is implemented.

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko