1. 30 4月, 2015 1 次提交
  2. 28 4月, 2015 1 次提交
    • M
      bnx2x: really disable TPA if 'disable_tpa' option is set · 22a8f237
      Michal Schmidt 提交于
      bnx2x's 'disable_tpa=1' module option is not respected properly and TPA
      (transparent packet aggregation) remains enabled. Even though the
      module option causes LRO to be disabled, TPA is enabled in GRO mode.
      
      Additionally, disabling GRO via ethtool then has no effect. One can
      still observe tpa_* statistics increase and large packets being received
      in tcpdump.
      
      The bug was an unintended consequence of commit aebf6244 "bnx2x: Be
      more forgiving toward SW GRO".
      
      Fix it by following the bp->disable_tpa flag when initializing fp's.
      Signed-off-by: NMichal Schmidt <mschmidt@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      22a8f237
  3. 23 4月, 2015 1 次提交
  4. 16 4月, 2015 1 次提交
    • E
      bnx2x: Fix busy_poll vs netpoll · 074975d0
      Eric Dumazet 提交于
      Commit 9a2620c8 ("bnx2x: prevent WARN during driver unload")
      switched the napi/busy_lock locking mechanism from spin_lock() into
      spin_lock_bh(), breaking inter-operability with netconsole, as netpoll
      disables interrupts prior to calling our napi mechanism.
      
      This switches the driver into using atomic assignments instead of the
      spinlock mechanisms previously employed.
      
      Based on initial patch from Yuval Mintz & Ariel Elior
      
      I basically added softirq starvation avoidance, and mixture
      of atomic operations, plain writes and barriers.
      
      Note this slightly reduces the overhead for this driver when no
      busy_poll sockets are in use.
      
      Fixes: 9a2620c8 ("bnx2x: prevent WARN during driver unload")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      074975d0
  5. 27 1月, 2015 1 次提交
  6. 14 1月, 2015 1 次提交
  7. 11 12月, 2014 1 次提交
  8. 17 11月, 2014 1 次提交
  9. 31 10月, 2014 1 次提交
  10. 20 9月, 2014 1 次提交
  11. 02 9月, 2014 1 次提交
  12. 30 8月, 2014 1 次提交
  13. 26 8月, 2014 3 次提交
  14. 23 8月, 2014 3 次提交
  15. 25 7月, 2014 1 次提交
    • D
      bnx2x: fix crash during TSO tunneling · fe26566d
      Dmitry Kravkov 提交于
      When TSO packet is transmitted additional BD w/o mapping is used
      to describe the packed. The BD needs special handling in tx
      completion.
      
      kernel: Call Trace:
      kernel: <IRQ>  [<ffffffff815e19ba>] dump_stack+0x19/0x1b
      kernel: [<ffffffff8105dee1>] warn_slowpath_common+0x61/0x80
      kernel: [<ffffffff8105df5c>] warn_slowpath_fmt+0x5c/0x80
      kernel: [<ffffffff814a8c0d>] ? find_iova+0x4d/0x90
      kernel: [<ffffffff814ab0e2>] intel_unmap_page.part.36+0x142/0x160
      kernel: [<ffffffff814ad0e6>] intel_unmap_page+0x26/0x30
      kernel: [<ffffffffa01f55d7>] bnx2x_free_tx_pkt+0x157/0x2b0 [bnx2x]
      kernel: [<ffffffffa01f8dac>] bnx2x_tx_int+0xac/0x220 [bnx2x]
      kernel: [<ffffffff8101a0d9>] ? read_tsc+0x9/0x20
      kernel: [<ffffffffa01f8fdb>] bnx2x_poll+0xbb/0x3c0 [bnx2x]
      kernel: [<ffffffff814d041a>] net_rx_action+0x15a/0x250
      kernel: [<ffffffff81067047>] __do_softirq+0xf7/0x290
      kernel: [<ffffffff815f3a5c>] call_softirq+0x1c/0x30
      kernel: [<ffffffff81014d25>] do_softirq+0x55/0x90
      kernel: [<ffffffff810673e5>] irq_exit+0x115/0x120
      kernel: [<ffffffff815f4358>] do_IRQ+0x58/0xf0
      kernel: [<ffffffff815e94ad>] common_interrupt+0x6d/0x6d
      kernel: <EOI>  [<ffffffff810bbff7>] ? clockevents_notify+0x127/0x140
      kernel: [<ffffffff814834df>] ? cpuidle_enter_state+0x4f/0xc0
      kernel: [<ffffffff81483615>] cpuidle_idle_call+0xc5/0x200
      kernel: [<ffffffff8101bc7e>] arch_cpu_idle+0xe/0x30
      kernel: [<ffffffff810b4725>] cpu_startup_entry+0xf5/0x290
      kernel: [<ffffffff815cfee1>] start_secondary+0x265/0x27b
      kernel: ---[ end trace 11aa7726f18d7e80 ]---
      
      Fixes: a848ade4 ("bnx2x: add CSUM and TSO support for encapsulation protocols")
      Reported-by: NYulong Pei <ypei@redhat.com>
      Cc: Michal Schmidt <mschmidt@redhat.com>
      Signed-off-by: NDmitry Kravkov <Dmitry.Kravkov@qlogic.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fe26566d
  16. 02 7月, 2014 2 次提交
  17. 04 6月, 2014 1 次提交
  18. 31 5月, 2014 1 次提交
  19. 18 4月, 2014 1 次提交
  20. 26 3月, 2014 1 次提交
  21. 15 3月, 2014 1 次提交
  22. 28 2月, 2014 1 次提交
  23. 27 2月, 2014 2 次提交
  24. 26 2月, 2014 1 次提交
    • J
      bnx2x: Remove hidden flow control goto from BNX2X_ALLOC macros · cd2b0389
      Joe Perches 提交于
      BNX2X_ALLOC macros use "goto alloc_mem_err"
      so these labels appear unused in some functions.
      
      Expand these macros in-place via coccinelle and
      some typing.
      
      Update the macros to use statement expressions
      and remove the BNX2X_ALLOC macro.
      
      This adds some > 80 char lines.
      
      $ cat bnx2x_pci_alloc.cocci
      @@
      expression e1;
      expression e2;
      expression e3;
      @@
      -	BNX2X_PCI_ALLOC(e1, e2, e3);
      +	e1 = BNX2X_PCI_ALLOC(e2, e3); if (!e1) goto alloc_mem_err;
      
      @@
      expression e1;
      expression e2;
      expression e3;
      @@
      -	BNX2X_PCI_FALLOC(e1, e2, e3);
      +	e1 = BNX2X_PCI_FALLOC(e2, e3); if (!e1) goto alloc_mem_err;
      
      @@
      expression e1;
      expression e2;
      @@
      -	BNX2X_ALLOC(e1, e2);
      +	e1 = kzalloc(e2, GFP_KERNEL); if (!e1) goto alloc_mem_err;
      
      @@
      expression e1;
      expression e2;
      expression e3;
      @@
      -	kzalloc(sizeof(e1) * e2, e3)
      +	kcalloc(e2, sizeof(e1), e3)
      
      @@
      expression e1;
      expression e2;
      expression e3;
      @@
      -	kzalloc(e1 * sizeof(e2), e3)
      +	kcalloc(e1, sizeof(e2), e3)
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cd2b0389
  25. 19 2月, 2014 1 次提交
  26. 17 2月, 2014 1 次提交
  27. 13 2月, 2014 1 次提交
  28. 14 1月, 2014 1 次提交
    • S
      bnx2x: namespace and dead code cleanups · a8f47eb7
      stephen hemminger 提交于
      Fix a bunch of whole lot of namespace issues with the Broadcom bnx2x driver
      found by running 'make namespacecheck'
      
       * global variables must be prefixed with bnx2x_
          naming a variable int_mode, or num_queue is invitation to disaster
      
       * make local functions static
      
       * move some inline's used in one file out of header
         (this driver has a bad case of inline-itis)
      
       * remove resulting dead code fallout
       	 bnx2x_pfc_statistic,
      	 bnx2x_emac_get_pfc_stat
       	 bnx2x_init_vlan_mac_obj,
         Looks like vlan mac support in this driver was a botch from day one
         either never worked, or not implemented or missing support functions
      
      Compile tested only.
      Signed-off-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a8f47eb7
  29. 11 1月, 2014 2 次提交
    • J
      net: core: explicitly select a txq before doing l2 forwarding · f663dd9a
      Jason Wang 提交于
      Currently, the tx queue were selected implicitly in ndo_dfwd_start_xmit(). The
      will cause several issues:
      
      - NETIF_F_LLTX were removed for macvlan, so txq lock were done for macvlan
        instead of lower device which misses the necessary txq synchronization for
        lower device such as txq stopping or frozen required by dev watchdog or
        control path.
      - dev_hard_start_xmit() was called with NULL txq which bypasses the net device
        watchdog.
      - dev_hard_start_xmit() does not check txq everywhere which will lead a crash
        when tso is disabled for lower device.
      
      Fix this by explicitly introducing a new param for .ndo_select_queue() for just
      selecting queues in the case of l2 forwarding offload. netdev_pick_tx() was also
      extended to accept this parameter and dev_queue_xmit_accel() was used to do l2
      forwarding transmission.
      
      With this fixes, NETIF_F_LLTX could be preserved for macvlan and there's no need
      to check txq against NULL in dev_hard_start_xmit(). Also there's no need to keep
      a dedicated ndo_dfwd_start_xmit() and we can just reuse the code of
      dev_queue_xmit() to do the transmission.
      
      In the future, it was also required for macvtap l2 forwarding support since it
      provides a necessary synchronization method.
      
      Cc: John Fastabend <john.r.fastabend@intel.com>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Cc: e1000-devel@lists.sourceforge.net
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      Acked-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f663dd9a
    • M
      bnx2x: fix DMA unmapping of TSO split BDs · 95e92fd4
      Michal Schmidt 提交于
      bnx2x triggers warnings with CONFIG_DMA_API_DEBUG=y:
      
        WARNING: CPU: 0 PID: 2253 at lib/dma-debug.c:887 check_unmap+0xf8/0x920()
        bnx2x 0000:28:00.0: DMA-API: device driver frees DMA memory with
        different size [device address=0x00000000da2b389e] [map size=1490 bytes]
        [unmap size=66 bytes]
      
      The reason is that bnx2x splits a TSO BD into two BDs (headers + data)
      using one DMA mapping for both, but it uses only the length of the first
      BD when unmapping.
      
      This patch fixes the bug by unmapping the whole length of the two BDs.
      Signed-off-by: NMichal Schmidt <mschmidt@redhat.com>
      Reviewed-by: NEric Dumazet <edumazet@google.com>
      Acked-by: NDmitry Kravkov <dmitry@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      95e92fd4
  30. 10 1月, 2014 1 次提交
  31. 27 12月, 2013 1 次提交
  32. 20 12月, 2013 1 次提交
  33. 19 12月, 2013 1 次提交