28 Feb, 2019

10 commits

  • Now that we have converted all possible callers to using a switchdev
    notifier for attributes we do not have a need for implementing
    switchdev_ops anymore, and this can be removed from all drivers the
    net_device structure.

    Signed-off-by: Florian Fainelli
    Reviewed-by: Ido Schimmel
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • Drop switchdev_ops.switchdev_port_attr_set. Drop the uses of this field
    from all clients, which were migrated to use switchdev notification in
    the previous patches.

    Add a new function switchdev_port_attr_notify() that sends the switchdev
    notifications SWITCHDEV_PORT_ATTR_SET and calls the blocking (process)
    notifier chain.

    We have one odd case within net/bridge/br_switchdev.c with the
    SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS attribute identifier that
    requires executing from atomic context, we deal with that one
    specifically.

    Drop __switchdev_port_attr_set() and update switchdev_port_attr_set()
    likewise.

    Signed-off-by: Florian Fainelli
    Reviewed-by: Ido Schimmel
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • Following patches will change the way we communicate setting a port's
    attribute and use a blocking notifier to perform those tasks.

    Prepare ethsw to support receiving notifier events targeting
    SWITCHDEV_PORT_ATTR_SET and simply translate that into the existing
    swdev_port_attr_set() call.

    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • Following patches will change the way we communicate setting a port's
    attribute and use notifiers to perform those tasks.

    Ocelot does not currently have an atomic notifier registered for
    switchdev events, so we need to register one in order to deal with
    atomic context SWITCHDEV_PORT_ATTR_SET events.

    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • Following patches will change the way we communicate setting a port's
    attribute and use a notifier to perform those tasks.

    Prepare mlxsw to support receiving notifier events targeting
    SWITCHDEV_PORT_ATTR_SET and utilize the switchdev_handle_port_attr_set()
    to handle stacking of devices.

    Reviewed-by: Ido Schimmel
    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • Following patches will change the way we communicate setting a port's
    attribute and use notifiers towards that goal.

    Prepare DSA to support receiving notifier events targeting
    SWITCHDEV_PORT_ATTR_SET from both atomic and process context and use a
    small helper to translate the event notifier into something that
    dsa_slave_port_attr_set() can process.

    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • Following patches will change the way we communicate setting a port's
    attribute and use notifiers towards that goal.

    Prepare rocker to support receiving notifier events targeting
    SWITCHDEV_PORT_ATTR_SET from both atomic and process context and use a
    small helper to translate the event notifier into something that
    rocker_port_attr_set() can process.

    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • In preparation for allowing switchdev enabled drivers to veto specific
    attribute settings from within the context of the caller, introduce a
    new switchdev notifier type for port attributes.

    Suggested-by: Ido Schimmel
    Reviewed-by: Ido Schimmel
    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • This reverts commit 31a998487641 ("net: sched: fw: don't set arg->stop in
    fw_walk() when empty")

    Cls API function tcf_proto_is_empty() was changed in commit
    6676d5e416ee ("net: sched: set dedicated tcf_walker flag when tp is empty")
    to no longer depend on arg->stop to determine that classifier instance is
    empty. Instead, it adds dedicated arg->nonempty field, which makes the fix
    in fw classifier no longer necessary.

    Signed-off-by: Vlad Buslov
    Signed-off-by: David S. Miller

    Vlad Buslov
     
  • Initialize the .cmd member by using a designated struct
    initializer. This fixes warning of missing field initializers,
    and makes code a little easier to read.

    Signed-off-by: Li RongQing
    Reviewed-by: Michal Kubecek
    Signed-off-by: David S. Miller

    Li RongQing
     

27 Feb, 2019

23 commits

  • Use div_u64() to resolve build failures on 32-bit platforms.

    Fixes: 3f7ae5f3dc52 ("net: sched: pie: add more cases to auto-tune alpha and beta")
    Signed-off-by: Leslie Monis
    Reported-by: Randy Dunlap
    Tested-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Leslie Monis
     
  • This pointer is RCU protected, so proper primitives should be used.

    Signed-off-by: Zhang Yu
    Signed-off-by: Li RongQing
    Signed-off-by: David S. Miller

    Li RongQing
     
  • Eric Dumazet says:

    ====================
    tcp: cleanups for linux-5.1

    This small patch series cleanups few things, and add a small
    timewait optimization for hosts not using md5.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • tso_fragment() is only called for packets still in write queue.

    Remove the tcp_queue parameter to make this more obvious,
    even if the comment clearly states this.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • This might speedup tcp_twsk_destructor() a bit,
    avoiding a cache line miss.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • We prefer static_branch_unlikely() over static_key_false() these days.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • This helper is only used from tcp_add_write_queue_tail(), and does
    not make the code more readable.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • This helper is used only once, and its name is no longer relevant.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Comment in tdc_config.py recommends putting customizations in
    tdc_config_local.py file that wasn't included in gitignore. Add the local
    config file to gitignore.

    Signed-off-by: Vlad Buslov
    Signed-off-by: David S. Miller

    Vlad Buslov
     
  • Function walker_check_empty() incorrectly verifies that tp pointer is not
    NULL, instead of actual filter pointer. Fix conditional to check the right
    pointer. Adjust filter pointer naming accordingly to other cls API
    functions.

    Fixes: 6676d5e416ee ("net: sched: set dedicated tcf_walker flag when tp is empty")
    Signed-off-by: Vlad Buslov
    Reported-by: Cong Wang
    Signed-off-by: David S. Miller

    Vlad Buslov
     
  • Fix the incorrect reference link to RFC 8033

    Signed-off-by: Leslie Monis
    Signed-off-by: David S. Miller

    Leslie Monis
     
  • Fixes gcc '-Wunused-but-set-variable' warning:

    drivers/net/ethernet/mellanox/mlxsw/spectrum.c: In function 'mlxsw_sp_port_get_link_ksettings':
    drivers/net/ethernet/mellanox/mlxsw/spectrum.c:3062:5: warning:
    variable 'autoneg_status' set but not used [-Wunused-but-set-variable]

    It's not used since commit 475b33cb66c9 ("mlxsw: spectrum: Remove unsupported
    eth_proto_lp_advertise field in PTYS")

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

    YueHaibing
     
  • Roopa Prabhu says:

    ====================
    vxlan: create and changelink extack support

    This series adds extack support to changelink paths.
    In the process re-factors flag sets to a separate helper.
    Also adds some changelink testcases to rtnetlink.sh

    (This series was initially part of another series that
    tried to support changelink for more attributes.
    But after some feedback from sabrina, i have dropped the
    'support changelink for more attributes' part because some
    of them cannot be supported today or may require additional
    use-case handling code. These can be done separately
    as and when we see the need for it.)
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This patch extends rtnetlink.sh to cover some vxlan flag
    netlink attribute sets.

    Signed-off-by: Roopa Prabhu
    Signed-off-by: David S. Miller

    Roopa Prabhu
     
  • This patch adds extack coverage in vxlan link
    create and changelink paths. Introduces a new helper
    vxlan_nl2flags to consolidate flag attribute validation.

    thanks to Johannes Berg for some tips to construct the
    generic vxlan flag extack strings.

    Signed-off-by: Roopa Prabhu
    Reviewed-by: Petr Machata
    Signed-off-by: David S. Miller

    Roopa Prabhu
     
  • Jakub Kicinski says:

    ====================
    devlink: make ethtool compat reliable

    This is a follow up to the series which added device flash
    updates via devlink. I went with the approach of adding a
    new NDO in the end. It seems to end up looking cleaner.

    First patch removes the option to build devlink as a module.
    Users can still decide to not build it, but the module option
    ends up not being worth the maintenance cost.

    Next two patches add a NDO which can be used to ask the driver
    to return a devlink instance associated with a given netdev,
    instead of iterating over devlink ports. Drivers which implement
    this NDO must take into account the potential impact on the
    visibility of the devlink instance.

    With the new NDO in place we can remove NFP ethtool flash update
    code.

    Fifth patch makes sure we hold a reference to dev while
    callbacks are active.

    Last but not least the NULL-check of devlink->ops is moved
    to instance allocation time.

    Last but not least missing checks for devlink->ops are added.
    There is currently no driver registering devlink without ops,
    so can just fix this in -next.

    v2 (Michal): add netdev_to_devlink() in patch 3.
    v3 (Florian):
    - add missing checks for devlink->ops;
    - move locking/holding into devlink_compat_ functions.
    v4 (Jiri):
    - hold devlink_mutex around callbacks (patch 2);
    - require non-NULL ops (patch 6).
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Commit 76726ccb7f46 ("devlink: add flash update command") and
    commit 2d8dc5bbf4e7 ("devlink: Add support for reload")
    access devlink ops without NULL-checking. There is, however, no
    driver which would pass in NULL ops, so let's just make that
    a requirement. Remove the now unnecessary NULL-checking.

    Signed-off-by: Jakub Kicinski
    Reviewed-by: Florian Fainelli
    Acked-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jakub Kicinski
     
  • When ethtool is calling into devlink compat code make sure we have
    a reference on the netdevice on which the operation was invoked.

    v3: move the hold/lock logic into devlink_compat_* functions (Florian)

    Signed-off-by: Jakub Kicinski
    Reviewed-by: Florian Fainelli
    Acked-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jakub Kicinski
     
  • Now that devlink fallback will be called reliably, we can remove
    the ethtool flashing code.

    Signed-off-by: Jakub Kicinski
    Acked-by: Jiri Pirko
    Reviewed-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Jakub Kicinski
     
  • Support getting devlink instance from a new NDO.

    Signed-off-by: Jakub Kicinski
    Acked-by: Jiri Pirko
    Reviewed-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Jakub Kicinski
     
  • Instead of iterating over all devlink ports add a NDO which
    will return the devlink instance from the driver.

    v2: add the netdev_to_devlink() helper (Michal)
    v3: check that devlink has ops (Florian)
    v4: hold devlink_mutex (Jiri)

    Suggested-by: Jiri Pirko
    Signed-off-by: Jakub Kicinski
    Reviewed-by: Florian Fainelli
    Acked-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jakub Kicinski
     
  • Being able to build devlink as a module causes growing pains.
    First all drivers had to add a meta dependency to make sure
    they are not built in when devlink is built as a module. Now
    we are struggling to invoke ethtool compat code reliably.

    Make devlink code built-in, users can still not build it at
    all but the dynamically loadable module option is removed.

    Signed-off-by: Jakub Kicinski
    Reviewed-by: Florian Fainelli
    Acked-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jakub Kicinski
     
  • Now that all users of struct inet_frag_queue have been converted
    to use 'rb_fragments', remove the unused 'fragments' field.

    Build with `make allyesconfig` succeeded. ip_defrag selftest passed.

    Signed-off-by: Peter Oskolkov
    Acked-by: Stefan Schmidt
    Signed-off-by: David S. Miller

    Peter Oskolkov
     

26 Feb, 2019

7 commits