1. 11 9月, 2020 1 次提交
    • D
      Bluetooth: Add MGMT capability flags for tx power and ext advertising · d5ea32da
      Daniel Winkler 提交于
      For new advertising features, it will be important for userspace to
      know the capabilities of the controller and kernel. If the controller
      and kernel support extended advertising, we include flags indicating
      hardware offloading support and support for setting tx power of adv
      instances.
      
      In the future, vendor-specific commands may allow the setting of tx
      power in advertising instances, but for now this feature is only
      marked available if extended advertising is supported.
      
      This change is manually verified in userspace by ensuring the
      advertising manager's supported_flags field is updated with new flags on
      hatch chromebook (ext advertising supported).
      Signed-off-by: NDaniel Winkler <danielwinkler@google.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      d5ea32da
  2. 01 8月, 2020 6 次提交
    • R
      rtnetlink: add support for protodown reason · 829eb208
      Roopa Prabhu 提交于
      netdev protodown is a mechanism that allows protocols to
      hold an interface down. It was initially introduced in
      the kernel to hold links down by a multihoming protocol.
      There was also an attempt to introduce protodown
      reason at the time but was rejected. protodown and protodown reason
      is supported by almost every switching and routing platform.
      It was ok for a while to live without a protodown reason.
      But, its become more critical now given more than
      one protocol may need to keep a link down on a system
      at the same time. eg: vrrp peer node, port security,
      multihoming protocol. Its common for Network operators and
      protocol developers to look for such a reason on a networking
      box (Its also known as errDisable by most networking operators)
      
      This patch adds support for link protodown reason
      attribute. There are two ways to maintain protodown
      reasons.
      (a) enumerate every possible reason code in kernel
          - A protocol developer has to make a request and
            have that appear in a certain kernel version
      (b) provide the bits in the kernel, and allow user-space
      (sysadmin or NOS distributions) to manage the bit-to-reasonname
      map.
      	- This makes extending reason codes easier (kind of like
            the iproute2 table to vrf-name map /etc/iproute2/rt_tables.d/)
      
      This patch takes approach (b).
      
      a few things about the patch:
      - It treats the protodown reason bits as counter to indicate
      active protodown users
      - Since protodown attribute is already an exposed UAPI,
      the reason is not enforced on a protodown set. Its a no-op
      if not used.
      the patch follows the below algorithm:
        - presence of reason bits set indicates protodown
          is in use
        - user can set protodown and protodown reason in a
          single or multiple setlink operations
        - setlink operation to clear protodown, will return -EBUSY
          if there are active protodown reason bits
        - reason is not included in link dumps if not used
      
      example with patched iproute2:
      $cat /etc/iproute2/protodown_reasons.d/r.conf
      0 mlag
      1 evpn
      2 vrrp
      3 psecurity
      
      $ip link set dev vxlan0 protodown on protodown_reason vrrp on
      $ip link set dev vxlan0 protodown_reason mlag on
      $ip link show
      14: vxlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode
      DEFAULT group default qlen 1000
          link/ether f6:06:be:17:91:e7 brd ff:ff:ff:ff:ff:ff protodown on <mlag,vrrp>
      
      $ip link set dev vxlan0 protodown_reason mlag off
      $ip link set dev vxlan0 protodown off protodown_reason vrrp off
      Signed-off-by: NRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      829eb208
    • Y
      tcp: add earliest departure time to SCM_TIMESTAMPING_OPT_STATS · 48040793
      Yousuk Seung 提交于
      This change adds TCP_NLA_EDT to SCM_TIMESTAMPING_OPT_STATS that reports
      the earliest departure time(EDT) of the timestamped skb. By tracking EDT
      values of the skb from different timestamps, we can observe when and how
      much the value changed. This allows to measure the precise delay
      injected on the sender host e.g. by a bpf-base throttler.
      Signed-off-by: NYousuk Seung <ysseung@google.com>
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Acked-by: NNeal Cardwell <ncardwell@google.com>
      Acked-by: NSoheil Hassas Yeganeh <soheil@google.com>
      Acked-by: NYuchung Cheng <ycheng@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      48040793
    • F
      tcp: syncookies: create mptcp request socket for ACK cookies with MPTCP option · 6fc8c827
      Florian Westphal 提交于
      If SYN packet contains MP_CAPABLE option, keep it enabled.
      Syncokie validation and cookie-based socket creation is changed to
      instantiate an mptcp request sockets if the ACK contains an MPTCP
      connection request.
      
      Rather than extend both cookie_v4/6_check, add a common helper to create
      the (mp)tcp request socket.
      Suggested-by: NPaolo Abeni <pabeni@redhat.com>
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6fc8c827
    • F
      mptcp: subflow: add mptcp_subflow_init_cookie_req helper · c83a47e5
      Florian Westphal 提交于
      Will be used to initialize the mptcp request socket when a MP_CAPABLE
      request was handled in syncookie mode, i.e. when a TCP ACK containing a
      MP_CAPABLE option is a valid syncookie value.
      
      Normally (non-cookie case), MPTCP will generate a unique 32 bit connection
      ID and stores it in the MPTCP token storage to be able to retrieve the
      mptcp socket for subflow joining.
      
      In syncookie case, we do not want to store any state, so just generate the
      unique ID and use it in the reply.
      
      This means there is a small window where another connection could generate
      the same token.
      
      When Cookie ACK comes back, we check that the token has not been registered
      in the mean time.  If it was, the connection needs to fall back to TCP.
      
      Changes in v2:
       - use req->syncookie instead of passing 'want_cookie' arg to ->init_req()
         (Eric Dumazet)
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Reviewed-by: NMat Martineau <mathew.j.martineau@linux.intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c83a47e5
    • F
      mptcp: rename and export mptcp_subflow_request_sock_ops · 08b8d080
      Florian Westphal 提交于
      syncookie code path needs to create an mptcp request sock.
      
      Prepare for this and add mptcp prefix plus needed export of ops struct.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Reviewed-by: NMat Martineau <mathew.j.martineau@linux.intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      08b8d080
    • F
      tcp: rename request_sock cookie_ts bit to syncookie · f8ace8d9
      Florian Westphal 提交于
      Nowadays output function has a 'synack_type' argument that tells us when
      the syn/ack is emitted via syncookies.
      
      The request already tells us when timestamps are supported, so check
      both to detect special timestamp for tcp option encoding is needed.
      
      We could remove cookie_ts altogether, but a followup patch would
      otherwise need to adjust function signatures to pass 'want_cookie' to
      mptcp core.
      
      This way, the 'existing' bit can be used.
      Suggested-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f8ace8d9
  3. 31 7月, 2020 17 次提交
  4. 30 7月, 2020 4 次提交
  5. 29 7月, 2020 5 次提交
  6. 28 7月, 2020 3 次提交
    • E
      net/mlx5: Hold pages RB tree per VF · d6945242
      Eran Ben Elisha 提交于
      Per page request event, FW request to allocated or release pages for a
      single function. Driver maintains FW pages object per function, so there
      is no need to hold one global page data-base. Instead, have a page
      data-base per function, which will improve performance release flow in all
      cases, especially for "release all pages".
      
      As the range of function IDs is large and not sequential, use xarray to
      store a per function ID page data-base, where the function ID is the key.
      
      Upon first allocation of a page to a function ID, create the page
      data-base per function. This data-base will be released only at pagealloc
      mechanism cleanup.
      
      NIC: ConnectX-4 Lx
      CPU: Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
      Test case: 32 VFs, measure release pages on one VF as part of FLR
      Before: 0.021 Sec
      After:  0.014 Sec
      
      The improvement depends on amount of VFs and memory utilization
      by them. Time measurements above were taken from idle system.
      Signed-off-by: NEran Ben Elisha <eranbe@mellanox.com>
      Reviewed-by: NMark Bloch <markb@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      d6945242
    • I
      Bluetooth: btusb: Fix and detect most of the Chinese Bluetooth controllers · cde1a8a9
      Ismael Ferreras Morezuelas 提交于
      For some reason they tend to squat on the very first CSR/
      Cambridge Silicon Radio VID/PID instead of paying fees.
      
      This is an extremely common problem; the issue goes as back as 2013
      and these devices are only getting more popular, even rebranded by
      reputable vendors and sold by retailers everywhere.
      
      So, at this point in time there are hundreds of modern dongles reusing
      the ID of what originally was an early Bluetooth 1.1 controller.
      
      Linux is the only place where they don't work due to spotty checks
      in our detection code. It only covered a minimum subset.
      
      So what's the big idea? Take advantage of the fact that all CSR
      chips report the same internal version as both the LMP sub-version and
      HCI revision number. It always matches, couple that with the manufacturer
      code, that rarely lies, and we now have a good idea of who is who.
      
      Additionally, by compiling a list of user-reported HCI/lsusb dumps, and
      searching around for legit CSR dongles in similar product ranges we can
      find what CSR BlueCore firmware supported which Bluetooth versions.
      
      That way we can narrow down ranges of fakes for each of them.
      
      e.g. Real CSR dongles with LMP subversion 0x73 are old enough that
           support BT 1.1 only; so it's a dead giveaway when some
           third-party BT 4.0 dongle reuses it.
      
      So, to sum things up; there are multiple classes of fake controllers
      reusing the same 0A12:0001 VID/PID. This has been broken for a while.
      
      Known 'fake' bcdDevices: 0x0100, 0x0134, 0x1915, 0x2520, 0x7558, 0x8891
        IC markings on 0x7558: FR3191AHAL 749H15143 (???)
      
      https://bugzilla.kernel.org/show_bug.cgi?id=60824
      
      Fixes: 81cac64b (Deal with USB devices that are faking CSR vendor)
      Reported-by: NMichał Wiśniewski <brylozketrzyn@gmail.com>
      Tested-by: NMike Johnson <yuyuyak@gmail.com>
      Tested-by: NRicardo Rodrigues <ekatonb@gmail.com>
      Tested-by: NM.Hanny Sabbagh <mhsabbagh@outlook.com>
      Tested-by: NOussama BEN BRAHIM <b.brahim.oussama@gmail.com>
      Tested-by: NIsmael Ferreras Morezuelas <swyterzone@gmail.com>
      Signed-off-by: NIsmael Ferreras Morezuelas <swyterzone@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      cde1a8a9
    • M
      hsr: enhance netlink socket interface to support PRP · 8f4c0e01
      Murali Karicheri 提交于
      Parallel Redundancy Protocol (PRP) is another redundancy protocol
      introduced by IEC 63439 standard. It is similar to HSR in many
      aspects:-
      
       - Use a pair of Ethernet interfaces to created the PRP device
       - Use a 6 byte redundancy protocol part (RCT, Redundancy Check
         Trailer) similar to HSR Tag.
       - Has Link Redundancy Entity (LRE) that works with RCT to implement
         redundancy.
      
      Key difference is that the protocol unit is a trailer instead of a
      prefix as in HSR. That makes it inter-operable with tradition network
      components such as bridges/switches which treat it as pad bytes,
      whereas HSR nodes requires some kind of translators (Called redbox) to
      talk to regular network devices. This features allows regular linux box
      to be converted to a DAN-P box. DAN-P stands for Dual Attached Node - PRP
      similar to DAN-H (Dual Attached Node - HSR).
      
      Add a comment at the header/source code to explicitly state that the
      driver files also handles PRP protocol as well.
      Signed-off-by: NMurali Karicheri <m-karicheri2@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8f4c0e01
  7. 25 7月, 2020 4 次提交