1. 11 11月, 2017 29 次提交
  2. 10 11月, 2017 11 次提交
    • G
      net: fix incorrect comment with regard to VLAN packet handling · 54985120
      Girish Moodalbail 提交于
      The commit bcc6d479 ("net: vlan: make non-hw-accel rx path similar
      to hw-accel") unified accel and non-accel path for VLAN RX. With that
      fix we do not register any packet_type handler for VLANs anymore, so fix
      the incorrect comment.
      Signed-off-by: NGirish Moodalbail <girish.moodalbail@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      54985120
    • D
      Merge branch 'act_vlan-rcu' · b79c069a
      David S. Miller 提交于
      Manish Kurup says:
      
      ====================
      net_sched actions: act_vlan now uses RCU
      
      This commit consists of 3 patches:
      
      patch1 (1/3):
      The VLAN action maintains one set of stats across all cores, and uses a
      spinlock to synchronize updates to it from the same. Changed this to use a
      per-CPU stats context instead.
      This change will result in better performance.
      
      patch2 (2/3):
      Modified netronome nfp flower action to use VLAN helper functions instead
      of accessing/referencing TC act_vlan private structures directly.
      
      patch3 (3/3):
      Using a spinlock in the VLAN action causes performance issues when the VLAN
      action is used on multiple cores. Rewrote the VLAN action to use RCU read
      locking for reads and updates instead.
      All functions now use an RCU dereferenced pointer to access the VLAN action
      context. Modified helper functions used by other modules, to use the RCU as
      opposed to directly accessing the structure.
      
      As part of this review, there were some changes suggested by reviewers.
      I have incorporated all the changes that were requested.
      
      Here're the changes:
      v2: Fixed all helper functions to use RCU (rtnl_dereference) - Eric, Jamal
      v2: Fixed indentation, extra line nits - Jamal, Jiri
      v2: Moved rcu_head to the end of the struct - Jiri
      v2: Re-formatted locals to reverse-christmas-tree - Jiri
      v2: Removed mismatched spin_lock() - Cong
      v2: Removed spin_lock_bh() in tcf_vlan_init, rtnl_dereference() should
          suffice - Cong, Jiri
      v4: Modified the nfp flower action code to use the VLAN helper functions
          instead of referencing the structure directly. Isolated this into a
          separate patch - Pieter Jansen
      v5: Got rid of the unlikely() for the allocation case - Simon Horman
      v6: Had forgotten cleanup functions for RCU alloc, added them - Dave Miller
      v7: Re-formatted more locals to reverse-christmas-tree - Pieter V
      v8: Reverted reverse-christmas-tree(v7), not required when dependencies
          make it difficult to implement - Alexander D
      v9: Cover letter subject change - Jamal
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b79c069a
    • M
      act_vlan: VLAN action rewrite to use RCU lock/unlock and update · 4c5b9d96
      Manish Kurup 提交于
      Using a spinlock in the VLAN action causes performance issues when the VLAN
      action is used on multiple cores. Rewrote the VLAN action to use RCU read
      locking for reads and updates instead.
      All functions now use an RCU dereferenced pointer to access the VLAN action
      context. Modified helper functions used by other modules, to use the RCU as
      opposed to directly accessing the structure.
      Acked-by: NJamal Hadi Salim <jhs@mojatatu.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NManish Kurup <manish.kurup@verizon.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4c5b9d96
    • M
      nfp flower action: Modified to use VLAN helper functions · bf068bdd
      Manish Kurup 提交于
      Modified netronome nfp flower action to use VLAN helper functions instead
      of accessing/referencing TC act_vlan private structures directly.
      Reviewed-by: NPieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
      Signed-off-by: NManish Kurup <manish.kurup@verizon.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bf068bdd
    • M
      act_vlan: Change stats update to use per-core stats · e0496cbb
      Manish Kurup 提交于
      The VLAN action maintains one set of stats across all cores, and uses a
      spinlock to synchronize updates to it from the same. Changed this to use a
      per-CPU stats context instead.
      This change will result in better performance.
      Acked-by: NJamal Hadi Salim <jhs@mojatatu.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NManish Kurup <manish.kurup@verizon.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e0496cbb
    • R
      sfc: don't warn on successful change of MAC · cbad52e9
      Robert Stonehouse 提交于
      Fixes: 535a6177 ("sfc: suppress handled MCDI failures when changing the MAC address")
      Signed-off-by: NBert Kenward <bkenward@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cbad52e9
    • C
      net: vxge: remove redundant assignments and pointers · e4effc09
      Colin Ian King 提交于
      There are several pointers that are being assigned but never read
      so remove these as they are redundant.  Also remove an assignment
      to function_mode that is never read. Cleans up several clang
      warnings:
      
      vxge-main.c:1139:2: warning: Value stored to 'hldev' is never read
      vxge-main.c:1294:2: warning: Value stored to 'hldev' is never read
      vxge-main.c:2188:2: warning: Value stored to 'dev' is never read
      vxge-main.c:2188:2: warning: Value stored to 'dev' is never read
      vxge-main.c:2723:2: warning: Value stored to 'function_mode' is
      never read
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e4effc09
    • D
      Merge branch 'ip_gre-flags-update' · be61a484
      David S. Miller 提交于
      Xin Long says:
      
      ====================
      ip_gre: add support for i/o_flags update
      
      ip_gre is using as many ip_tunnel apis as possible, newlink works
      fine as gre would do it's own part in .ndo_init. But when changing
      link, ip_tunnel_changelink doesn't even update i/o_flags, and also
      the update of these flags would cause some other gre's properties
      need to be updated or recalculated.
      
      These two patch are to add i/o_flags update and then do adjustment
      on some gre's properties according to the new i/o_flags.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      be61a484
    • X
      ip_gre: add the support for i/o_flags update via ioctl · a0efab67
      Xin Long 提交于
      As patch 'ip_gre: add the support for i/o_flags update via netlink'
      did for netlink, we also need to do the same job for these update
      via ioctl.
      
      This patch is to update i/o_flags and call ipgre_link_update to
      recalculate these gre properties after ip_tunnel_ioctl does the
      common update.
      Signed-off-by: NXin Long <lucien.xin@gmail.com>
      Acked-by: NWilliam Tu <u9012063@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a0efab67
    • X
      ip_gre: add the support for i/o_flags update via netlink · dd9d598c
      Xin Long 提交于
      Now ip_gre is using ip_tunnel_changelink to update it's properties, but
      ip_tunnel_changelink in ip_tunnel doesn't update i/o_flags as a common
      function.
      
      o_flags updates would cause that tunnel->tun_hlen / hlen and dev->mtu /
      needed_headroom need to be recalculated, and dev->(hw_)features need to
      be updated as well.
      
      Therefore, we can't just add the update into ip_tunnel_update called
      in ip_tunnel_changelink, and it's also better not to touch ip_tunnel
      codes.
      
      This patch updates i/o_flags and calls ipgre_link_update to recalculate
      these gre properties after ip_tunnel_changelink does the common update.
      
      Note that since ipgre_link_update doesn't know the lower dev, it will
      update gre->hlen, dev->mtu and dev->needed_headroom with the value of
      'new tun_hlen - old tun_hlen'. In this way, we can avoid many redundant
      codes, unlike ip6_gre.
      Reported-by: NJianlin Shi <jishi@redhat.com>
      Signed-off-by: NXin Long <lucien.xin@gmail.com>
      Acked-by: NWilliam Tu <u9012063@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dd9d598c
    • D
      Merge branch 'tcp-ns-rmem-wmem' · c7947e43
      David S. Miller 提交于
      Eric Dumazet says:
      
      ====================
      net: Namespace-ify sysctl_tcp_rmem and sysctl_tcp_wmem
      
      We need to get per netns sysctl for sysctl_[proto]_rmem and sysctl_[proto]_wmem
      
      This patch series adds the basic infrastructure allowing per proto
      conversion, and takes care of TCP.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c7947e43