1. 08 3月, 2013 22 次提交
    • D
      sfc: allocate more RX buffers per page · 1648a23f
      Daniel Pieczko 提交于
      Allocating 2 buffers per page is insanely inefficient when MTU is 1500
      and PAGE_SIZE is 64K (as it usually is on POWER).  Allocate as many as
      we can fit, and choose the refill batch size at run-time so that we
      still always use a whole page at once.
      
      [bwh: Fix loop condition to allow for compound pages; rebase]
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      1648a23f
    • B
      sfc: Replace efx_rx_is_last_buffer() with a flag · 179ea7f0
      Ben Hutchings 提交于
      This condition is brittle and we have lots of flags to spare.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      179ea7f0
    • D
      sfc: reuse pages to avoid DMA mapping/unmapping costs · 2768935a
      Daniel Pieczko 提交于
      On POWER systems, DMA mapping/unmapping operations are very expensive.
      These changes reduce these costs by trying to reuse DMA mapped pages.
      
      After all the buffers associated with a page have been processed and
      passed up, the page is placed into a ring (if there is room).  For
      each page that is required for a refill operation, a page in the ring
      is examined to determine if its page count has fallen to 1, ie. the
      kernel has released its reference to these packets.  If this is the
      case, the page can be immediately added back into the RX descriptor
      ring, without having to re-map it for DMA.
      
      If the kernel is still holding a reference to this page, it is removed
      from the ring and unmapped for DMA.  Then a new page, which can
      immediately be used by RX buffers in the descriptor ring, is allocated
      and DMA mapped.
      
      The time a page needs to spend in the recycle ring before the kernel
      has released its page references is based on the number of buffers
      that use this page.  As large pages can hold more RX buffers, the RX
      recycle ring can be shorter.  This reduces memory usage on POWER
      systems, while maintaining the performance gain achieved by recycling
      pages, following the driver change to pack more than two RX buffers
      into large pages.
      
      When an IOMMU is not present, the recycle ring can be small to reduce
      memory usage, since DMA mapping operations are inexpensive.
      
      With a small recycle ring, attempting to refill the descriptor queue
      with more buffers than the equivalent size of the recycle ring could
      ultimately lead to memory leaks if page entries in the recycle ring
      were overwritten.  To prevent this, the check to see if the recycle
      ring is full is changed to check if the next entry to be written is
      NULL.
      
      [bwh: Combine and rebase several commits so this is complete
       before the following buffer-packing changes.  Remove module
       parameter.]
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      2768935a
    • B
      sfc: Enable RX DMA scattering where possible · 85740cdf
      Ben Hutchings 提交于
      Enable RX DMA scattering iff an RX buffer large enough for the current
      MTU will not fit into a single page and the NIC supports DMA
      scattering for kernel-mode RX queues.
      
      On Falcon and Siena, the RX_USR_BUF_SIZE field is used as the DMA
      limit for both all RX queues with scatter enabled.  Set it to 1824,
      matching what Onload uses now.
      
      Maintain a statistic for frames truncated due to lack of descriptors
      (rx_nodesc_trunc).  This is distinct from rx_frm_trunc which may be
      incremented when scattering is disabled and implies an over-length
      frame.
      
      Whenever an MTU change causes scattering to be turned on or off,
      update filters that point to the PF queues, but leave others
      unchanged, as VF drivers assume scattering is off.
      
      Add n_frags parameters to various functions, and make them iterate:
      - efx_rx_packet()
      - efx_recycle_rx_buffers()
      - efx_rx_mk_skb()
      - efx_rx_deliver()
      
      Make efx_handle_rx_event() responsible for updating
      efx_rx_queue::removed_count.
      
      Change the RX pipeline state to a starting ring index and number of
      fragments, and make __efx_rx_packet() responsible for clearing it.
      
      Based on earlier versions by David Riddoch and Jon Cooper.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      85740cdf
    • B
      sfc: Update RX buffer address together with length · b74e3e8c
      Ben Hutchings 提交于
      Adjust rx_buf->page_offset when we eat the RX hash prefix.  Remove
      efx_rx_buf_offset(), which is now redundant.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      b74e3e8c
    • B
      sfc: Explicitly prefetch RX hash prefix, not just Ethernet heade · 5036b7c7
      Ben Hutchings 提交于
      Currently we prefetch from the Ethernet header, but we will also read
      the hash prefix.  In practice they should be in the same cache line
      and this won't hurt, but it is still pointless to add on the hash
      prefix size.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      5036b7c7
    • B
      sfc: Replace efx_rx_buf_eh() with simpler efx_rx_buf_va() · b184f16b
      Ben Hutchings 提交于
      efx_rx_buf_va() returns the virtual address of the current start of
      the buffer.  The callers must add the hash prefix size themselves.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      b184f16b
    • B
      sfc: Wrap __efx_rx_packet() with efx_rx_flush_packet() · ff734ef4
      Ben Hutchings 提交于
      The pipeline mechanism will need to change a bit for scattered
      packets.  Add a wrapper to insulate efx_process_channel() from this.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      ff734ef4
    • B
    • B
      sfc: Properly distinguish RX buffer and DMA lengths · 272baeeb
      Ben Hutchings 提交于
      Replace efx_nic::rx_buffer_len with efx_nic::rx_dma_len, the maximum
      RX DMA length.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      272baeeb
    • B
    • A
      sfc: Add AER and EEH support for Siena · 626950db
      Alexandre Rames 提交于
      The Linux side of EEH is triggered by MMIO reads, but this
      driver's data path does not issue any MMIO reads (except in
      legacy interrupt mode).  Therefore add a monitor function
      to poll EEH periodically.
      
      When preparing to reset the device based on our own error
      detection, also poll EEH and defer to its recovery mechanism
      if appropriate.
      
      [bwh: Use a separate condition for the initial link poll; fix some
       style errors]
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      626950db
    • B
      sfc: Disable RSS when using SR-IOV and only 1 RX queue on the PF · 634ab72c
      Ben Hutchings 提交于
      On Siena, VFs share RSS configuration with the PF.  We attempted to
      support configurations where the PF only uses 1 RX queue and VFs use
      multiple RX queues, by (1) setting up RSS for the number of RX queues
      per VF (2) disabling RSS in the PF's RX default filters.
      
      Unfortunately commit cd2d5b52 ('sfc: Add SR-IOV back-end support
      for SFC9000 family') only included (1).  This is (2).
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      634ab72c
    • B
      sfc: Fix replacement detection in efx_filter_insert_filter() · d9ccfdd4
      Ben Hutchings 提交于
      efx_filter_insert_filter() uses the first table entry in the hash chain
      that either has the same match values or is empty.  This means that
      replacement doesn't always work correctly:
      
      1. Insert filter F1 with match values M1, hashing to H1, at first
         possible entry E1.
      2. Insert filter F2 with match values M2, hashing to H1, at second
         possible entry E2.
      3. Remove filter F1.
      4. Insert filter F3 with match values M2, hashing to H1, at first
         possible entry E1.
      
      F3 should have either replaced F2 or been rejected (depending on
      priority and the replace_equal parameter).
      
      Instead, search for both a matching filter that the inserted filter
      would replace, and an available insertion point, up to the applicable
      maximum search depths.  If we insert at lower depth than a replaced
      filter, clear the replaced filter.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      d9ccfdd4
    • B
      sfc: Merge efx_filter_search() into efx_filter_insert() · 297891ce
      Ben Hutchings 提交于
      efx_filter_search() is only called from efx_filter_insert(), and
      neither function is very long.  The following bug fix requires a more
      sophisticated search with a third result, which is going to be easier
      to implement as part of the same function.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      297891ce
    • B
      sfc: Don't use efx_filter_{build,hash,increment}() for default MAC filters · 385904f8
      Ben Hutchings 提交于
      These functions happen to work for default MAC filters: they generate
      an initial index of 1/0 for unicast/multicast respectively and an
      increment of 1 for either, so a search succeeds at depth 2.  But this
      is a matter of luck rather than design, and it really won't work well
      with the bug fix we're about to do.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      385904f8
    • B
      sfc: Remove redundant parameter to efx_filter_search() · e3a699fa
      Ben Hutchings 提交于
      The 'for_insert' parameter is redundant since there are no longer
      any other operations that need to search based on a filter spec.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      e3a699fa
    • B
      sfc: More sensible semantics for efx_filter_insert_filter() replace flag · 7de07a4d
      Ben Hutchings 提交于
      The 'replace' flag to efx_filter_insert_filter() controls whether the
      new filter may replace *any* filter, and is checked even before
      priority comparison.  But lower-priority filters should never
      block insertion of higher-priority filters.
      
      Change the priority checking so that lower-priority filters are
      replaced regardless of the value of the flag, and rename the
      flag to 'replace_equal'.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      7de07a4d
    • A
      sfc: Remove rx_alloc_method SKB · 97d48a10
      Alexandre Rames 提交于
      [bwh: Remove more dead code, and make efx_ptp_rx() pull the data it
       needs into the header area.]
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      97d48a10
    • L
    • L
      sfc: PTP changes to support improved UUID filtering mode · c939a316
      Laurence Evans 提交于
      There is a long-standing problem with the packet-timestamp matching in
      the driver. When a PTP packet is received by the MC, the FPGA
      timestamps the packet and the MC sends the timestamp and 6 bytes of
      the UUID to the driver. The driver then matches the timestamp against
      received packets using the same 6 bytes of UUID.
      
      The problem comes from the choice of which 6 bytes to use. The PTP
      spec is slightly contradictory and misleading in one of the two places
      where the UUIDs are discussed. From section 7.2.2.2 of the spec, a
      PTPD2 UUID can be either a EUI-64 or a EUI-64 constructed from a
      EUI-48. The typical ethernet based implementation uses a EUI-64
      constructed from a EUI-48. This works by taking the first 3 bytes of
      the MAC address of the NIC being used for PTP (the OUI), then
      inserting 0xFF, 0xFE, then taking the last 3 bytes of the MAC address
      giving
                MAC[0], MAC[1], MAC[2], 0xFF, 0xFE, MAC[3], MAC[4], MAC[5]
      The current MC firmware and driver discard the first two bytes of this
      UUID and packets are matched against timestamps using bytes 2 to 7 so
      there is a small risk that in a deployment of Solarflare PTP NICs used
      with other vendors NICs, that a PTP packet could be matched against
      the wrong timestamp. This applies to all other organisations whose
      third byte of the OUI is 0x53. It's a long list but I notice that it
      includes Cisco.
      
      The necessary modifications to use bytes 0-2 and 5-7 of the UUID to
      match against are quite small but introduce incompatibility between
      older version of the firmware and driver.
      
      When PTP is enabled via SO_TIMESTAMPING specifying PTP V2, the driver
      will try to enable PTP in the firmware using the enhanced mode
      (above). If the firmware returns an error, the driver will enable PTP
      in the firmware using the old mode.
      
      [bwh: Fix some style errors; remove private ioctl bits]
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      c939a316
    • B
      sfc: Allow efx_channel_type::receive_skb() to reject a packet · 4a74dc65
      Ben Hutchings 提交于
      Instead of having efx_ptp_rx() call netif_receive_skb() for an invalid
      PTP packet, make it return false for rejected packets and have
      efx_rx_deliver() pass them up.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      4a74dc65
  2. 07 3月, 2013 3 次提交
  3. 06 3月, 2013 4 次提交
  4. 05 3月, 2013 2 次提交
    • F
      net: fec: fix build error in no MXC platform · acac8406
      Frank Li 提交于
      build error cause by
      Commit ff43da86
      ("NET: FEC: dynamtic check DMA desc buff type")
      
      drivers/net/ethernet/freescale/fec.c: In function ‘fec_enet_get_nextdesc’:
      drivers/net/ethernet/freescale/fec.c:215:18: error: invalid use of undefined type ‘struct bufdesc_ex’
      drivers/net/ethernet/freescale/fec.c: In function ‘fec_enet_get_prevdesc’:
      drivers/net/ethernet/freescale/fec.c:224:18: error: invalid use of undefined type ‘struct bufdesc_ex’
      drivers/net/ethernet/freescale/fec.c: In function ‘fec_enet_start_xmit’:
      drivers/net/ethernet/freescale/fec.c:286:37: error: arithmetic on pointer to an incomplete type
      drivers/net/ethernet/freescale/fec.c:287:13: error: arithmetic on pointer to an incomplete type
      drivers/net/ethernet/freescale/fec.c:324:7: error: dereferencing pointer to incomplete type etc....
      Signed-off-by: NFrank Li <Frank.Li@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      acac8406
    • F
      net: fec: put tx to napi poll function to fix dead lock · de5fb0a0
      Frank Li 提交于
      up stack ndo_start_xmit already hold lock.
      fec_enet_start_xmit needn't spin lock.
      stat_xmit just update fep->cur_tx
      fec_enet_tx just update fep->dirty_tx
      
      Reserve a empty bdb to check full or empty
      cur_tx == dirty_tx    means full
      cur_tx == dirty_tx +1 means empty
      
      So needn't is_full variable.
      
      Fix spin lock deadlock
      
      =================================
      [ INFO: inconsistent lock state ]
      3.8.0-rc5+ #107 Not tainted
      ---------------------------------
      inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
      ptp4l/615 [HC1[1]:SC0[0]:HE0:SE1] takes:
       (&(&list->lock)->rlock#3){?.-...}, at: [<8042c3c4>] skb_queue_tail+0x20/0x50
       {HARDIRQ-ON-W} state was registered at:
       [<80067250>] mark_lock+0x154/0x4e8
       [<800676f4>] mark_irqflags+0x110/0x1a4
       [<80069208>] __lock_acquire+0x494/0x9c0
       [<80069ce8>] lock_acquire+0x90/0xa4
       [<80527ad0>] _raw_spin_lock_bh+0x44/0x54
       [<804877e0>] first_packet_length+0x38/0x1f0
       [<804879e4>] udp_poll+0x4c/0x5c
       [<804231f8>] sock_poll+0x24/0x28
       [<800d27f0>] do_poll.isra.10+0x120/0x254
       [<800d36e4>] do_sys_poll+0x15c/0x1e8
       [<800d3828>] sys_poll+0x60/0xc8
       [<8000e780>] ret_fast_syscall+0x0/0x3c
      
       *** DEADLOCK ***
      
       1 lock held by ptp4l/615:
        #0:  (&(&fep->hw_lock)->rlock){-.-...}, at: [<80355f9c>] fec_enet_tx+0x24/0x268
        stack backtrace:
        Backtrace:
        [<800121e0>] (dump_backtrace+0x0/0x10c) from [<80516210>] (dump_stack+0x18/0x1c)
        r6:8063b1fc r5:bf38b2f8 r4:bf38b000 r3:bf38b000
        [<805161f8>] (dump_stack+0x0/0x1c) from [<805189d0>] (print_usage_bug.part.34+0x164/0x1a4)
        [<8051886c>] (print_usage_bug.part.34+0x0/0x1a4) from [<80518a88>] (print_usage_bug+0x78/0x88)
        r8:80065664 r7:bf38b2f8 r6:00000002 r5:00000000 r4:bf38b000
        [<80518a10>] (print_usage_bug+0x0/0x88) from [<80518b58>] (mark_lock_irq+0xc0/0x270)
        r7:bf38b000 r6:00000002 r5:bf38b2f8 r4:00000000
        [<80518a98>] (mark_lock_irq+0x0/0x270) from [<80067270>] (mark_lock+0x174/0x4e8)
        [<800670fc>] (mark_lock+0x0/0x4e8) from [<80067744>] (mark_irqflags+0x160/0x1a4)
        [<800675e4>] (mark_irqflags+0x0/0x1a4) from [<80069208>] (__lock_acquire+0x494/0x9c0)
        r5:00000002 r4:bf38b2f8
        [<80068d74>] (__lock_acquire+0x0/0x9c0) from [<80069ce8>] (lock_acquire+0x90/0xa4)
        [<80069c58>] (lock_acquire+0x0/0xa4) from [<805278d8>] (_raw_spin_lock_irqsave+0x4c/0x60)
        [<8052788c>] (_raw_spin_lock_irqsave+0x0/0x60) from [<8042c3c4>] (skb_queue_tail+0x20/0x50)
        r6:bfbb2180 r5:bf1d0190 r4:bf1d0184
        [<8042c3a4>] (skb_queue_tail+0x0/0x50) from [<8042c4cc>] (sock_queue_err_skb+0xd8/0x188)
        r6:00000056 r5:bfbb2180 r4:bf1d0000 r3:00000000
        [<8042c3f4>] (sock_queue_err_skb+0x0/0x188) from [<8042d15c>] (skb_tstamp_tx+0x70/0xa0)
        r6:bf0dddb0 r5:bf1d0000 r4:bfbb2180 r3:00000004
        [<8042d0ec>] (skb_tstamp_tx+0x0/0xa0) from [<803561d0>] (fec_enet_tx+0x258/0x268)
        r6:c089d260 r5:00001c00 r4:bfbd0000
        [<80355f78>] (fec_enet_tx+0x0/0x268) from [<803562cc>] (fec_enet_interrupt+0xec/0xf8)
        [<803561e0>] (fec_enet_interrupt+0x0/0xf8) from [<8007d5b0>] (handle_irq_event_percpu+0x54/0x1a0)
        [<8007d55c>] (handle_irq_event_percpu+0x0/0x1a0) from [<8007d740>] (handle_irq_event+0x44/0x64)
        [<8007d6fc>] (handle_irq_event+0x0/0x64) from [<80080690>] (handle_fasteoi_irq+0xc4/0x15c)
        r6:bf0dc000 r5:bf811290 r4:bf811240 r3:00000000
        [<800805cc>] (handle_fasteoi_irq+0x0/0x15c) from [<8007ceec>] (generic_handle_irq+0x28/0x38)
        r5:807130c8 r4:00000096
        [<8007cec4>] (generic_handle_irq+0x0/0x38) from [<8000f16c>] (handle_IRQ+0x54/0xb4)
        r4:8071d280 r3:00000180
        [<8000f118>] (handle_IRQ+0x0/0xb4) from [<80008544>] (gic_handle_irq+0x30/0x64)
        r8:8000e924 r7:f4000100 r6:bf0ddef8 r5:8071c974 r4:f400010c
        r3:00000000
        [<80008514>] (gic_handle_irq+0x0/0x64) from [<8000e2e4>] (__irq_svc+0x44/0x5c)
        Exception stack(0xbf0ddef8 to 0xbf0ddf40)
      Signed-off-by: NFrank Li <Frank.Li@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      de5fb0a0
  5. 01 3月, 2013 5 次提交
  6. 28 2月, 2013 2 次提交
    • S
      hlist: drop the node parameter from iterators · b67bfe0d
      Sasha Levin 提交于
      I'm not sure why, but the hlist for each entry iterators were conceived
      
              list_for_each_entry(pos, head, member)
      
      The hlist ones were greedy and wanted an extra parameter:
      
              hlist_for_each_entry(tpos, pos, head, member)
      
      Why did they need an extra pos parameter? I'm not quite sure. Not only
      they don't really need it, it also prevents the iterator from looking
      exactly like the list iterator, which is unfortunate.
      
      Besides the semantic patch, there was some manual work required:
      
       - Fix up the actual hlist iterators in linux/list.h
       - Fix up the declaration of other iterators based on the hlist ones.
       - A very small amount of places were using the 'node' parameter, this
       was modified to use 'obj->member' instead.
       - Coccinelle didn't handle the hlist_for_each_entry_safe iterator
       properly, so those had to be fixed up manually.
      
      The semantic patch which is mostly the work of Peter Senna Tschudin is here:
      
      @@
      iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;
      
      type T;
      expression a,c,d,e;
      identifier b;
      statement S;
      @@
      
      -T b;
          <+... when != b
      (
      hlist_for_each_entry(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_continue(a,
      - b,
      c) S
      |
      hlist_for_each_entry_from(a,
      - b,
      c) S
      |
      hlist_for_each_entry_rcu(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_rcu_bh(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_continue_rcu_bh(a,
      - b,
      c) S
      |
      for_each_busy_worker(a, c,
      - b,
      d) S
      |
      ax25_uid_for_each(a,
      - b,
      c) S
      |
      ax25_for_each(a,
      - b,
      c) S
      |
      inet_bind_bucket_for_each(a,
      - b,
      c) S
      |
      sctp_for_each_hentry(a,
      - b,
      c) S
      |
      sk_for_each(a,
      - b,
      c) S
      |
      sk_for_each_rcu(a,
      - b,
      c) S
      |
      sk_for_each_from
      -(a, b)
      +(a)
      S
      + sk_for_each_from(a) S
      |
      sk_for_each_safe(a,
      - b,
      c, d) S
      |
      sk_for_each_bound(a,
      - b,
      c) S
      |
      hlist_for_each_entry_safe(a,
      - b,
      c, d, e) S
      |
      hlist_for_each_entry_continue_rcu(a,
      - b,
      c) S
      |
      nr_neigh_for_each(a,
      - b,
      c) S
      |
      nr_neigh_for_each_safe(a,
      - b,
      c, d) S
      |
      nr_node_for_each(a,
      - b,
      c) S
      |
      nr_node_for_each_safe(a,
      - b,
      c, d) S
      |
      - for_each_gfn_sp(a, c, d, b) S
      + for_each_gfn_sp(a, c, d) S
      |
      - for_each_gfn_indirect_valid_sp(a, c, d, b) S
      + for_each_gfn_indirect_valid_sp(a, c, d) S
      |
      for_each_host(a,
      - b,
      c) S
      |
      for_each_host_safe(a,
      - b,
      c, d) S
      |
      for_each_mesh_entry(a,
      - b,
      c, d) S
      )
          ...+>
      
      [akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
      [akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
      [akpm@linux-foundation.org: checkpatch fixes]
      [akpm@linux-foundation.org: fix warnings]
      [akpm@linux-foudnation.org: redo intrusive kvm changes]
      Tested-by: NPeter Senna Tschudin <peter.senna@gmail.com>
      Acked-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: NSasha Levin <sasha.levin@oracle.com>
      Cc: Wu Fengguang <fengguang.wu@intel.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Gleb Natapov <gleb@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b67bfe0d
    • D
      bnx2x: fix UDP checksum for 57710/57711. · e2593fcd
      Dmitry Kravkov 提交于
      Since commit 86564c3f "bnx2x: Remove many sparse warnings" UDP
      csum offload is broken for 57710/57711. Fix return value.
      Signed-off-by: NDmitry Kravkov <dmitry@broadcom.com>
      CC: Ariel Elior <ariele@broadcom.com>
      CC: Yuval Mintz <yuvalmin@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e2593fcd
  7. 27 2月, 2013 1 次提交
  8. 26 2月, 2013 1 次提交
    • B
      sfc: Detach net device when stopping queues for reconfiguration · 29c69a48
      Ben Hutchings 提交于
      We must only ever stop TX queues when they are full or the net device
      is not 'ready' so far as the net core, and specifically the watchdog,
      is concerned.  Otherwise, the watchdog may fire *immediately* if no
      packets have been added to the queue in the last 5 seconds.
      
      The device is ready if all the following are true:
      
      (a) It has a qdisc
      (b) It is marked present
      (c) It is running
      (d) The link is reported up
      
      (a) and (c) are normally true, and must not be changed by a driver.
      (d) is under our control, but fake link changes may disturb userland.
      This leaves (b).  We already mark the device absent during reset
      and self-test, but we need to do the same during MTU changes and ring
      reallocation.  We don't need to do this when the device is brought
      down because then (c) is already false.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      29c69a48