1. 28 Aug, 2017 31 commits
  2. 26 Aug, 2017 9 commits
    • Antoine Ténart's avatar
      net: mvpp2: fix the packet size configuration for 10G · ec15ecde
      Antoine Ténart authored
      The MVPP22_XLG_CTRL1_FRAMESIZELIMIT define is used as an offset, but is
      defined as BIT(0). Updated its name to contains "OFFS" as in offset and
      fix its value using the offset value, 0.
      Reported-by: default avatarStefan Chulski <stefanc@marvell.com>
      Signed-off-by: default avatarAntoine Tenart <antoine.tenart@free-electrons.com>
      Fixes: 76eb1b1d ("net: mvpp2: set maximum packet size for 10G ports")
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ec15ecde
    • David S. Miller's avatar
      Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · 49107fcb
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      40GbE Intel Wired LAN Driver Updates 2017-08-25
      
      This series contains updates to i40e and i40evf only.
      
      Mitch adjusts the max packet size to account for two VLAN tags.
      
      Sudheer provides a fix to ensure that the watchdog timer is scheduled
      immediately after admin queue operations are scheduled in i40evf_down().
      Fixes an issue by adding locking around the admin queue command and
      update of state variables so that adminq_subtask will have the accurate
      information whenever it gets scheduled.
      
      Anjali fixes a bug where the PF flag setup should happen before the VMDq
      RSS queue count is initialized for VMDq VSI to get the right number of
      queues for RSS in the case of x722 devices.  Fixed a problem with the
      hardware ATR eviction feature where the NVM setting was incorrect.
      
      Jake separates the flags into two types, hw_features and flags.  The
      hw_features flags contain a set of features which are enabled at init
      time and will not contain feature flags that can be toggled.  Everything
      else will remain in the flags variable, and can be modified anytime
      during run time.  We should not be directly copying a cpumask_t, since
      it is bitmap and might not be copied correctly, so use cpumask_copy()
      instead.
      
      Stefan Assmann makes vf _offload_flags more "generic" by renaming it to
      vf_cap_flags, which allows other capabilities besides offloading to be
      added.
      
      Alan makes it such that if adaptive-rx/tx is enabled, the user cannot
      make any manual adjustments to interrupt moderation.  Also makes it so
      that if ITR is disabled by adaptive-rx/tx is then enabled, ITR will be
      re-enabled.
      
      v2: Dropped patches #1 & #8 from the original patch series submission,
          while Jesse and Jake re-work their patches based on feedback from
          David Miller.  Also removed the duplicate patch 3 that was
          accidentally sent out twice in the previous submission.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      49107fcb
    • David S. Miller's avatar
      Merge branch 'nfp-SR-IOV-ndos-support' · fac0cef9
      David S. Miller authored
      Jakub Kicinski says:
      
      ====================
      nfp: SR-IOV ndos support
      
      This set adds basic SR-IOV including setting/getting VF MAC addresses,
      VLANs, link state and spoofcheck settings.  It is wired up for both
      vNICs and representors (note: ip link will not report VF settings on
      VF/PF representors because they are not linked to the PF PCI device).
      
      Pablo and team add the basic implementation, Simon and Dirk follow
      up with the representor plumbing.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fac0cef9
    • Simon Horman's avatar
      nfp: add basic SR-IOV ndo functions to representors · 6abd224b
      Simon Horman authored
      Add basic ndo_set/get_vf to support SR-IOV on all types
      of port representors.
      Signed-off-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarDirk van der Merwe <dirk.vandermerwe@netronome.com>
      Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6abd224b
    • Pablo Cascón's avatar
      nfp: add basic SR-IOV ndo functions · 25528d90
      Pablo Cascón authored
      Add basic ndo_set/get_vf to support SR-IOV.
      
      VF to egress phy static mapping by now.
      
      Use vfcfg ABI version 2 to write the info to the FW and collect
      the return value from the mailbox.
      Signed-off-by: default avatarPablo Cascón <pablo.cascon@netronome.com>
      Signed-off-by: default avatarJimmy Kizito <jimmy.kizito@netronome.com>
      Signed-off-by: default avatarRami Tomer <rami.tomer@netronome.com>
      Signed-off-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      25528d90
    • Eric Dumazet's avatar
      tcp: fix hang in tcp_sendpage_locked() · bd9dfc54
      Eric Dumazet authored
      syszkaller got a hang in tcp stack, related to a bug in
      tcp_sendpage_locked()
      
      root@syzkaller:~# cat /proc/3059/stack
      [<ffffffff83de926c>] __lock_sock+0x1dc/0x2f0
      [<ffffffff83de9473>] lock_sock_nested+0xf3/0x110
      [<ffffffff8408ce01>] tcp_sendmsg+0x21/0x50
      [<ffffffff84163b6f>] inet_sendmsg+0x11f/0x5e0
      [<ffffffff83dd8eea>] sock_sendmsg+0xca/0x110
      [<ffffffff83dd9547>] kernel_sendmsg+0x47/0x60
      [<ffffffff83de35dc>] sock_no_sendpage+0x1cc/0x280
      [<ffffffff8408916b>] tcp_sendpage_locked+0x10b/0x160
      [<ffffffff84089203>] tcp_sendpage+0x43/0x60
      [<ffffffff841641da>] inet_sendpage+0x1aa/0x660
      [<ffffffff83dd4fcd>] kernel_sendpage+0x8d/0xe0
      [<ffffffff83dd50ac>] sock_sendpage+0x8c/0xc0
      [<ffffffff81b63300>] pipe_to_sendpage+0x290/0x3b0
      [<ffffffff81b67243>] __splice_from_pipe+0x343/0x750
      [<ffffffff81b6a459>] splice_from_pipe+0x1e9/0x330
      [<ffffffff81b6a5e0>] generic_splice_sendpage+0x40/0x50
      [<ffffffff81b6b1d7>] SyS_splice+0x7b7/0x1610
      [<ffffffff84d77a01>] entry_SYSCALL_64_fastpath+0x1f/0xbe
      
      Fixes: 306b13eb ("proto_ops: Add locked held versions of sendmsg and sendpage")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Cc: Tom Herbert <tom@quantonium.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bd9dfc54
    • David S. Miller's avatar
      Merge branch 'net_sched-clean-up-tc-classes-and-u32-filter' · 86df4d2e
      David S. Miller authored
      Cong Wang says:
      
      ====================
      net_sched: clean up tc classes and u32 filter
      
      Patch 1 and patch 2 prepare for patch 3. Major changes
      are in patch 3 and patch 4, details are there too.
      
      v2: Add patch 1 and 2, group all into a patchset
          Fix a coding style issue in patch 4
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      86df4d2e
    • WANG Cong's avatar
      net_sched: kill u32_node pointer in Qdisc · 3cd904ec
      WANG Cong authored
      It is ugly to hide a u32-filter-specific pointer inside Qdisc,
      this breaks the TC layers:
      
      1. Qdisc is a generic representation, should not have any specific
         data of any type
      
      2. Qdisc layer is above filter layer, should only save filters in
         the list of struct tcf_proto.
      
      This pointer is used as the head of the chain of u32 hash tables,
      that is struct tc_u_hnode, because u32 filter is very special,
      it allows to create multiple hash tables within one qdisc and
      across multiple u32 filters.
      
      Instead of using this ugly pointer, we can just save it in a global
      hash table key'ed by (dev ifindex, qdisc handle), therefore we can
      still treat it as a per qdisc basis data structure conceptually.
      
      Of course, because of network namespaces, this key is not unique
      at all, but it is fine as we already have a pointer to Qdisc in
      struct tc_u_common, we can just compare the pointers when collision.
      
      And this only affects slow paths, has no impact to fast path,
      thanks to the pointer ->tp_c.
      
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Cc: Jiri Pirko <jiri@resnulli.us>
      Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3cd904ec
    • WANG Cong's avatar
      net_sched: remove tc class reference counting · 143976ce
      WANG Cong authored
      For TC classes, their ->get() and ->put() are always paired, and the
      reference counting is completely useless, because:
      
      1) For class modification and dumping paths, we already hold RTNL lock,
         so all of these ->get(),->change(),->put() are atomic.
      
      2) For filter bindiing/unbinding, we use other reference counter than
         this one, and they should have RTNL lock too.
      
      3) For ->qlen_notify(), it is special because it is called on ->enqueue()
         path, but we already hold qdisc tree lock there, and we hold this
         tree lock when graft or delete the class too, so it should not be gone
         or changed until we release the tree lock.
      
      Therefore, this patch removes ->get() and ->put(), but:
      
      1) Adds a new ->find() to find the pointer to a class by classid, no
         refcnt.
      
      2) Move the original class destroy upon the last refcnt into ->delete(),
         right after releasing tree lock. This is fine because the class is
         already removed from hash when holding the lock.
      
      For those who also use ->put() as ->unbind(), just rename them to reflect
      this change.
      
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      143976ce