1. 19 Dec, 2018 20 commits
    • Florian Westphal's avatar
      sk_buff: add skb extension infrastructure · df5042f4
      Florian Westphal authored
      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: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      df5042f4
    • Florian Westphal's avatar
      netfilter: avoid using skb->nf_bridge directly · c4b0e771
      Florian Westphal authored
      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: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c4b0e771
    • David S. Miller's avatar
      Merge branch 'dpaa2-eth-add-QBMAN-statistics' · 8239d579
      David S. Miller authored
      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: default avatarDavid S. Miller <davem@davemloft.net>
      8239d579
    • Ioana Radulescu's avatar
      dpaa2-eth: Add QBMAN related stats · 610febc6
      Ioana Radulescu authored
      Add statistics for pending frames in Rx/Tx conf FQs and
      number of buffers in pool. Available through ethtool -S.
      Signed-off-by: default avatarIoana Radulescu <ruxandra.radulescu@nxp.com>
      Signed-off-by: default avatarIoana ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      610febc6
    • Roy Pledge's avatar
      soc: fsl: dpio: Add BP and FQ query APIs · e80081c3
      Roy Pledge authored
      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: default avatarRoy Pledge <roy.pledge@nxp.com>
      Signed-off-by: default avatarIoana Radulescu <ruxandra.radulescu@nxp.com>
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e80081c3
    • Raju Lakkaraju's avatar
      net: phy: mscc: Fix the VSC 8531/41 Chip Init sequence · 7b98f63e
      Raju Lakkaraju authored
      - 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: default avatarRaju Lakkaraju <Raju.Lakkaraju@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7b98f63e
    • David S. Miller's avatar
      Merge branch 'for-upstream' of... · 29d3c047
      David S. Miller authored
      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: default avatarDavid S. Miller <davem@davemloft.net>
      29d3c047
    • David S. Miller's avatar
      Merge tag 'mac80211-next-for-davem-2018-12-19' of... · 5a862f86
      David S. Miller authored
      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: default avatarDavid S. Miller <davem@davemloft.net>
      5a862f86
    • Johan Hedberg's avatar
      Bluetooth: Fix unnecessary error message for HCI request completion · 1629db9c
      Johan Hedberg authored
      In case a command which completes in Command Status was sent using the
      hci_cmd_send-family of APIs there would be a misleading error in the
      hci_get_cmd_complete function, since the code would be trying to fetch
      the Command Complete parameters when there are none.
      
      Avoid the misleading error and silently bail out from the function in
      case the received event is a command status.
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      Acked-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      1629db9c
    • Jonathan Bakker's avatar
      Bluetooth: hci_bcm: Handle specific unknown packets after firmware loading · 22bba805
      Jonathan Bakker authored
      The Broadcom controller on aries S5PV210 boards sends out a couple of
      unknown packets after the firmware is loaded.  This will cause
      logging of errors such as:
      	Bluetooth: hci0: Frame reassembly failed (-84)
      
      This is probably also the case with other boards, as there are related
      Android userspace patches for custom ROMs such as
      https://review.lineageos.org/#/c/LineageOS/android_system_bt/+/142721/
      Since this appears to be intended behaviour, treated them as diagnostic
      packets.
      
      Note that this is another variant of commit 01d5e44a
      ("Bluetooth: hci_bcm: Handle empty packet after firmware loading")
      Signed-off-by: default avatarJonathan Bakker <xc-racer2@live.ca>
      Signed-off-by: default avatarPaweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      22bba805
    • Paweł Chmiel's avatar
      Bluetooth: btbcm: Add entry for BCM4329B1 UART bluetooth · e3ca60d0
      Paweł Chmiel authored
      This patch adds the device ID for the BCM 4329 combo module used
      in the Samsung Aries based phones (Galaxy S and it's variants).
      
      ```
      [   11.508980] Bluetooth: hci0: BCM: chip id 41
      [   11.518975] Bluetooth: hci0: BCM: features 0x04
      [   11.550132] Bluetooth: hci0: BCM4329B1
      [   11.557046] Bluetooth: hci0: BCM4329B1 (002.002.023) build 0000
      [   13.737071] Bluetooth: hci0: BCM4329B1 (002.002.023) build 0744
      ```
      
      Output from hciconfig
      
      ```
      hci0:   Type: Primary  Bus: UART
              BD Address: 43:29:B1:55:00:00  ACL MTU: 1021:6  SCO MTU: 64:1
              UP RUNNING
              RX bytes:1675 acl:0 sco:0 events:145 errors:0
              TX bytes:20426 acl:0 sco:0 commands:146 errors:0
              Features: 0xbf 0xfe 0x8f 0xfe 0x9b 0xff 0x79 0x83
              Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
              Link policy: RSWITCH SNIFF
              Link mode: SLAVE ACCEPT
              Name: 'aries'
              Class: 0x000000
              Service Classes: Unspecified
              Device Class: Miscellaneous,
              HCI Version: 2.1 (0x4)  Revision: 0x2e8
              LMP Version: 2.1 (0x4)  Subversion: 0x4217
              Manufacturer: Broadcom Corporation (15)
      ```
      Signed-off-by: default avatarPaweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      e3ca60d0
    • Ilan Peer's avatar
      mac80211: Properly access radiotap vendor data · d359bbce
      Ilan Peer authored
      The radiotap vendor data might be placed after some other
      radiotap elements, and thus when accessing it, need to access
      the correct offset in the skb data. Fix the code accordingly.
      Signed-off-by: default avatarIlan Peer <ilan.peer@intel.com>
      Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      d359bbce
    • Johannes Berg's avatar
      cfg80211: fix ieee80211_get_vht_max_nss() · 93bc8ac4
      Johannes Berg authored
      Fix two bugs in ieee80211_get_vht_max_nss():
       * the spec says we should round down
         (reported by Nissim)
       * there's a double condition, the first one is wrong,
         supp_width == 0 / ext_nss_bw == 2 is valid in 80+80
         (found by smatch)
      
      Fixes: b0aa75f0 ("ieee80211: add new VHT capability fields/parsing")
      Reported-by: default avatarNissim Bendanan <nissimx.bendanan@intel.com>
      Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      93bc8ac4
    • Johannes Berg's avatar
      mac80211: fix radiotap vendor presence bitmap handling · efc38dd7
      Johannes Berg authored
      Due to the alignment handling, it actually matters where in the code
      we add the 4 bytes for the presence bitmap to the length; the first
      field is the timestamp with 8 byte alignment so we need to add the
      space for the extra vendor namespace presence bitmap *before* we do
      any alignment for the fields.
      
      Move the presence bitmap length accounting to the right place to fix
      the alignment for the data properly.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      efc38dd7
    • Raghuram Hegde's avatar
      Bluetooth: btusb: Add support for Intel bluetooth device 8087:0029 · 2da711bc
      Raghuram Hegde authored
      Include the new USB product ID for Intel Bluetooth device 22260
      family(CcPeak)
      
      The /sys/kernel/debug/usb/devices portion for this device is:
      
      T:  Bus=01 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#=  2 Spd=12   MxCh= 0
      D:  Ver= 2.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=8087 ProdID=0029 Rev= 0.01
      C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=1ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      I:  If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  63 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  63 Ivl=1ms
      Signed-off-by: default avatarRaghuram Hegde <raghuram.hegde@intel.com>
      Signed-off-by: default avatarChethan T N <chethan.tumkur.narayan@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      2da711bc
    • Heiner Kallweit's avatar
      net: ethernet: don't set phylib state CHANGELINK in drivers · 33f18c96
      Heiner Kallweit authored
      After phy_start() phylib takes care of all needed actions, including
      aneg settings and checking link state. There's no need to set state
      PHY_CHANGELINK in drivers.
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      33f18c96
    • Alexandre Belloni's avatar
      MAINTAINERS: Add a maintainer for Microsemi switches · 624b66f8
      Alexandre Belloni authored
      Microsemi has been bought by Microchip and Microchip is supporting those
      switches.
      Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
      Acked-by: default avatarWoojung Huh <Woojung.Huh@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      624b66f8
    • Zhenbo Gao's avatar
      tipc: handle broadcast NAME_DISTRIBUTOR packet when receiving it · 5679ee78
      Zhenbo Gao authored
      NAME_DISTRIBUTOR messages are transmitted through unicast link on TIPC
      2.0, by contrast, the messages are delivered through broadcast link on
      TIPC 1.7. But at present, NAME_DISTRIBUTOR messages received by
      broadcast link cannot be handled in tipc_rcv() until an unicast message
      arrives, which may lead to a significant delay to update name table.
      
      To avoid this delay, we will also deal with broadcast NAME_DISTRIBUTOR
      message on broadcast receive path.
      Signed-off-by: default avatarZhenbo Gao <zhenbo.gao@windriver.com>
      Reviewed-by: default avatarYing Xue <ying.xue@windriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5679ee78
    • Heiner Kallweit's avatar
      net: phy: remove unused code in phy_probe · 935b8a59
      Heiner Kallweit authored
      3c1bcc86 ("net: ethernet: Convert phydev advertize and supported
      from u32 to link mode") left some unused code in phy_probe(), remove it.
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      935b8a59
    • David S. Miller's avatar
      Merge tag 'mlx5-uplink-rep-2018-12-15' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · 6c86bc23
      David S. Miller authored
      Saeed Mahameed:
      
      ====================
      mlx5-uplink-rep-2018-12-15
      
      Or Gerlitz says:
      
      This series is essentially a cleanup to align with the rest of the NIC
      switchdev drivers and make us
      more robust and clear/n: currently the PF netdev serves as the mlx5
      e-switch uplink netdev
      representor when going into switchdev mode and back as plain NIC
      netdev when going out.
      This causes some irregularities and misc troubles.
      
      Move to use dedicated uplink rep, as we have for the VF vports.
      
      The uplink rep netdev does has sysfs link and supports the sriov vf
      mac ndo, these two are in
      use by libvirt and other orchestrators, It also has richer ethtool
      support to allow controlling the
      port link & mtu along with supporting dcb and plugging into the mlx5
      lag logic.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6c86bc23
  2. 18 Dec, 2018 20 commits