1. 05 Aug, 2014 24 commits
    • Hariprasad Shenai's avatar
      cxgb4vf: Turn off SGE RX/TX Callback Timers and interrupts in PCI shutdown routine · c2a19856
      Hariprasad Shenai authored
      Need to turn off  SGE RX/TX Callback Timers & interrupt in cxgb4vf PCI Shutdown
      routine in order to prevent crashes during reboot/poweroff when traffic is
      running.
      Signed-off-by: default avatarHariprasad Shenai <hariprasad@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c2a19856
    • David S. Miller's avatar
      Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge · 6ff4e36f
      David S. Miller authored
      Antonio Quartulli says:
      
      ====================
      pull request: batman-adv 2014-08-05
      
      this is a pull request intended for net-next/linux-3.17 (yeah..it's really
      late).
      
      Patches 1, 2 and 4 are really minor changes:
      - kmalloc_array is substituted to kmalloc when possible (as suggested by
        checkpatch);
      - net_ratelimited() is now used properly and the "suppressed" message is not
        printed anymore if not needed;
      - the internal version number has been increased to reflect our current version.
      
      Patch 3 instead is introducing a change in the metric computation function
      by changing the penalty applied at each mesh hop from 15/255 (~6%) to
      30/255 (~11%). This change is introduced by Simon Wunderlich after having
      observed a performance improvement in several networks when using the new value.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6ff4e36f
    • Toshiaki Makita's avatar
      team: Simplify return path of team_newlink · ff204cce
      Toshiaki Makita authored
      The variable "err" is not necessary.
      Return register_netdevice() directly.
      Signed-off-by: default avatarToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
      Acked-by: default avatarJiri Pirko <jiri@resnulli.us>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ff204cce
    • Toshiaki Makita's avatar
      bridge: Update outdated comment on promiscuous mode · fdb0a662
      Toshiaki Makita authored
      Now bridge ports can be non-promiscuous, vlan_vid_add() is no longer an
      unnecessary operation.
      Signed-off-by: default avatarToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fdb0a662
    • David S. Miller's avatar
      Merge branch 'net-timestamp-next' · 618896e6
      David S. Miller authored
      Willem de Bruijn says:
      
      ====================
      net-timestamp: new tx tstamps and tcp
      
      Extend socket tx timestamping:
      - allow multiple types of software timestamps aside from send (1)
      - add software timestamp on enter packet scheduling (4)
      - add software timestamp for TCP (5)
      - add software timestamp for TCP on ACK (6)
      
      The sk_flags option space is nearly exhausted. Also move the
      many timestamp options to a new sk->sk_tstamps (2).
      
      To disambiguate data when tstamps may arrive out of order,
      optionally return a sequential ID assigned at send (3).
      
      Extend Linux tx timestamping to monitoring of latency
      incurred within the kernel stack and to protocols embedded in TCP.
      Complex kernel setups may have multiple layers of queueing, including
      multiple instances of packet scheduling, and many classes per layer.
      Many applications embed discrete payloads into TCP bytestreams for
      reliability, flow control, etcetera. Detecting application tail
      latency in such scenarios relies on identifying the exact queue
      responsible if on the host, or the network latency if otherwise.
      
      Changelog:
      v4->v5
        - define SCM_TSTAMP_SND == 0, for legacy behavior
        - add TCP tstamps without changing the generated byte stream
          - modify GSO and ACK to find offset: slightly more complex
            than previous invariant that it is the last byte
        - consistent naming of packet scheduling
          - rename SCM_TSTAMP_ENQ to SCM_TSTAMP_SCHED
        - add unique key in ee_data
        - add id field in ee_info to disambiguate tstamps
          - optional, only on new flag SOF_TIMESTAMPING_OPT_ID
          - for bytestream, in bytes
      
      v3->v4
        - (v3 review comment) removed skb->mark packet identification (*A)
        - (v3 review comment) fixed indentation
        - tcp: fixed poll() to return POLLERR on non-zero queue
        - rebased to work without syststamp
        - comments: removed all traces of MSG_TSTAMP_.. (*B)
      
      v2->v3
        - extend the SO_TIMESTAMPING API, instead of defining a new one.
        - add protocol independent support to correlate tstamps with data,
          based on returning skb->mark.
        - removed no-payload optimization and documentation (for now):
      
          I have a follow-on patch that reintroduces MSG_TSTAMP along with a
          new socket option SOF_TIMESTAMPING_OPT_ONFLAG. This is equivalent
          to sequence setsockopt(<enable>); send(..); setsockopt(<disable>),
          but avoids the need to define a MSG_TSTAMP_<TYPE> for each type.
      
          I will leave these three patches as follow-on, as this patchset is
          large enough as is.
      
      v1->v2
        - expand timestamping (existing and new) to SOCK_RAW and ping sockets
        - rename sock_errqueue_timestamping to scm_timestamping
        - change timestamp data format: do not add fields to scm_timestamping.
            Doing so could break legacy applications. Instead, communicate
            through an existing, but unused, field in the error message.
        - rename SOF_.._OPT_TX_NO_PAYLOAD to shorter SOF_.._OPT_TSONLY
        - move msg_tstamp test app out of patchset and to github
            git://github.com/wdebruij/kerneltools.git
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      618896e6
    • Willem de Bruijn's avatar
      net-timestamp: ACK timestamp for bytestreams · e1c8a607
      Willem de Bruijn authored
      Add SOF_TIMESTAMPING_TX_ACK, a request for a tstamp when the last byte
      in the send() call is acknowledged. It implements the feature for TCP.
      
      The timestamp is generated when the TCP socket cumulative ACK is moved
      beyond the tracked seqno for the first time. The feature ignores SACK
      and FACK, because those acknowledge the specific byte, but not
      necessarily the entire contents of the buffer up to that byte.
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e1c8a607
    • Willem de Bruijn's avatar
      net-timestamp: TCP timestamping · 4ed2d765
      Willem de Bruijn authored
      TCP timestamping extends SO_TIMESTAMPING to bytestreams.
      
      Bytestreams do not have a 1:1 relationship between send() buffers and
      network packets. The feature interprets a send call on a bytestream as
      a request for a timestamp for the last byte in that send() buffer.
      
      The choice corresponds to a request for a timestamp when all bytes in
      the buffer have been sent. That assumption depends on in-order kernel
      transmission. This is the common case. That said, it is possible to
      construct a traffic shaping tree that would result in reordering.
      The guarantee is strong, then, but not ironclad.
      
      This implementation supports send and sendpages (splice). GSO replaces
      one large packet with multiple smaller packets. This patch also copies
      the option into the correct smaller packet.
      
      This patch does not yet support timestamping on data in an initial TCP
      Fast Open SYN, because that takes a very different data path.
      
      If ID generation in ee_data is enabled, bytestream timestamps return a
      byte offset, instead of the packet counter for datagrams.
      
      The implementation supports a single timestamp per packet. It silenty
      replaces requests for previous timestamps. To avoid missing tstamps,
      flush the tcp queue by disabling Nagle, cork and autocork. Missing
      tstamps can be detected by offset when the ee_data ID is enabled.
      
      Implementation details:
      
      - On GSO, the timestamping code can be included in the main loop. I
      moved it into its own loop to reduce the impact on the common case
      to a single branch.
      
      - To avoid leaking the absolute seqno to userspace, the offset
      returned in ee_data must always be relative. It is an offset between
      an skb and sk field. The first is always set (also for GSO & ACK).
      The second must also never be uninitialized. Only allow the ID
      option on sockets in the ESTABLISHED state, for which the seqno
      is available. Never reset it to zero (instead, move it to the
      current seqno when reenabling the option).
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4ed2d765
    • Willem de Bruijn's avatar
      net-timestamp: SCHED timestamp on entering packet scheduler · e7fd2885
      Willem de Bruijn authored
      Kernel transmit latency is often incurred in the packet scheduler.
      Introduce a new timestamp on transmission just before entering the
      scheduler. When data travels through multiple devices (bonding,
      tunneling, ...) each device will export an individual timestamp.
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e7fd2885
    • Willem de Bruijn's avatar
      net-timestamp: add key to disambiguate concurrent datagrams · 09c2d251
      Willem de Bruijn authored
      Datagrams timestamped on transmission can coexist in the kernel stack
      and be reordered in packet scheduling. When reading looped datagrams
      from the socket error queue it is not always possible to unique
      correlate looped data with original send() call (for application
      level retransmits). Even if possible, it may be expensive and complex,
      requiring packet inspection.
      
      Introduce a data-independent ID mechanism to associate timestamps with
      send calls. Pass an ID alongside the timestamp in field ee_data of
      sock_extended_err.
      
      The ID is a simple 32 bit unsigned int that is associated with the
      socket and incremented on each send() call for which software tx
      timestamp generation is enabled.
      
      The feature is enabled only if SOF_TIMESTAMPING_OPT_ID is set, to
      avoid changing ee_data for existing applications that expect it 0.
      The counter is reset each time the flag is reenabled. Reenabling
      does not change the ID of already submitted data. It is possible
      to receive out of order IDs if the timestamp stream is not quiesced
      first.
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      09c2d251
    • Willem de Bruijn's avatar
      net-timestamp: move timestamp flags out of sk_flags · b9f40e21
      Willem de Bruijn authored
      sk_flags is reaching its limit. New timestamping options will not fit.
      Move all of them into a new field sk->sk_tsflags.
      
      Added benefit is that this removes boilerplate code to convert between
      SOF_TIMESTAMPING_.. and SOCK_TIMESTAMPING_.. in getsockopt/setsockopt.
      
      SOCK_TIMESTAMPING_RX_SOFTWARE is also used to toggle the receive
      timestamp logic (netstamp_needed). That can be simplified and this
      last key removed, but will leave that for a separate patch.
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      
      ----
      
      The u16 in sock can be moved into a 16-bit hole below sk_gso_max_segs,
      though that scatters tstamp fields throughout the struct.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b9f40e21
    • Willem de Bruijn's avatar
      net-timestamp: extend SCM_TIMESTAMPING ancillary data struct · f24b9be5
      Willem de Bruijn authored
      Applications that request kernel tx timestamps with SO_TIMESTAMPING
      read timestamps as recvmsg() ancillary data. The response is defined
      implicitly as timespec[3].
      
      1) define struct scm_timestamping explicitly and
      
      2) add support for new tstamp types. On tx, scm_timestamping always
         accompanies a sock_extended_err. Define previously unused field
         ee_info to signal the type of ts[0]. Introduce SCM_TSTAMP_SND to
         define the existing behavior.
      
      The reception path is not modified. On rx, no struct similar to
      sock_extended_err is passed along with SCM_TIMESTAMPING.
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f24b9be5
    • Anish Bhatt's avatar
      cxgb4i : Move stray CPL definitions to cxgb4 driver · a2b81b35
      Anish Bhatt authored
      These belong to the t4 msg header, will ensure there is no accidental code
      duplication in the future
      Signed-off-by: default avatarAnish Bhatt <anish@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a2b81b35
    • Neal Cardwell's avatar
      tcp: reduce spurious retransmits due to transient SACK reneging · 5ae344c9
      Neal Cardwell authored
      This commit reduces spurious retransmits due to apparent SACK reneging
      by only reacting to SACK reneging that persists for a short delay.
      
      When a sequence space hole at snd_una is filled, some TCP receivers
      send a series of ACKs as they apparently scan their out-of-order queue
      and cumulatively ACK all the packets that have now been consecutiveyly
      received. This is essentially misbehavior B in "Misbehaviors in TCP
      SACK generation" ACM SIGCOMM Computer Communication Review, April
      2011, so we suspect that this is from several common OSes (Windows
      2000, Windows Server 2003, Windows XP). However, this issue has also
      been seen in other cases, e.g. the netdev thread "TCP being hoodwinked
      into spurious retransmissions by lack of timestamps?" from March 2014,
      where the receiver was thought to be a BSD box.
      
      Since snd_una would temporarily be adjacent to a previously SACKed
      range in these scenarios, this receiver behavior triggered the Linux
      SACK reneging code path in the sender. This led the sender to clear
      the SACK scoreboard, enter CA_Loss, and spuriously retransmit
      (potentially) every packet from the entire write queue at line rate
      just a few milliseconds before the ACK for each packet arrives at the
      sender.
      
      To avoid such situations, now when a sender sees apparent reneging it
      does not yet retransmit, but rather adjusts the RTO timer to give the
      receiver a little time (max(RTT/2, 10ms)) to send us some more ACKs
      that will restore sanity to the SACK scoreboard. If the reneging
      persists until this RTO then, as before, we clear the SACK scoreboard
      and enter CA_Loss.
      
      A 10ms delay tolerates a receiver sending such a stream of ACKs at
      56Kbit/sec. And to allow for receivers with slower or more congested
      paths, we wait for at least RTT/2.
      
      We validated the resulting max(RTT/2, 10ms) delay formula with a mix
      of North American and South American Google web server traffic, and
      found that for ACKs displaying transient reneging:
      
       (1) 90% of inter-ACK delays were less than 10ms
       (2) 99% of inter-ACK delays were less than RTT/2
      
      In tests on Google web servers this commit reduced reneging events by
      75%-90% (as measured by the TcpExtTCPSACKReneging counter), without
      any measurable impact on latency for user HTTP and SPDY requests.
      Signed-off-by: default avatarNeal Cardwell <ncardwell@google.com>
      Signed-off-by: default avatarYuchung Cheng <ycheng@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5ae344c9
    • David S. Miller's avatar
      Merge branch 'xen-netback-next' · 61675fea
      David S. Miller authored
      Zoltan Kiss says:
      
      ====================
      xen-netback: Changes around carrier handling
      
      This series starts using carrier off as a way to purge packets when the guest is
      not able (or willing) to receive them. It is a much faster way to get rid of
      packets waiting for an overwhelmed guest.
      The first patch changes current netback code where it relies currently on
      netif_carrier_ok.
      The second turns off the carrier if the guest times out on a queue, and only
      turn it on again if that queue (or queues) resurrects.
      ====================
      Signed-off-by: default avatarZoltan Kiss <zoltan.kiss@citrix.com>
      Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      61675fea
    • Zoltan Kiss's avatar
      xen-netback: Turn off the carrier if the guest is not able to receive · f34a4cf9
      Zoltan Kiss authored
      Currently when the guest is not able to receive more packets, qdisc layer starts
      a timer, and when it goes off, qdisc is started again to deliver a packet again.
      This is a very slow way to drain the queues, consumes unnecessary resources and
      slows down other guests shutdown.
      This patch change the behaviour by turning the carrier off when that timer
      fires, so all the packets are freed up which were stucked waiting for that vif.
      Instead of the rx_queue_purge bool it uses the VIF_STATUS_RX_PURGE_EVENT bit to
      signal the thread that either the timeout happened or an RX interrupt arrived,
      so the thread can check what it should do. It also disables NAPI, so the guest
      can't transmit, but leaves the interrupts on, so it can resurrect.
      Only the queues which brought down the interface can enable it again, the bit
      QUEUE_STATUS_RX_STALLED makes sure of that.
      Signed-off-by: default avatarZoltan Kiss <zoltan.kiss@citrix.com>
      Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      Cc: netdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: xen-devel@lists.xenproject.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f34a4cf9
    • Zoltan Kiss's avatar
      xen-netback: Using a new state bit instead of carrier · 3d1af1df
      Zoltan Kiss authored
      This patch introduces a new state bit VIF_STATUS_CONNECTED to track whether the
      vif is in a connected state. Using carrier will not work with the next patch
      in this series, which aims to turn the carrier temporarily off if the guest
      doesn't seem to be able to receive packets.
      Signed-off-by: default avatarZoltan Kiss <zoltan.kiss@citrix.com>
      Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      Cc: netdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: xen-devel@lists.xenproject.org
      
      v2:
      - rename the bitshift type to "enum state_bit_shift" here, not in the next patch
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d1af1df
    • David S. Miller's avatar
      Merge tag 'master-2014-07-31' of... · aef4f5b6
      David S. Miller authored
      Merge tag 'master-2014-07-31' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next
      
      Conflicts:
      	net/6lowpan/iphc.c
      
      Minor conflicts in iphc.c were changes overlapping with some
      style cleanups.
      
      John W. Linville says:
      
      ====================
      Please pull this last(?) batch of wireless change intended for the
      3.17 stream...
      
      For the NFC bits, Samuel says:
      
      "This is a rather quiet one, we have:
      
      - A new driver from ST Microelectronics for their NCI ST21NFCB,
        including device tree  support.
      
      - p2p support for the ST21NFCA driver
      
      - A few fixes an enhancements for the NFC digital laye"
      
      For the Atheros bits, Kalle says:
      
      "Michal and Janusz did some important RX aggregation fixes, basically we
      were missing RX reordering altogether. The 10.1 firmware doesn't support
      Ad-Hoc mode and Michal fixed ath10k so that it doesn't advertise Ad-Hoc
      support with that firmware. Also he implemented a workaround for a KVM
      issue."
      
      For the Bluetooth bits, Gustavo and Johan say:
      
      "To quote Gustavo from his previous request:
      
      'Some last minute fixes for -next. We have a fix for a use after free in
      RFCOMM, another fix to an issue with ADV_DIRECT_IND and one for ADV_IND with
      auto-connection handling.  Last, we added support for reading the codec and
      MWS setting for controllers that support these features.'
      
      Additionally there are fixes to LE scanning, an update to conform to the 4.1
      core specification as well as fixes for tracking the page scan state. All
      of these fixes are important for 3.17."
      
      And,
      
      "We've got:
      
      - 6lowpan fixes/cleanups
      - A couple crash fixes, one for the Marvell HCI driver and another in LE SMP.
      - Fix for an incorrect connected state check
      - Fix for the bondable requirement during pairing (an issue which had
        crept in because of using "pairable" when in fact the actual meaning
        was "bondable" (these have different meanings in Bluetooth)"
      
      Along with those are some late-breaking hardware support patches in
      brcmfmac and b43 as well as a stray ath9k patch.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aef4f5b6
    • Ricardo Ribalda's avatar
      net/usb/hso: Add support for Option GTM671WFS · 61ab9efd
      Ricardo Ribalda authored
      After this patch:
      
      [   32.985530] hso: drivers/net/usb/hso.c: Option Wireless
      [   33.000452] hso 2-1.4:1.7: Not our interface
      [   33.001849] usbcore: registered new interface driver hso
      
      root@qt5022:~# ls /dev/ttyHS*
      /dev/ttyHS0  /dev/ttyHS1  /dev/ttyHS2  /dev/ttyHS3  /dev/ttyHS4
      /dev/ttyHS5
      
      root@qt5022:~# lsusb -d 0af0: -vvv
      
      Bus 002 Device 003: ID 0af0:9200 Option
      Device Descriptor:
        bLength                18
        bDescriptorType         1
        bcdUSB               2.00
        bDeviceClass          255 Vendor Specific Class
        bDeviceSubClass       255 Vendor Specific Subclass
        bDeviceProtocol       255 Vendor Specific Protocol
        bMaxPacketSize0        64
        idVendor           0x0af0 Option
        idProduct          0x9200
        bcdDevice            0.00
        iManufacturer           3 Option N.V.
        iProduct                2 Globetrotter HSUPA Modem
        iSerial                 0
        bNumConfigurations      1
        Configuration Descriptor:
          bLength                 9
          bDescriptorType         2
          wTotalLength          200
          bNumInterfaces          8
          bConfigurationValue     1
          iConfiguration          1 Option Configuration
          bmAttributes         0xe0
            Self Powered
            Remote Wakeup
          MaxPower              100mA
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        0
            bAlternateSetting       0
            bNumEndpoints           2
            bInterfaceClass       255 Vendor Specific Class
            bInterfaceSubClass    255 Vendor Specific Subclass
            bInterfaceProtocol    255 Vendor Specific Protocol
            iInterface              0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x81  EP 1 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval              32
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x01  EP 1 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval              32
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        1
            bAlternateSetting       0
            bNumEndpoints           2
            bInterfaceClass       255 Vendor Specific Class
            bInterfaceSubClass    255 Vendor Specific Subclass
            bInterfaceProtocol    255 Vendor Specific Protocol
            iInterface              0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x82  EP 2 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval              32
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x02  EP 2 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval              32
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        2
            bAlternateSetting       0
            bNumEndpoints           2
            bInterfaceClass       255 Vendor Specific Class
            bInterfaceSubClass    255 Vendor Specific Subclass
            bInterfaceProtocol    255 Vendor Specific Protocol
            iInterface              0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x83  EP 3 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval              32
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x03  EP 3 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval              32
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        3
            bAlternateSetting       0
            bNumEndpoints           2
            bInterfaceClass       255 Vendor Specific Class
            bInterfaceSubClass    255 Vendor Specific Subclass
            bInterfaceProtocol    255 Vendor Specific Protocol
            iInterface              0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x84  EP 4 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval              32
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x04  EP 4 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval              32
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        4
            bAlternateSetting       0
            bNumEndpoints           2
            bInterfaceClass       255 Vendor Specific Class
            bInterfaceSubClass    255 Vendor Specific Subclass
            bInterfaceProtocol    255 Vendor Specific Protocol
            iInterface              0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x85  EP 5 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval              32
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x05  EP 5 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval              32
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        5
            bAlternateSetting       0
            bNumEndpoints           2
            bInterfaceClass       255 Vendor Specific Class
            bInterfaceSubClass    255 Vendor Specific Subclass
            bInterfaceProtocol    255 Vendor Specific Protocol
            iInterface              0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x06  EP 6 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval              32
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x86  EP 6 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval              32
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        6
            bAlternateSetting       0
            bNumEndpoints           3
            bInterfaceClass       255 Vendor Specific Class
            bInterfaceSubClass    255 Vendor Specific Subclass
            bInterfaceProtocol    255 Vendor Specific Protocol
            iInterface              0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x87  EP 7 IN
              bmAttributes            3
                Transfer Type            Interrupt
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0040  1x 64 bytes
              bInterval               5
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x88  EP 8 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval              32
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x07  EP 7 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval              32
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        7
            bAlternateSetting       0
            bNumEndpoints           2
            bInterfaceClass         8 Mass Storage
            bInterfaceSubClass      6 SCSI
            bInterfaceProtocol     80 Bulk-Only
            iInterface              0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x08  EP 8 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval               1
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x89  EP 9 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval               1
      Device Qualifier (for other device speed):
        bLength                10
        bDescriptorType         6
        bcdUSB               2.00
        bDeviceClass          255 Vendor Specific Class
        bDeviceSubClass       255 Vendor Specific Subclass
        bDeviceProtocol       255 Vendor Specific Protocol
        bMaxPacketSize0        64
        bNumConfigurations      1
      Device Status:     0x0001
        Self Powered
      Signed-off-by: default avatarRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
      Acked-by: default avatarDan Williams <dcbw@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      61ab9efd
    • Hans Wennborg's avatar
    • Hans Wennborg's avatar
    • Simon Wunderlich's avatar
    • Simon Wunderlich's avatar
      batman-adv: increase default hop penalty · e03366ea
      Simon Wunderlich authored
      The default hop penalty is currently set to 15, which is applied like
      that for multi interface devices (e.g. dual band APs). Single band
      devices will still use an effective penalty of 30 (hop penalty + wifi
      penalty).
      
      After receiving reports of too long paths in mesh networks with dual
      band APs which were fixed by increasing the hop penalty, we'd like to
      suggest to increase that default value in the default setting as well.
      We've evaluated that increase in a handful of medium sized mesh
      networks (5-20 nodes) with single and dual band devices, with changes
      for the better (shorter routes, higher throughput) or no change at all.
      
      This patch changes the hop penalty to 30, which will give an effective
      penalty of 60 on single band devices (hop penalty + wifi penalty).
      Signed-off-by: default avatarSimon Wunderlich <simon@open-mesh.com>
      Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
      Signed-off-by: default avatarAntonio Quartulli <antonio@meshcoding.com>
      e03366ea
    • André Gaul's avatar
      batman-adv: remove unnecessary logspam · 23c4ec10
      André Gaul authored
      This patch removes unnecessary logspam which resulted from superfluous
      calls to net_ratelimit(). With the supplied patch, net_ratelimit() is
      called after the loglevel has been checked.
      Signed-off-by: default avatarAndré Gaul <gaul@web-yard.de>
      Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
      Signed-off-by: default avatarAntonio Quartulli <antonio@meshcoding.com>
      23c4ec10
    • Eric Dumazet's avatar
      netlink: fix lockdep splats · 67a24ac1
      Eric Dumazet authored
      With netlink_lookup() conversion to RCU, we need to use appropriate
      rcu dereference in netlink_seq_socket_idx() & netlink_seq_next()
      Reported-by: default avatarSasha Levin <sasha.levin@oracle.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Fixes: e341694e ("netlink: Convert netlink_lookup() to use RCU protected hash table")
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      67a24ac1
  2. 04 Aug, 2014 7 commits
  3. 03 Aug, 2014 9 commits
    • Anish Bhatt's avatar
      cxgb4i : remove spurious use of rcu · e6b92c25
      Anish Bhatt authored
      As pointed out by the intel guys, there is no need to hold rcu read lock in
      cxgbi_inet6addr_handler(), this patch removes it.
      
      Fixes: 759a0cc5 ("cxgb4i: Add ipv6 code to driver, call into libcxgbi ipv6 api")
      Signed-off-by: default avatarAnish Bhatt <anish@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e6b92c25
    • David S. Miller's avatar
      Merge branch 'concurrent_hash_tables' · bae2e81a
      David S. Miller authored
      Thomas Graf says:
      
      ====================
      Lockless netlink_lookup() with new concurrent hash table
      
      Netlink sockets are maintained in a hash table to allow efficient lookup
      via the port ID for unicast messages. However, lookups currently require
      a read lock to be taken. This series adds a new generic, resizable,
      scalable, concurrent hash table based on the paper referenced in the first
      patch. It then makes use of the new data type to implement lockless
      netlink_lookup().
      
      Patch 3/3 to convert nft_hash is included for reference but should be
      merged via the netfilter tree. Inclusion in this series is to provide
      context for the suggested API.
      
      Against net-next since the initial user of the new hash table is in net/
      
      Changes:
      v4-v5:
       - use GFP_KERNEL to alloc Netlink buckets as suggested by Nikolay
         Aleksandrov
       - free nft hash element on removal as spotted by Nikolay Aleksandrov
         and Patrick McHardy
      v3-v4:
       - fixed wrong shift assignment placement as spotted by Nikolay Aleksandrov
       - reverted default size of nft_hash to 4 as requested by Patrick McHardy,
         default size for other hash tables remains at 64 if no hint is given
       - fixed copyright as requested by Patrick McHardy
      v2-v3:
       - fixed typo in nft_hash_destroy() when passing rhashtable handle
      v1-v2:
       - fixed traversal off-by-one as spotted by Tobias Klauser
       - removed unlikely() from BUG_ON() as spotted by Josh Triplett
       - new 3rd patch to convert nft_hash to rhashtable
       - make rhashtable_insert() return void
       - nl_sk_hash_lock must be a mutex
       - fixed wrong name of rht_shrink_below_30()
       - exported symbols rht_grow_above_75() and rht_shrink_below_30()
       - allow table freeing with RCU callback
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bae2e81a
    • Thomas Graf's avatar
      nftables: Convert nft_hash to use generic rhashtable · cfe4a9dd
      Thomas Graf authored
      The sizing of the hash table and the practice of requiring a lookup
      to retrieve the pprev to be stored in the element cookie before the
      deletion of an entry is left intact.
      Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
      Acked-by: default avatarPatrick McHardy <kaber@trash.net>
      Reviewed-by: default avatarNikolay Aleksandrov <nikolay@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cfe4a9dd
    • Thomas Graf's avatar
      netlink: Convert netlink_lookup() to use RCU protected hash table · e341694e
      Thomas Graf authored
      Heavy Netlink users such as Open vSwitch spend a considerable amount of
      time in netlink_lookup() due to the read-lock on nl_table_lock. Use of
      RCU relieves the lock contention.
      
      Makes use of the new resizable hash table to avoid locking on the
      lookup.
      
      The hash table will grow if entries exceeds 75% of table size up to a
      total table size of 64K. It will automatically shrink if usage falls
      below 30%.
      
      Also splits nl_table_lock into a separate mutex to protect hash table
      mutations and allow synchronize_rcu() to sleep while waiting for readers
      during expansion and shrinking.
      
      Before:
         9.16%  kpktgend_0  [openvswitch]      [k] masked_flow_lookup
         6.42%  kpktgend_0  [pktgen]           [k] mod_cur_headers
         6.26%  kpktgend_0  [pktgen]           [k] pktgen_thread_worker
         6.23%  kpktgend_0  [kernel.kallsyms]  [k] memset
         4.79%  kpktgend_0  [kernel.kallsyms]  [k] netlink_lookup
         4.37%  kpktgend_0  [kernel.kallsyms]  [k] memcpy
         3.60%  kpktgend_0  [openvswitch]      [k] ovs_flow_extract
         2.69%  kpktgend_0  [kernel.kallsyms]  [k] jhash2
      
      After:
        15.26%  kpktgend_0  [openvswitch]      [k] masked_flow_lookup
         8.12%  kpktgend_0  [pktgen]           [k] pktgen_thread_worker
         7.92%  kpktgend_0  [pktgen]           [k] mod_cur_headers
         5.11%  kpktgend_0  [kernel.kallsyms]  [k] memset
         4.11%  kpktgend_0  [openvswitch]      [k] ovs_flow_extract
         4.06%  kpktgend_0  [kernel.kallsyms]  [k] _raw_spin_lock
         3.90%  kpktgend_0  [kernel.kallsyms]  [k] jhash2
         [...]
         0.67%  kpktgend_0  [kernel.kallsyms]  [k] netlink_lookup
      Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
      Reviewed-by: default avatarNikolay Aleksandrov <nikolay@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e341694e
    • Thomas Graf's avatar
      lib: Resizable, Scalable, Concurrent Hash Table · 7e1e7763
      Thomas Graf authored
      Generic implementation of a resizable, scalable, concurrent hash table
      based on [0]. The implementation supports both, fixed size keys specified
      via an offset and length, or arbitrary keys via own hash and compare
      functions.
      
      Lookups are lockless and protected as RCU read side critical sections.
      Automatic growing/shrinking based on user configurable watermarks is
      available while allowing concurrent lookups to take place.
      
      Objects to be hashed must include a struct rhash_head. The reason for not
      using the existing struct hlist_head is that the expansion and shrinking
      will have two buckets point to a single entry which would lead in obscure
      reverse chaining behaviour.
      
      Code includes a boot selftest if CONFIG_TEST_RHASHTABLE is defined.
      
      [0] https://www.usenix.org/legacy/event/atc11/tech/final_files/Triplett.pdfSigned-off-by: default avatarThomas Graf <tgraf@suug.ch>
      Reviewed-by: default avatarNikolay Aleksandrov <nikolay@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7e1e7763
    • David S. Miller's avatar
      Merge branch 'intel-next' · d39a9ffc
      David S. Miller authored
      Aaron Brown says:
      
      ====================
      Intel Wired LAN Driver Updates
      
      This series contains updates to the i40e and i40evf drivers.
      
      Vasu adds FCOE support, build options and a documentation pointer to i40e.
      
      Shannon exposes a Firmware API request used to do register writes on the
      driver's behalf and disables local loopback on VMDQ VSI in order to stop the
      VEB from echoing the VMDQ packets back at the VSI.
      
      Ashish corrects the vf_id offset for virtchnl messages in the case of multiple
      PFs, removes support for vf unicast promiscuos mode to disallow VFs from
      receiving traffic intended for another VF, updates the vfr_stat state check to
      handle the existing and future mechanism and adds an adapter state check to
      prevent re-arming the watchdog timer after i40evf_remove has been called and
      the timer has been deleted.
      
      Serey fixes an issue where a guest OS would panic when removing the vf driver
      while the device is being reset due to an attempt to clean a non initialized
      mac_filter_list.
      
      Akeem makes a minor comment change.
      
      Jessie changes an instance of sprintf to snprintf that was missed when the
      driver was converted to use snprintf everywhere.
      
      Mitch plugs a few memory leaks.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d39a9ffc
    • Serey Kong's avatar
      i40evf: Fixed guest OS panic when removing vf driver · 8bb1a540
      Serey Kong authored
      Removing VF driver during device still in reset caused guest OS panic.
      
      in the i40evf_remove(), we're trying to clean mac_filter_list which has
      not been initialized since the device is still stuck at the reset.
      The change is to initialize the filter_list before setting any task.
      
      Change-ID: I8b59df7384416c7e6f2d264b598f447e1c2c92b0
      Signed-off-by: default avatarSerey Kong <serey.kong@intel.com>
      Tested-by: default avatarSibai Li <sibai.li@intel.com>
      Signed-off-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8bb1a540
    • Mitch Williams's avatar
      i40evf: fix memory leak on unused interfaces · 6ba36a24
      Mitch Williams authored
      If the driver is loaded and then unloaded before the interface is
      brought up, then it will allocate a MAC filter entry and never free it.
      To fix this, on unload, run through the mac filter list and free all the
      entries. We also do this during reset recovery when the driver cannot
      contact the PF and needs to shut down completely.
      
      Change-ID: I15fabd67eb4a1bfc57605a7db60d0b5d819839db
      Signed-off-by: default avatarMitch Williams <mitch.a.williams@intel.com>
      Tested-by: default avatarSibai Li <sibai.li@intel.com>
      Signed-off-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6ba36a24
    • Mitch Williams's avatar
      i40evf: don't leak queue vectors · d31944d6
      Mitch Williams authored
      Fix a memory leak. Driver was allocating memory for queue vectors on
      init but not freeing them on shutdown. These need to be freed at two
      different times: during module unload, and during reset recovery when
      the driver cannot contact the PF driver and needs to give up.
      
      Change-ID: I7c1d0157a776e960d4da432dfe309035aad7c670
      Signed-off-by: default avatarMitch Williams <mitch.a.williams@intel.com>
      Tested-by: default avatarSibai Li <sibai.li@intel.com>
      Signed-off-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d31944d6