1. 01 Aug, 2018 20 commits
    • David S. Miller's avatar
      Merge branch 'ipv4-Control-SKB-reprioritization-after-forwarding' · 53dd9652
      David S. Miller authored
      Petr Machata says:
      
      ====================
      ipv4: Control SKB reprioritization after forwarding
      
      After IPv4 packets are forwarded, the priority of the corresponding SKB
      is updated according to the TOS field of IPv4 header. This overrides any
      prioritization done earlier by e.g. an skbedit action or ingress-qos-map
      defined at a vlan device.
      
      Such overriding may not always be desirable. Even if the packet ends up
      being routed, which implies this is an L3 network node, an administrator
      may wish to preserve whatever prioritization was done earlier on in the
      pipeline.
      
      Therefore this patch set introduces a sysctl that controls this
      behavior, net.ipv4.ip_forward_update_priority. It's value is 1 by
      default to preserve the current behavior.
      
      All of the above is implemented in patch #1.
      
      Value changes prompt a new NETEVENT_IPV4_FWD_UPDATE_PRIORITY_UPDATE
      notification, so that the drivers can hook up whatever logic may depend
      on this value. That is implemented in patch #2.
      
      In patches #3 and #4, mlxsw is adapted to recognize the sysctl. On
      initialization, the RGCR register that handles router configuration is
      set in accordance with the sysctl. The new notification is listened to
      and RGCR is reconfigured as necessary.
      
      In patches #5 to #7, a selftest is added to verify that mlxsw reflects
      the sysctl value as necessary. The test is expressed in terms of the
      recently-introduced ieee_setapp support, and works by observing how DSCP
      value gets rewritten depending on packet priority. For this reason, the
      test is added to the subdirectory drivers/net/mlxsw. Even though it's
      not particularly specific to mlxsw, it's not suitable for running on
      soft devices (which don't support the ieee_setapp et.al.).
      
      Changes from v1 to v2:
      
      - In patch #1, init sysctl_ip_fwd_update_priority to 1 instead of true.
      
      Changes from RFC to v1:
      
      - Fix wrong sysctl name in ip-sysctl.txt
      - Add notifications
      - Add mlxsw support
      - Add self test
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      53dd9652
    • Petr Machata's avatar
      selftests: mlxsw: Add test for ip_forward_update_priority · 9bae0451
      Petr Machata authored
      Verify that with that sysctl turned off, DSCP prioritization and rewrite
      works the same way as in qos_dscp_bridge test. However when the sysctl
      is charged, there should be a reprioritization after routing stage,
      which will be observed by a different DSCP rewrite on egress.
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9bae0451
    • Petr Machata's avatar
      selftests: forwarding: Move DSCP capture to lib.sh · cf608698
      Petr Machata authored
      dscp_capture_install() and dscp_capture_uninstall() are going to be
      useful for a test added by a following patch, move them therefore to
      lib.sh together with related helpers.
      
      While doing so, change the rule preference from mere DSCP value to
      DSCP+100 in order to support adding captures of packets with DSCP of 0.
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cf608698
    • Petr Machata's avatar
      selftests: forwarding: Move lldpad waiting to lib.sh · 989133bf
      Petr Machata authored
      The function lldpad_wait() will be useful for a test added by a
      following patch. Likewise would the "sleep 5" with its extensive
      comment.
      
      Therefore move lldpad_wait() to lib.sh in order to allow reuse. Rename
      it to lldpad_app_wait_set() to recognize that what this is intended to
      wait on are the pending APP sets.
      
      For the sleeping, add a function lldpad_app_wait_del(). That will serve
      to hold the related explanatory comment (which edit for clarity), and as
      a token in the caller to identify the sites where this sort of waiting
      takes place. That will serve when/if a better way to handle this
      business is found.
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      989133bf
    • Petr Machata's avatar
      mlxsw: spectrum_router: Handle sysctl_ip_fwd_update_priority · 64953423
      Petr Machata authored
      This sysctl setting controls whether packet priority should be updated
      after forwarding. Configure RGCR.usp accordingly so that the device is
      in sync with the kernel handling.
      
      Note that RGCR doesn't allow changing arbitrary parameters
      mid-operation, however "usp" is exempt and can be reconfigured.
      
      Also react to NETEVENT_IPV4_FWD_UPDATE_PRIORITY_UPDATE notifications
      that signify change in this configuration.
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      64953423
    • Petr Machata's avatar
      mlxsw: spectrum: Extract work-scheduling into a new function · 1f65a33f
      Petr Machata authored
      The boilerplate to schedule NETEVENT_IPV4_MPATH_HASH_UPDATE and
      NETEVENT_IPV6_MPATH_HASH_UPDATE handling is almost equivalent to that of
      NETEVENT_IPV4_FWD_UPDATE_PRIORITY_UPDATE that's coming in the next
      patch. The only difference is which actual worker function should be
      called. Extract this boilerplate into a named function in order to allow
      reuse.
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1f65a33f
    • Petr Machata's avatar
      net: ipv4: Notify about changes to ip_forward_update_priority · d18c5d19
      Petr Machata authored
      Drivers may make offloading decision based on whether
      ip_forward_update_priority is enabled or not. Therefore distribute
      netevent notifications to give them a chance to react to a change.
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d18c5d19
    • Petr Machata's avatar
      net: ipv4: Control SKB reprioritization after forwarding · 432e05d3
      Petr Machata authored
      After IPv4 packets are forwarded, the priority of the corresponding SKB
      is updated according to the TOS field of IPv4 header. This overrides any
      prioritization done earlier by e.g. an skbedit action or ingress-qos-map
      defined at a vlan device.
      
      Such overriding may not always be desirable. Even if the packet ends up
      being routed, which implies this is an L3 network node, an administrator
      may wish to preserve whatever prioritization was done earlier on in the
      pipeline.
      
      Therefore introduce a sysctl that controls this behavior. Keep the
      default value at 1 to maintain backward-compatible behavior.
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      432e05d3
    • Vincent Bernat's avatar
      net: add helpers checking if socket can be bound to nonlocal address · 83ba4645
      Vincent Bernat authored
      The construction "net->ipv4.sysctl_ip_nonlocal_bind || inet->freebind
      || inet->transparent" is present three times and its IPv6 counterpart
      is also present three times. We introduce two small helpers to
      characterize these tests uniformly.
      Signed-off-by: default avatarVincent Bernat <vincent@bernat.im>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      83ba4645
    • Jon Mason's avatar
      net: change Exar/Neterion menu items to be alphabetical · d39db3b4
      Jon Mason authored
      Neterion was standalone for several years, then acquired by Exar and
      shutdown in 11 months without ever making any new Exar branded adapters.
      Users would probably think of them as Neterion and not Exar (as there
      have been no follow-on adapters and the vast majority ever sold were
      under the Neterion name).
      
      6c541b45 ("net: ethernet: Sort Kconfig sourcing alphabetically")
      sorted Kconfig sourcing based on directory names, but in a couple cases,
      the menu item text is quite different from the directory name and is not
      sorted correctly:
      
        drivers/net/ethernet/neterion/Kconfig    => "Exar devices"
      
      To address that and clear up any confusion about the name, "Exar" was
      changed to "Neterion (Exar)" and the relevant entries in the Makefile
      and Kconfig were reordered to match the alphabetical organization.
      Inspired-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d39db3b4
    • zhong jiang's avatar
      net/tls: Use kmemdup to simplify the code · 969d5090
      zhong jiang authored
      Kmemdup is better than kmalloc+memcpy. So replace them.
      Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      969d5090
    • Colin Ian King's avatar
      net/tipc: remove redundant variables 'tn' and 'oport' · b053fcc4
      Colin Ian King authored
      Variables 'tn' and 'oport'  are being assigned but are never used hence
      they are redundant and can be removed.
      
      Cleans up clang warnings:
      warning: variable 'oport' set but not used [-Wunused-but-set-variable]
      warning: variable 'tn' set but not used [-Wunused-but-set-variable]
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Acked-by: default avatarYing Xue <ying.xue@windriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b053fcc4
    • David S. Miller's avatar
      Merge branch 'be2net-next' · e5121207
      David S. Miller authored
      Suresh Reddy says:
      
      ====================
      be2net: patch-set
      
      v1->v2 : Modified the subject line and commit log.
      
      Please consider applying these two patches to net-next.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e5121207
    • Suresh Reddy's avatar
    • Suresh Reddy's avatar
      be2net: gather debug info and reset adapter (only for Lancer) on a tx-timeout · c1b3bdb2
      Suresh Reddy authored
      This patch handles a TX-timeout as follows:
      
      1) This patch gathers and prints the following info that can
         help in diagnosing the cause of a TX-timeout.
         a) TX queue and completion queue entries.
         b) SKB and TCP/UDP header details.
      
      2) For Lancer NICs (TX-timeout recovery is not supported for
         BE3/Skyhawk-R NICs), it recovers from the TX timeout as follows:
      
         a) On a TX-timeout, driver sets the PHYSDEV_CONTROL_FW_RESET_MASK
            bit in the PHYSDEV_CONTROL register. Lancer firmware goes into
            an error state and indicates this back to the driver via a bit
            in a doorbell register.
         b) Driver detects this and calls be_err_recover(). DMA is disabled,
            all pending TX skbs are unmapped and freed (be_close()). All rings
            are destroyed (be_clear()).
         c) The driver waits for the FW to re-initialize and re-creates all
            rings along with other data structs (be_resume())
      Signed-off-by: default avatarSuresh Reddy <suresh.reddy@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c1b3bdb2
    • Gustavo A. R. Silva's avatar
      net/mlx5e: Fix uninitialized variable · 96d39502
      Gustavo A. R. Silva authored
      There is a potential execution path in which variable *err* is returned
      without being properly initialized previously.
      
      Fix this by initializing variable *err* to 0.
      
      Addresses-Coverity-ID: 1472116 ("Uninitialized scalar variable")
      Fixes: 0ec13877 ("net/mlx5e: Gather all XDP pre-requisite checks in a single function")
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Reviewed-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Acked-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      96d39502
    • YueHaibing's avatar
      qed: Make some functions static · bf774d14
      YueHaibing authored
      Fixes the following sparse warning:
      
      drivers/net/ethernet/qlogic/qed/qed_cxt.c:1534:6: warning: symbol 'qed_cm_init_pf' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_dev.c:233:4: warning: symbol 'qed_init_qm_get_num_tcs' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_dev.c:238:5: warning: symbol 'qed_init_qm_get_num_vfs' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_dev.c:246:5: warning: symbol 'qed_init_qm_get_num_pf_rls' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_dev.c:264:5: warning: symbol 'qed_init_qm_get_num_vports' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_dev.c:276:5: warning: symbol 'qed_init_qm_get_num_pqs' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_mcp.c:573:5: warning: symbol 'qed_mcp_nvm_wr_cmd' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_mcp.c:3012:1: warning: symbol '__qed_mcp_resc_lock' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_dcbx.c:870:6: warning: symbol 'qed_dcbx_aen' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_debug.c:7841:5: warning: symbol 'qed_dbg_nvm_image_length' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_debug.c:7857:5: warning: symbol 'qed_dbg_nvm_image' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_sriov.c:675:6: warning: symbol '_qed_iov_pf_sanity_check' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_sriov.c:690:6: warning: symbol 'qed_iov_pf_sanity_check' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_sriov.c:3982:6: warning: symbol 'qed_iov_pf_get_pending_events' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_vf.c:172:5: warning: symbol '_qed_vf_pf_release' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_rdma.c:137:5: warning: symbol 'qed_rdma_get_sb_id' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_rdma.c:709:5: warning: symbol 'qed_rdma_stop' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_ll2.c:161:6: warning: symbol 'qed_ll2b_complete_rx_packet' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_roce.c:160:6: warning: symbol 'qed_roce_free_cid_pair' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_iwarp.c:380:12: warning: symbol 'iwarp_state_names' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_iwarp.c:946:1: warning: symbol 'qed_iwarp_parse_private_data' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_iwarp.c:971:1: warning: symbol 'qed_iwarp_mpa_reply_arrived' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_iwarp.c:2504:1: warning: symbol 'qed_iwarp_ll2_slowpath' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_iwarp.c:2806:6: warning: symbol 'qed_iwarp_qp_in_error' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_iwarp.c:2827:6: warning: symbol 'qed_iwarp_exception_received' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_iwarp.c:2958:1: warning: symbol 'qed_iwarp_connect_complete' was not declared. Should it be static?
      drivers/net/ethernet/qlogic/qed/qed_iscsi.c:876:6: warning: symbol 'qed_iscsi_free_connection' was not declared. Should it be static?
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Acked-by: default avatarDenis Bolotin <Denis.Bolotin@cavium.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bf774d14
    • Ka-Cheong Poon's avatar
      rds: Remove IPv6 dependency · e65d4d96
      Ka-Cheong Poon authored
      This patch removes the IPv6 dependency from RDS.
      Signed-off-by: default avatarKa-Cheong Poon <ka-cheong.poon@oracle.com>
      Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e65d4d96
    • Ka-Cheong Poon's avatar
      rds: rds_ib_recv_alloc_cache() should call alloc_percpu_gfp() instead · f394ad28
      Ka-Cheong Poon authored
      Currently, rds_ib_conn_alloc() calls rds_ib_recv_alloc_caches()
      without passing along the gfp_t flag.  But rds_ib_recv_alloc_caches()
      and rds_ib_recv_alloc_cache() should take a gfp_t parameter so that
      rds_ib_recv_alloc_cache() can call alloc_percpu_gfp() using the
      correct flag instead of calling alloc_percpu().
      Signed-off-by: default avatarKa-Cheong Poon <ka-cheong.poon@oracle.com>
      Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f394ad28
    • Ivan Khoronzhuk's avatar
      fea49f60
  2. 31 Jul, 2018 8 commits
  3. 30 Jul, 2018 12 commits
    • Yidong Ren's avatar
      hv_netvsc: Add per-cpu ethtool stats for netvsc · 6ae74671
      Yidong Ren authored
      This patch implements following ethtool stats fields for netvsc:
      cpu<n>_tx/rx_packets/bytes
      cpu<n>_vf_tx/rx_packets/bytes
      
      Corresponding per-cpu counters already exist in current code. Exposing
      these counters will help troubleshooting performance issues.
      
      for_each_present_cpu() was used instead of for_each_possible_cpu().
      for_each_possible_cpu() would create very long and useless output.
      It is still being used for internal buffer, but not for ethtool
      output.
      
      There could be an overflow if cpu was added between ethtool
      call netvsc_get_sset_count() and netvsc_get_ethtool_stats() and
      netvsc_get_strings(). (still safe if cpu was removed)
      ethtool makes these three function calls separately.
      As long as we use ethtool, I can't see any clean solution.
      
      Currently and in foreseeable short term, Hyper-V doesn't support
      cpu hot-plug. Plus, ethtool is for admin use. Unlikely the admin
      would perform such combo operations.
      
      Changes in v2:
        - Remove cpp style comment
        - Resubmit after freeze
      
      Changes in v3:
        - Reimplemented with kvmalloc instead of alloc_percpu
      
      Changes in v4:
        - Fixed inconsistent array size
        - Use kvmalloc_array instead of kvmalloc
      Signed-off-by: default avatarYidong Ren <yidren@microsoft.com>
      Reviewed-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6ae74671
    • David S. Miller's avatar
      Merge branch 'selftests-mirror-to-gretap-with-team' · 494f2e76
      David S. Miller authored
      Petr Machata says:
      
      ====================
      A test for mirror-to-gretap with team in UL packet path
      
      This patchset adds a test for "tc action mirred mirror" where the
      mirrored-to device is a gretap, and underlay path contains a team
      device.
      
      In patch #1 require_command() is added, which should henceforth be used
      to declare dependence on a certain tool.
      
      In patch #2, two new functions, team_create() and team_destroy(), are
      added to lib.sh.
      
      The newly-added test uses arping, which isn't necessarily available.
      Therefore patch #3 introduces $ARPING, and a preexisting test is fixed
      to require_command $ARPING.
      
      In patches #4 and #5, two new tests are added. In both cases, a team
      device is on egress path of a mirrored packet in a mirror-to-gretap
      scenario. In the first one, the team device is in loadbalance mode, in
      the second one it's in lacp mode. (The difference in modes necessitates
      a different testing strategy, hence two test cases instead of just
      parameterizing one.)
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      494f2e76
    • Petr Machata's avatar
      selftests: forwarding: Test mirror-to-gretap w/ UL team LACP · 541c6ce3
      Petr Machata authored
      This tests mirror-to-gretap when an underlay packet path includes a team
      device which is not in loadbalance mode, but in LACP mode. The test
      manipulates LAG membership to achieve changes in txability, thus making
      sure that a driver that offloads mirror-to-gretap doesn't just consider
      upness of a device.
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      541c6ce3
    • Petr Machata's avatar
      selftests: forwarding: Test mirror-to-gretap w/ UL team · a9b33b20
      Petr Machata authored
      Test for "tc action mirred egress mirror" that mirrors to gretap when
      the underlay route points at a VLAN-aware bridge (802.1q), and the
      traffic egresses the bridge through a team device. Test upping and
      downing individual team device slaves and verify the traffic flows as
      expected.
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a9b33b20
    • Petr Machata's avatar
      selftests: forwarding: Introduce $ARPING · ca70a562
      Petr Machata authored
      Instead of relying on "arping" being installed everywhere under that
      name, introduce a variable $ARPING like the other tools do.
      
      Convert an existing test, mirror_gre_vlan_bridge_1q.sh to
      require_command $ARPING and then invoke arping through the variable.
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ca70a562
    • Petr Machata's avatar
      selftests: forwarding: lib: Support team devices · 9d9e6bde
      Petr Machata authored
      Add team_create() and team_destroy() to manage team netdevices.
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9d9e6bde
    • Petr Machata's avatar
      selftests: forwarding: lib: Add require_command() · e094574f
      Petr Machata authored
      The logic for testing whether a certain command is available is used
      several times in the current code base. The tests in follow-up patches
      add more requirements like that.
      
      Therefore extract the logic into a named function, require_command(),
      that can be used directly from lib.sh as well as from any test that
      wishes to declare dependence on some command.
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e094574f
    • YueHaibing's avatar
      fib_rules: NULL check before kfree is not needed · 778c4d5c
      YueHaibing authored
      kfree(NULL) is safe,so this removes NULL check before freeing the mem
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      778c4d5c
    • Quentin Schulz's avatar
      net: phy: mscc: the extended page access register is 16 bits · 86ff7362
      Quentin Schulz authored
      The Extended Page Access is a 16-bit register, so change the page
      parameter of vsc85xx_phy_page_set to a u16.
      Signed-off-by: default avatarQuentin Schulz <quentin.schulz@bootlin.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      86ff7362
    • Vakul Garg's avatar
      net/tls: Use socket data_ready callback on record availability · ad13acce
      Vakul Garg authored
      On receipt of a complete tls record, use socket's saved data_ready
      callback instead of state_change callback. In function tls_queue(),
      the TLS record is queued in encrypted state. But the decryption
      happen inline when tls_sw_recvmsg() or tls_sw_splice_read() get invoked.
      So it should be ok to notify the waiting context about the availability
      of data as soon as we could collect a full TLS record. For new data
      availability notification, sk_data_ready callback is more appropriate.
      It points to sock_def_readable() which wakes up specifically for EPOLLIN
      event. This is in contrast to the socket callback sk_state_change which
      points to sock_def_wakeup() which issues a wakeup unconditionally
      (without event mask).
      Signed-off-by: default avatarVakul Garg <vakul.garg@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ad13acce
    • David S. Miller's avatar
      Merge branch 'TC-refactor-act_mirred-packets-re-injection' · 8f3f6500
      David S. Miller authored
      Paolo Abeni says:
      
      ====================
      TC: refactor act_mirred packets re-injection
      
      This series is aimed at improving the act_mirred redirect performances.
      Such action is used by OVS to represent TC S/W flows, and it's current largest
      bottle-neck is the need for a skb_clone() for each packet.
      
      The first 2 patches introduce some cleanup and safeguards to allow extending
      tca_result - we will use it to store RCU protected redirect information - and
      introduce a clear separation between user-space accessible tcfa_action
      values and internal values accessible only by the kernel.
      Then a new tcfa_action value is introduced: TC_ACT_REINJECT, similar to
      TC_ACT_REDIRECT, but preserving the mirred semantic. Such value is not
      accessible from user-space.
      The last patch exploits the newly introduced infrastructure in the act_mirred
      action, to avoid a skb_clone, when possible.
      
      Overall this the above gives a ~10% performance improvement in forwarding tput,
      when using the TC S/W datapath.
      
      v1 -> v2:
       - preserve the rcu lock in act_bpf
       - add and use a new action value to reinject the packets, preserving the mirred
         semantic
      
      v2 -> v3:
       - renamed to new action as TC_ACT_REINJECT
       - TC_ACT_REINJECT is not exposed to user-space
      
      v3 -> v4:
       - dropped the TC_ACT_REDIRECT patch
       - report failure via extack, too
       - rename the new action as TC_ACT_REINSERT
       - skip clone only if the control action don't touch tcf_result
      
      v4 -> v5:
       - fix a couple of build issue reported by kbuild bot
       - dont split messages
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8f3f6500
    • Paolo Abeni's avatar
      act_mirred: use TC_ACT_REINSERT when possible · e5cf1baf
      Paolo Abeni authored
      When mirred is invoked from the ingress path, and it wants to redirect
      the processed packet, it can now use the TC_ACT_REINSERT action,
      filling the tcf_result accordingly, and avoiding a per packet
      skb_clone().
      
      Overall this gives a ~10% improvement in forwarding performance for the
      TC S/W data path and TC S/W performances are now comparable to the
      kernel openvswitch datapath.
      
      v1 -> v2: use ACT_MIRRED instead of ACT_REDIRECT
      v2 -> v3: updated after action rename, fixed typo into the commit
      	message
      v3 -> v4: updated again after action rename, added more comments to
      	the code (JiriP), skip the optimization if the control action
      	need to touch the tcf_result (Paolo)
      v4 -> v5: fix sparse warning (kbuild bot)
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e5cf1baf