1. 08 3月, 2013 2 次提交
    • 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 2 次提交
  3. 26 2月, 2013 3 次提交
    • 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
    • B
      sfc: Fix efx_rx_buf_offset() in the presence of swiotlb · b590ace0
      Ben Hutchings 提交于
      We assume that the mapping between DMA and virtual addresses is done
      on whole pages, so we can find the page offset of an RX buffer using
      the lower bits of the DMA address.  However, swiotlb maps in units of
      2K, breaking this assumption.
      
      Add an explicit page_offset field to struct efx_rx_buffer.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      b590ace0
    • B
      sfc: Properly sync RX DMA buffer when it is not the last in the page · 3a68f19d
      Ben Hutchings 提交于
      We may currently allocate two RX DMA buffers to a page, and only unmap
      the page when the second is completed.  We do not sync the first RX
      buffer to be completed; this can result in packet loss or corruption
      if the last RX buffer completed in a NAPI poll is the first in a page
      and is not DMA-coherent.  (In the middle of a NAPI poll, we will
      handle the following RX completion and unmap the page *before* looking
      at the content of the first buffer.)
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      3a68f19d
  4. 22 1月, 2013 1 次提交
  5. 08 12月, 2012 1 次提交
  6. 04 12月, 2012 1 次提交
  7. 01 12月, 2012 13 次提交
  8. 20 11月, 2012 1 次提交
  9. 03 11月, 2012 1 次提交
  10. 01 11月, 2012 1 次提交
  11. 08 10月, 2012 1 次提交
  12. 06 10月, 2012 1 次提交
  13. 02 10月, 2012 6 次提交
  14. 23 9月, 2012 1 次提交
  15. 19 9月, 2012 5 次提交