1. 02 7月, 2014 1 次提交
  2. 04 6月, 2014 1 次提交
  3. 31 5月, 2014 1 次提交
  4. 18 4月, 2014 1 次提交
  5. 26 3月, 2014 1 次提交
  6. 15 3月, 2014 1 次提交
  7. 28 2月, 2014 1 次提交
  8. 27 2月, 2014 2 次提交
  9. 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
  10. 19 2月, 2014 1 次提交
  11. 17 2月, 2014 1 次提交
  12. 13 2月, 2014 1 次提交
  13. 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
  14. 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
  15. 10 1月, 2014 1 次提交
  16. 27 12月, 2013 1 次提交
  17. 20 12月, 2013 1 次提交
  18. 19 12月, 2013 1 次提交
  19. 19 11月, 2013 1 次提交
  20. 29 10月, 2013 1 次提交
  21. 18 10月, 2013 1 次提交
    • E
      bnx2x: record rx queue for LRO packets · 60e66fee
      Eric Dumazet 提交于
      RPS support is kind of broken on bnx2x, because only non LRO packets
      get proper rx queue information. This triggers reorders, as it seems
      bnx2x like to generate a non LRO packet for segment including TCP PUSH
      flag : (this might be pure coincidence, but all the reorders I've
      seen involve segments with a PUSH)
      
      11:13:34.335847 IP A > B: . 415808:447136(31328) ack 1 win 457 <nop,nop,timestamp 3789336 3985797>
      11:13:34.335992 IP A > B: . 447136:448560(1424) ack 1 win 457 <nop,nop,timestamp 3789336 3985797>
      11:13:34.336391 IP A > B: . 448560:479888(31328) ack 1 win 457 <nop,nop,timestamp 3789337 3985797>
      11:13:34.336425 IP A > B: P 511216:512640(1424) ack 1 win 457 <nop,nop,timestamp 3789337 3985798>
      11:13:34.336423 IP A > B: . 479888:511216(31328) ack 1 win 457 <nop,nop,timestamp 3789337 3985798>
      11:13:34.336924 IP A > B: . 512640:543968(31328) ack 1 win 457 <nop,nop,timestamp 3789337 3985798>
      11:13:34.336963 IP A > B: . 543968:575296(31328) ack 1 win 457 <nop,nop,timestamp 3789337 3985798>
      
      We must call skb_record_rx_queue() to properly give to RPS (and more
      generally for TX queue selection on forward path) the receive queue
      information.
      
      Similar fix is needed for skb_mark_napi_id(), but will be handled
      in a separate patch to ease stable backports.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Willem de Bruijn <willemb@google.com>
      Cc: Eilon Greenstein <eilong@broadcom.com>
      Acked-by: NDmitry Kravkov <dmitry@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      60e66fee
  22. 01 10月, 2013 1 次提交
  23. 24 9月, 2013 1 次提交
  24. 14 9月, 2013 1 次提交
  25. 12 9月, 2013 1 次提交
    • M
      bnx2x: avoid atomic allocations during initialization · 996dedba
      Michal Schmidt 提交于
      During initialization bnx2x allocates significant amounts of memory
      (for rx data, rx SGEs, TPA pool) using atomic allocations.
      
      I received a report where bnx2x failed to allocate SGEs and it had
      to fall back to TPA-less operation.
      
      Let's use GFP_KERNEL allocations during initialization, which runs
      in process context. Add gfp_t parameters to functions that are used
      both in initialization and in the receive path.
      
      Use an unlikely branch in bnx2x_frag_alloc() to avoid atomic allocation
      by netdev_alloc_frag(). The branch is taken several thousands of times
      during initialization, but then never more. Note that fp->rx_frag_size
      is never greater than PAGE_SIZE, so __get_free_page() can be used here.
      Signed-off-by: NMichal Schmidt <mschmidt@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      996dedba
  26. 06 9月, 2013 2 次提交
  27. 28 8月, 2013 2 次提交
  28. 02 8月, 2013 2 次提交
    • Y
      bnx2x: Revising locking scheme for MAC configuration · 8b09be5f
      Yuval Mintz 提交于
      On very rare occasions, repeated load/unload stress test in the presence of
      our storage driver (bnx2i/bnx2fc) causes a kernel panic in bnx2x code
      (NULL pointer dereference). Stack traces indicate the issue happens during MAC
      configuration; thorough code review showed that indeed several races exist
      in which one thread can iterate over the list of configured MACs while another
      deletes entries from the same list.
      
      This patch adds a varient on the single-writer/Multiple-reader lock mechanism -
      It utilizes an already exsiting bottom-half lock, using it so that Whenever
      a writer is unable to continue due to the existence of another writer/reader,
      it pends its request for future deliverance.
      The writer / last readers will check for the existence of such requests and
      perform them instead of the original initiator.
      This prevents the writer from having to sleep while waiting for the lock
      to be accessible, which might cause deadlocks given the locks already
      held by the writer.
      
      Another result of this patch is that setting of Rx Mode is now made in
      sleepable context - Setting of Rx Mode is made under a bottom-half lock, which
      was always nontrivial for the bnx2x driver, as the HW/FW configuration requires
      wait for completions.
      Since sleep was impossible (due to the sleepless-context), various mechanisms
      were utilized to prevent the calling thread from sleep, but the truth was that
      when the caller thread (i.e, the one calling ndo_set_rx_mode()) returned, the
      Rx mode was still not set in HW/FW.
      
      bnx2x_set_rx_mode() will now overtly schedule for the Rx changes to be
      configured by the sp_rtnl_task which hold the RTNL lock and is sleepable
      context.
      Signed-off-by: NYuval Mintz <yuvalmin@broadcom.com>
      Signed-off-by: NAriel Elior <ariele@broadcom.com>
      Signed-off-by: NEilon Greenstein <eilong@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8b09be5f
    • C
      net: rename CONFIG_NET_LL_RX_POLL to CONFIG_NET_RX_BUSY_POLL · e0d1095a
      Cong Wang 提交于
      Eliezer renames several *ll_poll to *busy_poll, but forgets
      CONFIG_NET_LL_RX_POLL, so in case of confusion, rename it too.
      
      Cc: Eliezer Tamir <eliezer.tamir@linux.intel.com>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: NCong Wang <amwang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e0d1095a
  29. 12 7月, 2013 1 次提交
  30. 11 7月, 2013 2 次提交
  31. 25 6月, 2013 1 次提交
  32. 24 6月, 2013 1 次提交
  33. 20 6月, 2013 2 次提交