1. 13 May, 2022 9 commits
    • Florian Westphal's avatar
      netfilter: conntrack: remove unconfirmed list · 8a75a2c1
      Florian Westphal authored
      It has no function anymore and can be removed.
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      8a75a2c1
    • Florian Westphal's avatar
      netfilter: conntrack: remove __nf_ct_unconfirmed_destroy · ace53fdc
      Florian Westphal authored
      Its not needed anymore:
      
      A. If entry is totally new, then the rcu-protected resource
      must already have been removed from global visibility before call
      to nf_ct_iterate_destroy.
      
      B. If entry was allocated before, but is not yet in the hash table
         (uncofirmed case), genid gets incremented and synchronize_rcu() call
         makes sure access has completed.
      
      C. Next attempt to peek at extension area will fail for unconfirmed
        conntracks, because ext->genid != genid.
      
      D. Conntracks in the hash are iterated as before.
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      ace53fdc
    • Florian Westphal's avatar
      netfilter: cttimeout: decouple unlink and free on netns destruction · 42df4fb9
      Florian Westphal authored
      Increment the extid on module removal; this makes sure that even
      in extreme cases any old uncofirmed entry that happened to be kept
      e.g. on nfnetlink_queue list will not trip over a stale timeout
      reference.
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      42df4fb9
    • Florian Westphal's avatar
      netfilter: extensions: introduce extension genid count · c56716c6
      Florian Westphal authored
      Multiple netfilter extensions store pointers to external data
      in their extension area struct.
      
      Examples:
      1. Timeout policies
      2. Connection tracking helpers.
      
      No references are taken for these.
      
      When a helper or timeout policy is removed, the conntrack table gets
      traversed and affected extensions are cleared.
      
      Conntrack entries not yet in the hashtable are referenced via a special
      list, the unconfirmed list.
      
      On removal of a policy or connection tracking helper, the unconfirmed
      list gets traversed an all entries are marked as dying, this prevents
      them from getting committed to the table at insertion time: core checks
      for dying bit, if set, the conntrack entry gets destroyed at confirm
      time.
      
      The disadvantage is that each new conntrack has to be added to the percpu
      unconfirmed list, and each insertion needs to remove it from this list.
      The list is only ever needed when a policy or helper is removed -- a rare
      occurrence.
      
      Add a generation ID count: Instead of adding to the list and then
      traversing that list on policy/helper removal, increment a counter
      that is stored in the extension area.
      
      For unconfirmed conntracks, the extension has the genid valid at ct
      allocation time.
      
      Removal of a helper/policy etc. increments the counter.
      At confirmation time, validate that ext->genid == global_id.
      
      If the stored number is not the same, do not allow the conntrack
      insertion, just like as if a confirmed-list traversal would have flagged
      the entry as dying.
      
      After insertion, the genid is no longer relevant (conntrack entries
      are now reachable via the conntrack table iterators and is set to 0.
      
      This allows removal of the percpu unconfirmed list.
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      c56716c6
    • Florian Westphal's avatar
      netfilter: remove nf_ct_unconfirmed_destroy helper · 17438b42
      Florian Westphal authored
      This helper tags connections not yet in the conntrack table as
      dying.  These nf_conn entries will be dropped instead when the
      core attempts to insert them from the input or postrouting
      'confirm' hook.
      
      After the previous change, the entries get unlinked from the
      list earlier, so that by the time the actual exit hook runs,
      new connections no longer have a timeout policy assigned.
      
      Its enough to walk the hashtable instead.
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      17438b42
    • Florian Westphal's avatar
      netfilter: cttimeout: decouple unlink and free on netns destruction · 78222bac
      Florian Westphal authored
      Make it so netns pre_exit unlinks the objects from the pernet list, so
      they cannot be found anymore.
      
      netns core issues a synchronize_rcu() before calling the exit hooks so
      any the time the exit hooks run unconfirmed nf_conn entries have been
      free'd or they have been committed to the hashtable.
      
      The exit hook still tags unconfirmed entries as dying, this can
      now be removed in a followup change.
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      78222bac
    • Florian Westphal's avatar
      netfilter: conntrack: remove the percpu dying list · 1397af5b
      Florian Westphal authored
      Its no longer needed. Entries that need event redelivery are placed
      on the new pernet dying list.
      
      The advantage is that there is no need to take additional spinlock on
      conntrack removal unless event redelivery failed or the conntrack entry
      was never added to the table in the first place (confirmed bit not set).
      
      The IPS_CONFIRMED bit now needs to be set as soon as the entry has been
      unlinked from the unconfirmed list, else the destroy function may
      attempt to unlink it a second time.
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      1397af5b
    • Florian Westphal's avatar
      netfilter: conntrack: include ecache dying list in dumps · 0d3cc504
      Florian Westphal authored
      The new pernet dying list includes conntrack entries that await
      delivery of the 'destroy' event via ctnetlink.
      
      The old percpu dying list will be removed soon.
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      0d3cc504
    • Florian Westphal's avatar
      netfilter: ecache: use dedicated list for event redelivery · 2ed3bf18
      Florian Westphal authored
      This disentangles event redelivery and the percpu dying list.
      
      Because entries are now stored on a dedicated list, all
      entries are in NFCT_ECACHE_DESTROY_FAIL state and all entries
      still have confirmed bit set -- the reference count is at least 1.
      
      The 'struct net' back-pointer can be removed as well.
      
      The pcpu dying list will be removed eventually, it has no functionality.
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      2ed3bf18
  2. 18 Apr, 2022 20 commits
    • Luiz Angelo Daros de Luca's avatar
      docs: net: dsa: describe issues with checksum offload · a997157e
      Luiz Angelo Daros de Luca authored
      DSA tags before IP header (categories 1 and 2) or after the payload (3)
      might introduce offload checksum issues.
      Signed-off-by: default avatarLuiz Angelo Daros de Luca <luizluca@gmail.com>
      Reviewed-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a997157e
    • David S. Miller's avatar
      Merge branch 'mlxsw-line-card' · 2a38de06
      David S. Miller authored
      Ido Schimmel says:
      
      ====================
      mlxsw: Introduce line card support for modular switch
      
      Jiri says:
      
      This patchset introduces support for modular switch systems and also
      introduces mlxsw support for NVIDIA Mellanox SN4800 modular switch.
      It contains 8 slots to accommodate line cards - replaceable PHY modules
      which may contain gearboxes.
      Currently supported line card:
      16X 100GbE (QSFP28)
      Other line cards that are going to be supported:
      8X 200GbE (QSFP56)
      4X 400GbE (QSFP-DD)
      There may be other types of line cards added in the future.
      
      To be consistent with the port split configuration (splitter cabels),
      the line card entities are treated in the similar way. The nature of
      a line card is not "a pluggable device", but "a pluggable PHY module".
      
      A concept of "provisioning" is introduced. The user may "provision"
      certain slot with a line card type. Driver then creates all instances
      (devlink ports, netdevices, etc) related to this line card type. It does
      not matter if the line card is plugged-in at the time. User is able to
      configure netdevices, devlink ports, setup port splitters, etc. From the
      perspective of the switch ASIC, all is present and can be configured.
      
      The carrier of netdevices stays down if the line card is not plugged-in.
      Once the line card is inserted and activated, the carrier of
      the related netdevices is then reflecting the physical line state,
      same as for an ordinary fixed port.
      
      Once user does not want to use the line card related instances
      anymore, he can "unprovision" the slot. Driver then removes the
      instances.
      
      Patches 1-4 are extending devlink driver API and UAPI in order to
      register, show, dump, provision and activate the line card.
      Patches 5-17 are implementing the introduced API in mlxsw.
      The last patch adds a selftest for mlxsw line cards.
      
      Example:
      $ devlink port # No ports are listed
      $ devlink lc
      pci/0000:01:00.0:
        lc 1 state unprovisioned
          supported_types:
             16x100G
        lc 2 state unprovisioned
          supported_types:
             16x100G
        lc 3 state unprovisioned
          supported_types:
             16x100G
        lc 4 state unprovisioned
          supported_types:
             16x100G
        lc 5 state unprovisioned
          supported_types:
             16x100G
        lc 6 state unprovisioned
          supported_types:
             16x100G
        lc 7 state unprovisioned
          supported_types:
             16x100G
        lc 8 state unprovisioned
          supported_types:
             16x100G
      
      Note that driver exposes list supported line card types. Currently
      there is only one: "16x100G".
      
      To provision the slot #8:
      
      $ devlink lc set pci/0000:01:00.0 lc 8 type 16x100G
      $ devlink lc show pci/0000:01:00.0 lc 8
      pci/0000:01:00.0:
        lc 8 state active type 16x100G
          supported_types:
             16x100G
      $ devlink port
      pci/0000:01:00.0/0: type notset flavour cpu port 0 splittable false
      pci/0000:01:00.0/53: type eth netdev enp1s0nl8p1 flavour physical lc 8 port 1 splittable true lanes 4
      pci/0000:01:00.0/54: type eth netdev enp1s0nl8p2 flavour physical lc 8 port 2 splittable true lanes 4
      pci/0000:01:00.0/55: type eth netdev enp1s0nl8p3 flavour physical lc 8 port 3 splittable true lanes 4
      pci/0000:01:00.0/56: type eth netdev enp1s0nl8p4 flavour physical lc 8 port 4 splittable true lanes 4
      pci/0000:01:00.0/57: type eth netdev enp1s0nl8p5 flavour physical lc 8 port 5 splittable true lanes 4
      pci/0000:01:00.0/58: type eth netdev enp1s0nl8p6 flavour physical lc 8 port 6 splittable true lanes 4
      pci/0000:01:00.0/59: type eth netdev enp1s0nl8p7 flavour physical lc 8 port 7 splittable true lanes 4
      pci/0000:01:00.0/60: type eth netdev enp1s0nl8p8 flavour physical lc 8 port 8 splittable true lanes 4
      pci/0000:01:00.0/61: type eth netdev enp1s0nl8p9 flavour physical lc 8 port 9 splittable true lanes 4
      pci/0000:01:00.0/62: type eth netdev enp1s0nl8p10 flavour physical lc 8 port 10 splittable true lanes 4
      pci/0000:01:00.0/63: type eth netdev enp1s0nl8p11 flavour physical lc 8 port 11 splittable true lanes 4
      pci/0000:01:00.0/64: type eth netdev enp1s0nl8p12 flavour physical lc 8 port 12 splittable true lanes 4
      pci/0000:01:00.0/125: type eth netdev enp1s0nl8p13 flavour physical lc 8 port 13 splittable true lanes 4
      pci/0000:01:00.0/126: type eth netdev enp1s0nl8p14 flavour physical lc 8 port 14 splittable true lanes 4
      pci/0000:01:00.0/127: type eth netdev enp1s0nl8p15 flavour physical lc 8 port 15 splittable true lanes 4
      pci/0000:01:00.0/128: type eth netdev enp1s0nl8p16 flavour physical lc 8 port 16 splittable true lanes 4
      
      To uprovision the slot #8:
      
      $ devlink lc set pci/0000:01:00.0 lc 8 notype
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2a38de06
    • Jiri Pirko's avatar
      selftests: mlxsw: Introduce devlink line card provision/unprovision/activation tests · e1fad951
      Jiri Pirko authored
      Introduce basic line card manipulation which consists of provisioning,
      unprovisioning and activation of a line card.
      Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e1fad951
    • Jiri Pirko's avatar
      mlxsw: spectrum: Add port to linecard mapping · 6445eef0
      Jiri Pirko authored
      For each port get slot_index using PMLP register. For ports residing
      on a linecard, identify it with the linecard by setting mapping
      using devlink_port_linecard_set() helper. Use linecard slot index for
      PMTDB register queries.
      Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6445eef0
    • Jiri Pirko's avatar
      mlxsw: core: Extend driver ops by remove selected ports op · 45bf3b72
      Jiri Pirko authored
      In case of line card implementation, the core has to have a way to
      remove relevant ports manually. Extend the Spectrum driver ops by an op
      that implements port removal of selected ports upon request.
      Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      45bf3b72
    • Jiri Pirko's avatar
      mlxsw: core_linecards: Implement line card activation process · ee7a70fa
      Jiri Pirko authored
      Allow to process events generated upon line card getting "ready" and
      "active".
      
      When DSDSC event with "ready" bit set is delivered, that means the
      line card is powered up. Use MDDC register to push the line card to
      active state. Once FW is done with that, the DSDSC event with "active"
      bit set is delivered.
      Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ee7a70fa
    • Jiri Pirko's avatar
      mlxsw: core_linecards: Add line card objects and implement provisioning · b217127e
      Jiri Pirko authored
      Introduce objects for line cards and an infrastructure around that.
      Use devlink_linecard_create/destroy() to register the line card with
      devlink core. Implement provisioning ops with a list of supported
      line cards.
      Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b217127e
    • Jiri Pirko's avatar
      mlxsw: reg: Add Management Binary Code Transfer Register · 5bade5aa
      Jiri Pirko authored
      The MBCT register allows to transfer binary INI codes from the host to
      the management FW by transferring it by chunks of maximum 1KB.
      Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5bade5aa
    • Jiri Pirko's avatar
      mlxsw: reg: Add Management DownStream Device Control Register · 5290a8ff
      Jiri Pirko authored
      The MDDC register allows to control downstream devices and line cards.
      Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5290a8ff
    • Jiri Pirko's avatar
      mlxsw: reg: Add Management DownStream Device Query Register · 505f524d
      Jiri Pirko authored
      The MDDQ register allows to query the DownStream device properties.
      Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      505f524d
    • Jiri Pirko's avatar
      mlxsw: spectrum: Introduce port mapping change event processing · b0ec003e
      Jiri Pirko authored
      Register PMLPE trap and process the port mapping changes delivered
      by it by creating related ports. Note that this happens after
      provisioning. The INI of the linecard is processed and merged by FW.
      PMLPE is generated for each port. Process this mapping change.
      
      Layout of PMLPE is the same as layout of PMLP.
      Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b0ec003e
    • Jiri Pirko's avatar
      mlxsw: Narrow the critical section of devl_lock during ports creation/removal · adc64623
      Jiri Pirko authored
      No need to hold the lock for alloc and freecpu. So narrow the critical
      section. Follow-up patch is going to benefit from this by adding more
      code to the functions which will be out of the critical as well.
      Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      adc64623
    • Jiri Pirko's avatar
      mlxsw: reg: Add Ports Mapping Event Configuration Register · ebf0c534
      Jiri Pirko authored
      The PMECR register is used to enable/disable event triggering
      in case of local port mapping change.
      Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ebf0c534
    • Jiri Pirko's avatar
      mlxsw: spectrum: Allocate port mapping array of structs instead of pointers · d3ad2d88
      Jiri Pirko authored
      Instead of array of pointers to port mapping structures, allocate the
      array of structures directly.
      Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d3ad2d88
    • Jiri Pirko's avatar
      mlxsw: spectrum: Allow lane to start from non-zero index · bac62191
      Jiri Pirko authored
      So far, the lane index always started from zero. That is not true for
      modular systems with gearbox-equipped linecards. Loose the check so the
      lanes can start from non-zero index.
      Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bac62191
    • Jiri Pirko's avatar
      devlink: add port to line card relationship set · b8375859
      Jiri Pirko authored
      In order to properly inform user about relationship between port and
      line card, introduce a driver API to set line card for a port. Use this
      information to extend port devlink netlink message by line card index
      and also include the line card index into phys_port_name and by that
      into a netdevice name.
      Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b8375859
    • Jiri Pirko's avatar
      devlink: implement line card active state · fc9f50d5
      Jiri Pirko authored
      Allow driver to mark a line card as active. Expose this state to the
      userspace over devlink netlink interface with proper notifications.
      'active' state means that line card was plugged in after
      being provisioned.
      Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fc9f50d5
    • Jiri Pirko's avatar
      devlink: implement line card provisioning · fcdc8ce2
      Jiri Pirko authored
      In order to be able to configure all needed stuff on a port/netdevice
      of a line card without the line card being present, introduce line card
      provisioning. Basically by setting a type, provisioning process will
      start and driver is supposed to create a placeholder for instances
      (ports/netdevices) for a line card type.
      
      Allow the user to query the supported line card types over line card
      get command. Then implement two netlink command SET to allow user to
      set/unset the card type.
      
      On the driver API side, add provision/unprovision ops and supported
      types array to be advertised. Upon provision op call, the driver should
      take care of creating the instances for the particular line card type.
      Introduce provision_set/clear() functions to be called by the driver
      once the provisioning/unprovisioning is done on its side. These helpers
      are not to be called directly due to the async nature of provisioning.
      
      Example:
      $ devlink port # No ports are listed
      $ devlink lc
      pci/0000:01:00.0:
        lc 1 state unprovisioned
          supported_types:
             16x100G
        lc 2 state unprovisioned
          supported_types:
             16x100G
        lc 3 state unprovisioned
          supported_types:
             16x100G
        lc 4 state unprovisioned
          supported_types:
             16x100G
        lc 5 state unprovisioned
          supported_types:
             16x100G
        lc 6 state unprovisioned
          supported_types:
             16x100G
        lc 7 state unprovisioned
          supported_types:
             16x100G
        lc 8 state unprovisioned
          supported_types:
             16x100G
      
      $ devlink lc set pci/0000:01:00.0 lc 8 type 16x100G
      $ devlink lc show pci/0000:01:00.0 lc 8
      pci/0000:01:00.0:
        lc 8 state active type 16x100G
          supported_types:
             16x100G
      $ devlink port
      pci/0000:01:00.0/0: type notset flavour cpu port 0 splittable false
      pci/0000:01:00.0/53: type eth netdev enp1s0nl8p1 flavour physical lc 8 port 1 splittable true lanes 4
      pci/0000:01:00.0/54: type eth netdev enp1s0nl8p2 flavour physical lc 8 port 2 splittable true lanes 4
      pci/0000:01:00.0/55: type eth netdev enp1s0nl8p3 flavour physical lc 8 port 3 splittable true lanes 4
      pci/0000:01:00.0/56: type eth netdev enp1s0nl8p4 flavour physical lc 8 port 4 splittable true lanes 4
      pci/0000:01:00.0/57: type eth netdev enp1s0nl8p5 flavour physical lc 8 port 5 splittable true lanes 4
      pci/0000:01:00.0/58: type eth netdev enp1s0nl8p6 flavour physical lc 8 port 6 splittable true lanes 4
      pci/0000:01:00.0/59: type eth netdev enp1s0nl8p7 flavour physical lc 8 port 7 splittable true lanes 4
      pci/0000:01:00.0/60: type eth netdev enp1s0nl8p8 flavour physical lc 8 port 8 splittable true lanes 4
      pci/0000:01:00.0/61: type eth netdev enp1s0nl8p9 flavour physical lc 8 port 9 splittable true lanes 4
      pci/0000:01:00.0/62: type eth netdev enp1s0nl8p10 flavour physical lc 8 port 10 splittable true lanes 4
      pci/0000:01:00.0/63: type eth netdev enp1s0nl8p11 flavour physical lc 8 port 11 splittable true lanes 4
      pci/0000:01:00.0/64: type eth netdev enp1s0nl8p12 flavour physical lc 8 port 12 splittable true lanes 4
      pci/0000:01:00.0/125: type eth netdev enp1s0nl8p13 flavour physical lc 8 port 13 splittable true lanes 4
      pci/0000:01:00.0/126: type eth netdev enp1s0nl8p14 flavour physical lc 8 port 14 splittable true lanes 4
      pci/0000:01:00.0/127: type eth netdev enp1s0nl8p15 flavour physical lc 8 port 15 splittable true lanes 4
      pci/0000:01:00.0/128: type eth netdev enp1s0nl8p16 flavour physical lc 8 port 16 splittable true lanes 4
      
      $ devlink lc set pci/0000:01:00.0 lc 8 notype
      Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fcdc8ce2
    • Jiri Pirko's avatar
      devlink: add support to create line card and expose to user · c246f9b5
      Jiri Pirko authored
      Extend the devlink API so the driver is going to be able to create and
      destroy linecard instances. There can be multiple line cards per devlink
      device. Expose this new type of object over devlink netlink API to the
      userspace, with notifications.
      Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c246f9b5
    • Eric Dumazet's avatar
      tcp: fix signed/unsigned comparison · 843f7740
      Eric Dumazet authored
      Kernel test robot reported:
      
      smatch warnings:
      net/ipv4/tcp_input.c:5966 tcp_rcv_established() warn: unsigned 'reason' is never less than zero.
      
      I actually had one packetdrill failing because of this bug,
      and was about to send the fix :)
      
      v2: Andreas Schwab also pointed out that @reason needs to be negated
          before we reach tcp_drop_reason()
      
      Fixes: 4b506af9 ("tcp: add two drop reasons for tcp_ack()")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Reported-by: default avatarAndreas Schwab <schwab@linux-m68k.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      843f7740
  3. 17 Apr, 2022 11 commits