1. 25 Jun, 2013 24 commits
  2. 24 Jun, 2013 16 commits
    • Daniel Borkmann's avatar
      packet: nlmon: virtual netlink monitoring device for packet sockets · e4fc408e
      Daniel Borkmann authored
      Currently, there is no good possibility to debug netlink traffic that
      is being exchanged between kernel and user space. Therefore, this patch
      implements a netlink virtual device, so that netlink messages will be
      made visible to PF_PACKET sockets. Once there was an approach with a
      similar idea [1], but it got forgotten somehow.
      
      I think it makes most sense to accept the "overhead" of an extra netlink
      net device over implementing the same functionality from PF_PACKET
      sockets once again into netlink sockets. We have BPF filters that can
      already be easily applied which even have netlink extensions, we have
      RX_RING zero-copy between kernel- and user space that can be reused,
      and much more features. So instead of re-implementing all of this, we
      simply pass the skb to a given PF_PACKET socket for further analysis.
      
      Another nice benefit that comes from that is that no code needs to be
      changed in user space packet analyzers (maybe adding a dissector, but
      not more), thus out of the box, we can already capture pcap files of
      netlink traffic to debug/troubleshoot netlink problems.
      
      Also thanks goes to Thomas Graf, Flavio Leitner, Jesper Dangaard Brouer.
      
       [1] http://marc.info/?l=linux-netdev&m=113813401516110Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e4fc408e
    • Daniel Borkmann's avatar
      net: netlink: virtual tap device management · bcbde0d4
      Daniel Borkmann authored
      Similarly to the networking receive path with ptype_all taps, we add
      the possibility to register netdevices that are for ARPHRD_NETLINK to
      the netlink subsystem, so that those can be used for netlink analyzers
      resp. debuggers. We do not offer a direct callback function as out-of-tree
      modules could do crap with it. Instead, a netdevice must be registered
      properly and only receives a clone, managed by the netlink layer. Symbols
      are exported as GPL-only.
      Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bcbde0d4
    • Daniel Borkmann's avatar
      net: if_arp: add ARPHRD_NETLINK type · 77e2af03
      Daniel Borkmann authored
      This small patch adds the definition of ARPHRD_NETLINK which can for
      example be used by netlink monitoring devices as device type. So that
      sockaddr_ll can pick it up and based on that choose the correct packet
      dissector.
      Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      77e2af03
    • David S. Miller's avatar
      net: Restore unintentional reverts. · d3c5f47e
      David S. Miller authored
      This restores commits:
      
      c573972c
      1a590434
      da2e2c21
      
      which initially accidently went into 'net', were
      reverted there, and then properly placed into 'net-next'.
      But the next net --> net-next merge accidently wiped them
      out again.
      Reported-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d3c5f47e
    • Ben Hutchings's avatar
      sfc: Improve test for IOMMU in use · 636d73da
      Ben Hutchings authored
      The device::iommu_group field may be set even if no IOMMU is in use.
      iommu_present() is still a better indicator, although it doesn't tell
      us whether *our* device is affected.
      Reported-by: default avatarAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      636d73da
    • Ben Hutchings's avatar
      sfc: Fix IRQ cleanup in case of a probe failure · 1899c111
      Ben Hutchings authored
      The lifetime of an irq_cpu_rmap is odd: we have to allocate it before
      installing IRQ handlers and free it before removing the IRQ handlers.
      As a result of this asymmetry, it was omitted from some failure paths.
      
      On another failure path, we could try to remove IRQ handlers we
      had not yet installed.
      
      Move the irq_cpu_rmap allocation and freeing alongside IRQ handler
      installation and removal, in efx_nic_{init,fini}_interrupts().
      Count the number of IRQ handlers successfully installed and only
      remove those on the failure path.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      1899c111
    • Ben Hutchings's avatar
      sfc: Do not pass non-TCP packets into GRO code · e79255de
      Ben Hutchings authored
      GRO can handle non-TCP packets and pass them up without coalescing,
      but it has to do some extra work to parse the packet which we can
      bypass using the hardware parse result.  (This condition yields a
      false negative for TCP/IPv6 packets received by Falcon, but its
      performance is already poor in that case due to lack of checksum
      offload.)
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      e79255de
    • Ben Hutchings's avatar
      sfc: Define and set RX buffer flag for packets parsed as TCP · d07df8ec
      Ben Hutchings authored
      This will be useful for shortcutting some software packet parsing.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      d07df8ec
    • Andy Lutomirski's avatar
      sfc: Enable accelerated RFS on vlans · 3ea84c54
      Andy Lutomirski authored
      As far as I know, the hardware doesn't support matching on both IP
      fields and vlan tag, but it can at least match on the IP fields.
      Signed-off-by: default avatarAndy Lutomirski <luto@amacapital.net>
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      3ea84c54
    • Ben Hutchings's avatar
      sfc: Report software timestamping capabilities · 62ebac92
      Ben Hutchings authored
      The kernel can generate software receive timestamps and we should
      report those for all ports regardless of hardware capabilities.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      62ebac92
    • Jon Cooper's avatar
      sfc: Increase size of RX SKB header area · d4ef5b6f
      Jon Cooper authored
      This allows the SKB to hold the headers without reallocation more often.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      d4ef5b6f
    • Jon Cooper's avatar
    • Alexandre Rames's avatar
      sfc: Fix EEH with legacy interrupts. · b28405b0
      Alexandre Rames authored
      PCI legacy interrupts are level-triggered, and we cannot mask them up
      on an isolated device.  Instead, disable the IRQ at the controller
      until we have recovered.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      b28405b0
    • Yuval Mintz's avatar
      bnx2x: Fix compilation with no IOV support · 37173488
      Yuval Mintz authored
      This fixes an issue caused by submit 78c3bcc5
      `bnx2x: Improve PF behaviour toward VF', which made the bnx2x driver fail
      compilation when PCI_IOV is not set.
      Signed-off-by: default avatarYuval Mintz <yuvalmin@broadcom.com>
      Signed-off-by: default avatarAriel Elior <ariele@broadcom.com>
      Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      37173488
    • Wedson Almeida Filho's avatar
      net: Unmap fragment page once iterator is done · aeb193ea
      Wedson Almeida Filho authored
      Callers of skb_seq_read() are currently forced to call skb_abort_seq_read()
      even when consuming all the data because the last call to skb_seq_read (the
      one that returns 0 to indicate the end) fails to unmap the last fragment page.
      
      With this patch callers will be allowed to traverse the SKB data by calling
      skb_prepare_seq_read() once and repeatedly calling skb_seq_read() as originally
      intended (and documented in the original commit 677e90ed), that is, only call
      skb_abort_seq_read() if the sequential read is actually aborted.
      Signed-off-by: default avatarWedson Almeida Filho <wedsonaf@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aeb193ea
    • David S. Miller's avatar
      Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next · 7e2f934d
      David S. Miller authored
      John W. Linville says:
      
      ====================
      I would guess that this is the last big wireless pull request before
      the 3.11 merge window...
      
      Regarding the mac80211 bits, Johannes says:
      
      "I have a number of mesh fixes and improvements from Colleen, Jacob,
      Ashok and Thomas, powersave fixes in mac80211 from Alex, improved
      management-TX from Antonio, and a few various things, including locking
      fixes, from others and myself. Overall though, nothing really stands
      out."
      
      As for the iwlwifi bits, Johannes says:
      
      "Emmanuel contributed two AP mode fixes, removed an unused field, fixed a
      comment and added a warning for something that shouldn't happen in
      practice, and I removed the declaration of a function that doesn't even
      exist and cleaned up a small include."
      
      "This time I have a number of cleanups, a small fix from Emmanuel and two
      performance improvements that combined reduce our driver's CPU
      utilisation as much as 75% in high TX-throughput scenarios."
      
      "These two patches fix two issues with using rfkill randomly during
      traffic, which would then cause our driver to stop working and not be
      able to recover at all."
      
      Regarding the ath6kl bits, Kalle says:
      
      "Here are few simple patches for ath6kl. We have a suspend crash fix for
      USB from Shafi, use of mac_pton(), a compiler warning fix and a fix for
      module initialisation error path."
      
      Kalle also sends the biggest single item of note, the new ath10k
      driver for Qualcomm Atheros 802.11ac CQA98xx devices.
      
      Included is an NFC pull, of which Samuel says:
      
      "These are the pending NFC patches for the 3.11 merge window.
      
      It contains the pending fixes that were on nfc-fixes (nfc-fixes-3.10-2),
      along with a few more for the pn544 and pn533 drivers, the LLCP
      disconnection path and an LLCP memory leak.
      
      Highlights for this one are:
      
      - An initial secure element API. NFC chipsets can carry an embedded
        secure element or get access to the SIM one. In both cases they
        control the secure elements and this API provides a way to discover,
        enable and disable the available SEs. It also exports that to
        userspace in order for SE focused middleware to actually do something
        with them (e.g. payments).
      
      - NCI over SPI support. SPI is the most complex NCI specified transport
        layer and we now have support for it in the kernel. The next step will
        be to implement drivers for NCI chipsets using this transport like
        e.g. bcm2079x.
      
      - NFC p2p hardware simulation driver. We now have an nfcsim driver that
        is mostly a loopback device between 2 NFC interfaces. It also
        implements the rest of the NFC core API like polling and target
        detection. This driver, with neard running on top of it, allows us to
        completely test the LLCP, SNEP and Handover implementation without
        physical hardware.
      
      - A Firmware update netlink API. Most (All ?) HCI chipsets have a
        special firmware update mode where applications can push a new
        firmware that will be flashed. We now have a netlink API for providing
        that mode to e.g. nfctool."
      
      On top of all that, there are a variety of updates to brcmfmac,
      iwlegacy, rtlwifi, wil6210, and the TI wl12xx drivers.  As usual,
      the bcma and ssb busses get a little love as well, as do a handful
      of others here and there.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7e2f934d