1. 02 Nov, 2013 8 commits
  2. 01 Nov, 2013 6 commits
  3. 31 Oct, 2013 1 commit
    • Alexandre Rames's avatar
      sfc: Fix DMA unmapping issue with firmware assisted TSO · 2acdb92e
      Alexandre Rames authored
      When using firmware assisted TSO, we use a single DMA mapping for
      the linear area of a TSO skb.
      
      We still have to segment the super-packet and insert a descriptor
      containing the original headers before each segment of payload, so we
      can unmap the linear area only after the last segment is completed.
      The unmapping information for the linear area is therefore associated
      with the last header descriptor.
      
      We calculate the DMA address to unmap from using the map length and
      the invariant that the end of the DMA mapping matches the end of
      the data referenced by the last descriptor.  But this invariant is
      broken when there is TCP payload in the linear area.
      
      Fix this by adding and using an explicit dma_offset field.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      2acdb92e
  4. 30 Oct, 2013 13 commits
  5. 29 Oct, 2013 12 commits
    • David S. Miller's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next · aa58d981
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      This series contains updates to vxlan, net, ixgbe, ixgbevf, and i40e.
      
      Joseph provides a single patch against vxlan which removes the burden
      from the NIC drivers to check if the vxlan driver is enabled in the
      kernel and also makes available the vxlan headrooms to the drivers.
      
      Jacob provides majority of the patches, with patches against net, ixgbe
      and ixgbevf.  His net patch adds might_sleep() call to napi_disable so
      that every use of napi_disable during atomic context will be visible.
      Then Jacob provides a patch to fix qv_lock_napi call in
      ixgbe_napi_disable_all.  The other ixgbe patches cleanup
      ixgbe_check_minimum_link function to correctly show that there are some
      minor loss of encoding, even though we don't calculate it and remove
      unnecessary duplication of PCIe bandwidth display.  Lastly, Jacob
      provides 4 patches against ixgbevf to add ixgbevf_rx_skb in line with
      how ixgbe handles the variations on how packets can be received, adds
      support in order to track how many packets were cleaned during busy poll
      as part of the extended statistics.
      
      Wei Yongjun provides a fix for i40e to return -ENOMEN in the memory
      allocation error handling case instead of returning 0, as done
      elsewhere in this function.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aa58d981
    • Leigh Brown's avatar
      net: mvmdio: doc: mvmdio now used by mv643xx_eth · d4a0acb8
      Leigh Brown authored
      Amend the documentation in the mvmdio driver to note the fact
      that it is now used by both the mvneta and mv643xx_eth drivers.
      Signed-off-by: default avatarLeigh Brown <leigh@solinno.co.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d4a0acb8
    • Leigh Brown's avatar
      net: mvmdio: slight optimisation of orion_mdio_write · 526edcf5
      Leigh Brown authored
      Make only a single call to mutex_unlock in orion_mdio_write.
      Signed-off-by: default avatarLeigh Brown <leigh@solinno.co.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      526edcf5
    • Leigh Brown's avatar
      net: mvmdio: orion_mdio_ready: remove manual poll · 839f46bb
      Leigh Brown authored
      Replace manual poll of MVMDIO_SMI_READ_VALID with a call to
      orion_mdio_wait_ready.  This ensures a consistent timeout,
      eliminates a busy loop, and allows for use of interrupts on
      systems that support them.
      Signed-off-by: default avatarLeigh Brown <leigh@solinno.co.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      839f46bb
    • Leigh Brown's avatar
      net: mvmdio: make orion_mdio_wait_ready consistent · b70cd1c1
      Leigh Brown authored
      Amend orion_mdio_wait_ready so that the same timeout is used when
      polling or using wait_event_timeout.  Set the timeout to 1ms.
      
      Replace udelay with usleep_range to avoid a busy loop, and set the
      polling interval range as 45us to 55us, so that the first sleep
      will be enough in almost all cases.
      
      Generate the same log message at timeout when polling or using
      wait_event_timeout.
      Signed-off-by: default avatarLeigh Brown <leigh@solinno.co.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b70cd1c1
    • Gavin Shan's avatar
      net/benet: Make lancer_wait_ready() static · 87f20c26
      Gavin Shan authored
      The function needn't to be public, so to make it as static.
      Signed-off-by: default avatarGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      87f20c26
    • Gavin Shan's avatar
      net/benet: Remove interface type · 547e2dae
      Gavin Shan authored
      The interface type, which is being traced by "struct be_adapter::
      if_type", isn't used currently. So we can remove that safely
      according to Sathya's comments.
      Signed-off-by: default avatarGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      547e2dae
    • Joe Perches's avatar
      netconsole: Convert to pr_<level> · 22ded577
      Joe Perches authored
      Use a more current logging style.
      
      Convert printks to pr_<level>.
      
      Consolidate multiple printks into a single printk to avoid
      any possible dmesg interleaving.  Add a default "event" msg
      in case the listed types are ever expanded.
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      22ded577
    • Daniel Borkmann's avatar
      net: sched: cls_bpf: add BPF-based classifier · 7d1d65cb
      Daniel Borkmann authored
      This work contains a lightweight BPF-based traffic classifier that can
      serve as a flexible alternative to ematch-based tree classification, i.e.
      now that BPF filter engine can also be JITed in the kernel. Naturally, tc
      actions and policies are supported as well with cls_bpf. Multiple BPF
      programs/filter can be attached for a class, or they can just as well be
      written within a single BPF program, that's really up to the user how he
      wishes to run/optimize the code, e.g. also for inversion of verdicts etc.
      The notion of a BPF program's return/exit codes is being kept as follows:
      
           0: No match
          -1: Select classid given in "tc filter ..." command
        else: flowid, overwrite the default one
      
      As a minimal usage example with iproute2, we use a 3 band prio root qdisc
      on a router with sfq each as leave, and assign ssh and icmp bpf-based
      filters to band 1, http traffic to band 2 and the rest to band 3. For the
      first two bands we load the bytecode from a file, in the 2nd we load it
      inline as an example:
      
      echo 1 > /proc/sys/net/core/bpf_jit_enable
      
      tc qdisc del dev em1 root
      tc qdisc add dev em1 root handle 1: prio bands 3 priomap 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
      
      tc qdisc add dev em1 parent 1:1 sfq perturb 16
      tc qdisc add dev em1 parent 1:2 sfq perturb 16
      tc qdisc add dev em1 parent 1:3 sfq perturb 16
      
      tc filter add dev em1 parent 1: bpf run bytecode-file /etc/tc/ssh.bpf flowid 1:1
      tc filter add dev em1 parent 1: bpf run bytecode-file /etc/tc/icmp.bpf flowid 1:1
      tc filter add dev em1 parent 1: bpf run bytecode-file /etc/tc/http.bpf flowid 1:2
      tc filter add dev em1 parent 1: bpf run bytecode "`bpfc -f tc -i misc.ops`" flowid 1:3
      
      BPF programs can be easily created and passed to tc, either as inline
      'bytecode' or 'bytecode-file'. There are a couple of front-ends that can
      compile opcodes, for example:
      
      1) People familiar with tcpdump-like filters:
      
         tcpdump -iem1 -ddd port 22 | tr '\n' ',' > /etc/tc/ssh.bpf
      
      2) People that want to low-level program their filters or use BPF
         extensions that lack support by libpcap's compiler:
      
         bpfc -f tc -i ssh.ops > /etc/tc/ssh.bpf
      
         ssh.ops example code:
         ldh [12]
         jne #0x800, drop
         ldb [23]
         jneq #6, drop
         ldh [20]
         jset #0x1fff, drop
         ldxb 4 * ([14] & 0xf)
         ldh [%x + 14]
         jeq #0x16, pass
         ldh [%x + 16]
         jne #0x16, drop
         pass: ret #-1
         drop: ret #0
      
      It was chosen to load bytecode into tc, since the reverse operation,
      tc filter list dev em1, is then able to show the exact commands again.
      Possible follow-up work could also include a small expression compiler
      for iproute2. Tested with the help of bmon. This idea came up during
      the Netfilter Workshop 2013 in Copenhagen. Also thanks to feedback from
      Eric Dumazet!
      Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Cc: Thomas Graf <tgraf@suug.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7d1d65cb
    • Rafał Miłecki's avatar
      bgmac: separate RX descriptor setup code into a new function · d549c76b
      Rafał Miłecki authored
      This cleans code a bit and will be useful when allocating buffers in
      other places (like RX path, to avoid skb_copy_from_linear_data_offset).
      Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d549c76b
    • Wei Yongjun's avatar
      i40e: fix error return code in i40e_probe() · ed87ac09
      Wei Yongjun authored
      Fix to return -ENOMEM in the memory alloc error handling
      case instead of 0, as done elsewhere in this function.
      Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Tested-by: default avatarKavindya Deegala <kavindya.s.deegala@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      ed87ac09
    • Don Skidmore's avatar
      ixgbevf: Add zero_base handler to network statistics · 44bd741e
      Don Skidmore authored
      This patch removes the need to keep a zero_base variable in the adapter
      structure. Now we just use two different macros to set the non-zero and
      zero base. This adds to readability and shortens some of the structure
      initialization under 80 columns. The gathering of status for ethtool was
      slightly modified to again better fit into 80 columns and become a bit
      more readable.
      Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: default avatarDon Skidmore <donald.c.skidmore@intel.com>
      Tested-by: default avatarPhil Schmitt <phillip.j.schmitt@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      44bd741e