1. 04 9月, 2014 16 次提交
  2. 03 9月, 2014 21 次提交
  3. 02 9月, 2014 3 次提交
    • W
      sock: deduplicate errqueue dequeue · 364a9e93
      Willem de Bruijn 提交于
      sk->sk_error_queue is dequeued in four locations. All share the
      exact same logic. Deduplicate.
      
      Also collapse the two critical sections for dequeue (at the top of
      the recv handler) and signal (at the bottom).
      
      This moves signal generation for the next packet forward, which should
      be harmless.
      
      It also changes the behavior if the recv handler exits early with an
      error. Previously, a signal for follow-up packets on the errqueue
      would then not be scheduled. The new behavior, to always signal, is
      arguably a bug fix.
      
      For rxrpc, the change causes the same function to be called repeatedly
      for each queued packet (because the recv handler == sk_error_report).
      It is likely that all packets will fail for the same reason (e.g.,
      memory exhaustion).
      
      This code runs without sk_lock held, so it is not safe to trust that
      sk->sk_err is immutable inbetween releasing q->lock and the subsequent
      test. Introduce int err just to avoid this potential race.
      Signed-off-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      364a9e93
    • W
      net-timestamp: expand documentation · 8fe2f761
      Willem de Bruijn 提交于
      Expand Documentation/networking/timestamping.txt with new
      interfaces and bytestream timestamping. Also minor
      cleanup of the other text.
      
      Import txtimestamp.c test of the new features.
      Signed-off-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8fe2f761
    • D
      Merge branch 'csums-next' · c5a65680
      David S. Miller 提交于
      Tom Herbert says:
      
      ====================
      net: Checksum offload changes - Part VI
      
      I am working on overhauling RX checksum offload. Goals of this effort
      are:
      
      - Specify what exactly it means when driver returns CHECKSUM_UNNECESSARY
      - Preserve CHECKSUM_COMPLETE through encapsulation layers
      - Don't do skb_checksum more than once per packet
      - Unify GRO and non-GRO csum verification as much as possible
      - Unify the checksum functions (checksum_init)
      - Simplify code
      
      What is in this seventh patch set:
      
      - Add skb->csum. This allows a device or GRO to indicate that an
        invalid checksum was detected.
      - Checksum unncessary to checksum complete conversions.
      
      With these changes, I believe that the third goal of the overhaul is
      now mostly achieved. In the case of no encapsulation or one layer of
      encapsulation, there should only be at most one skb_checksum over
      each packet (between GRO and normal path). In the case of two layers
      of encapsulation, it is still possible with the right combination of
      non-zero and zero UDP checksums to have >1 skb_checksum. For instance:
      IP>GRE(with csum)>IP>UDP(zero csum)>VXLAN>IP>UDP(non-zero csum),
      would likely necessiate an skb_checksum in GRO and normal path.
      This doesn't seem like a common scenario at all so I'm inclined to
      not address this now, if multiple layers of encapsulation becomes
      popular we can reassess.
      
      Note that checksum conversion shows a nice improvement for RX VXLAN when
      outer UDP checksum is enabled (12.65% CPU compared to 20.94%). This
      is not only from the fact that we don't need checksum calculation on
      the host, but also allows GRO for VXLAN in this case. Checksum
      conversion does not help send side (which still needs to perform
      a checksum on host). For that we will implement remote checksum offload
      in a later patch
      (http://tools.ietf.org/html/draft-herbert-remotecsumoffload-00).
      
      Please review carefully and test if possible, mucking with basic
      checksum functions is always a little precarious :-)
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c5a65680