1. 20 12月, 2018 9 次提交
    • F
      net: convert bridge_nf to use skb extension infrastructure · de8bda1d
      Florian Westphal 提交于
      This converts the bridge netfilter (calling iptables hooks from bridge)
      facility to use the extension infrastructure.
      
      The bridge_nf specific hooks in skb clone and free paths are removed, they
      have been replaced by the skb_ext hooks that do the same as the bridge nf
      allocations hooks did.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      de8bda1d
    • F
      sk_buff: add skb extension infrastructure · df5042f4
      Florian Westphal 提交于
      This adds an optional extension infrastructure, with ispec (xfrm) and
      bridge netfilter as first users.
      objdiff shows no changes if kernel is built without xfrm and br_netfilter
      support.
      
      The third (planned future) user is Multipath TCP which is still
      out-of-tree.
      MPTCP needs to map logical mptcp sequence numbers to the tcp sequence
      numbers used by individual subflows.
      
      This DSS mapping is read/written from tcp option space on receive and
      written to tcp option space on transmitted tcp packets that are part of
      and MPTCP connection.
      
      Extending skb_shared_info or adding a private data field to skb fclones
      doesn't work for incoming skb, so a different DSS propagation method would
      be required for the receive side.
      
      mptcp has same requirements as secpath/bridge netfilter:
      
      1. extension memory is released when the sk_buff is free'd.
      2. data is shared after cloning an skb (clone inherits extension)
      3. adding extension to an skb will COW the extension buffer if needed.
      
      The "MPTCP upstreaming" effort adds SKB_EXT_MPTCP extension to store the
      mapping for tx and rx processing.
      
      Two new members are added to sk_buff:
      1. 'active_extensions' byte (filling a hole), telling which extensions
         are available for this skb.
         This has two purposes.
         a) avoids the need to initialize the pointer.
         b) allows to "delete" an extension by clearing its bit
         value in ->active_extensions.
      
         While it would be possible to store the active_extensions byte
         in the extension struct instead of sk_buff, there is one problem
         with this:
          When an extension has to be disabled, we can always clear the
          bit in skb->active_extensions.  But in case it would be stored in the
          extension buffer itself, we might have to COW it first, if
          we are dealing with a cloned skb.  On kmalloc failure we would
          be unable to turn an extension off.
      
      2. extension pointer, located at the end of the sk_buff.
         If the active_extensions byte is 0, the pointer is undefined,
         it is not initialized on skb allocation.
      
      This adds extra code to skb clone and free paths (to deal with
      refcount/free of extension area) but this replaces similar code that
      manages skb->nf_bridge and skb->sp structs in the followup patches of
      the series.
      
      It is possible to add support for extensions that are not preseved on
      clones/copies.
      
      To do this, it would be needed to define a bitmask of all extensions that
      need copy/cow semantics, and change __skb_ext_copy() to check
      ->active_extensions & SKB_EXT_PRESERVE_ON_CLONE, then just set
      ->active_extensions to 0 on the new clone.
      
      This isn't done here because all extensions that get added here
      need the copy/cow semantics.
      
      v2:
      Allocate entire extension space using kmem_cache.
      Upside is that this allows better tracking of used memory,
      downside is that we will allocate more space than strictly needed in
      most cases (its unlikely that all extensions are active/needed at same
      time for same skb).
      The allocated memory (except the small extension header) is not cleared,
      so no additonal overhead aside from memory usage.
      
      Avoid atomic_dec_and_test operation on skb_ext_put()
      by using similar trick as kfree_skbmem() does with fclone_ref:
      If recount is 1, there is no concurrent user and we can free right away.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      df5042f4
    • F
      netfilter: avoid using skb->nf_bridge directly · c4b0e771
      Florian Westphal 提交于
      This pointer is going to be removed soon, so use the existing helpers in
      more places to avoid noise when the removal happens.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c4b0e771
    • D
      Merge branch 'dpaa2-eth-add-QBMAN-statistics' · 8239d579
      David S. Miller 提交于
      Ioana Ciornei says:
      
      ====================
      dpaa2-eth: add QBMAN statistics
      
      This patch set adds ethtool statistics for pending frames/bytes
      in Rx/Tx conf FQs and number of buffers in pool.
      
      The first patch adds support for the query APIs in the DPIO driver
      while the latter actually exposes the statistics through ethtool.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8239d579
    • I
      dpaa2-eth: Add QBMAN related stats · 610febc6
      Ioana Radulescu 提交于
      Add statistics for pending frames in Rx/Tx conf FQs and
      number of buffers in pool. Available through ethtool -S.
      Signed-off-by: NIoana Radulescu <ruxandra.radulescu@nxp.com>
      Signed-off-by: NIoana ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      610febc6
    • R
      soc: fsl: dpio: Add BP and FQ query APIs · e80081c3
      Roy Pledge 提交于
      Add FQ (Frame Queue) and BP (Buffer Pool) query APIs that
      users of QBMan can invoke to see the status of the queues
      and pools that they are using.
      Signed-off-by: NRoy Pledge <roy.pledge@nxp.com>
      Signed-off-by: NIoana Radulescu <ruxandra.radulescu@nxp.com>
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e80081c3
    • R
      net: phy: mscc: Fix the VSC 8531/41 Chip Init sequence · 7b98f63e
      Raju Lakkaraju 提交于
      - Turn on Broadcast writes
      - UNH 1.8.1 clear bias for UNH 1000BT distortion
      - UNH 1.8.7 optimize pre-emphasis for 100BasTx UNH 100W fix
      - Enable Token-ring during 'Coma Mode'
      Signed-off-by: NRaju Lakkaraju <Raju.Lakkaraju@microchip.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7b98f63e
    • D
      Merge branch 'for-upstream' of... · 29d3c047
      David S. Miller 提交于
      Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
      
      Johan Hedberg says:
      
      ====================
      pull request: bluetooth-next 2018-12-19
      
      Here's the main bluetooth-next pull request for 4.21:
      
       - Multiple fixes & improvements for Broadcom-based controllers
       - New USB ID for an Intel controller
       - Support for new Broadcom controller variants
       - Use DEFINE_SHOW_ATTRIBUTE to simplify debugfs code
       - Eliminate confusing "last event is not cmd complete" warning message
       - Added vendor suspend/resume support for H:5 (3-Wire UART) controllers
       - Various other smaller improvements & fixes
      
      Please let me know if there are any issues pulling. Thanks.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      29d3c047
    • D
      Merge tag 'mac80211-next-for-davem-2018-12-19' of... · 5a862f86
      David S. Miller 提交于
      Merge tag 'mac80211-next-for-davem-2018-12-19' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
      
      Johannes Berg says:
      
      ====================
      This time we have too many changes to list, highlights:
       * virt_wifi - wireless control simulation on top of
         another network interface
       * hwsim configurability to test capabilities similar
         to real hardware
       * various mesh improvements
       * various radiotap vendor data fixes in mac80211
       * finally the nl_set_extack_cookie_u64() we talked
         about previously, used for
       * peer measurement APIs, right now only with FTM
         (flight time measurement) for location
       * made nl80211 radio/interface announcements more complete
       * various new HE (802.11ax) things:
         updates, TWT support, ...
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5a862f86
  2. 19 12月, 2018 31 次提交