1. 11 2月, 2016 8 次提交
  2. 10 2月, 2016 25 次提交
  3. 09 2月, 2016 7 次提交
    • D
      Merge branch 'tpacket-gso-csum-offload' · ef5c0e25
      David S. Miller 提交于
      Willem de Bruijn says:
      
      ====================
      packet: tpacket gso and csum offload
      
      Extend PACKET_VNET_HDR socket option support to packet sockets with
      memory mapped rings.
      
      Patches 2 and 4 add support to tpacket_rcv and tpacket_snd.
      
      Patch 1 prepares for this by moving the relevant virtio_net_hdr
      logic out of packet_snd and packet_rcv into helper functions.
      
      GSO transmission requires all headers in the skb linear section.
      Patch 3 moves parsing of tx_ring slot headers before skb allocation
      to enable allocation with sufficient linear size.
      
      Changes
        v1->v2:
          - fix bounds checks:
            - subtract sizeof(vnet_hdr) before comparing tp_len to size_max
            - compare tp_len to size_max also with GSO, just do not truncate to MTU
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ef5c0e25
    • W
      packet: tpacket_snd gso and checksum offload · 1d036d25
      Willem de Bruijn 提交于
      Support socket option PACKET_VNET_HDR together with PACKET_TX_RING.
      
      When enabled, a struct virtio_net_hdr is expected to precede the data
      in the ring. The vnet option must be set before the ring is created.
      
      The implementation reuses the existing skb_copy_bits code that is used
      when dev->hard_header_len is non-zero. Move this ll_header check to
      before the skb alloc and combine it with a test for vnet_hdr->hdr_len.
      Allocate and copy the max of the two.
      
      Verified with test program at
      github.com/wdebruij/kerneltools/blob/master/tests/psock_txring_vnet.c
      Signed-off-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1d036d25
    • W
      packet: parse tpacket header before skb alloc · 8d39b4a6
      Willem de Bruijn 提交于
      GSO packet headers must be stored in the linear skb segment.
      Move tpacket header parsing before sock_alloc_send_skb. The GSO
      follow-on patch will later increase the skb linear argument to
      sock_alloc_send_skb if needed for large packets.
      
      The header parsing code does not require an allocated skb, so is
      safe to move. Later pass to tpacket_fill_skb the computed data
      start and length.
      Signed-off-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8d39b4a6
    • W
      packet: vnet_hdr support for tpacket_rcv · 58d19b19
      Willem de Bruijn 提交于
      Support socket option PACKET_VNET_HDR together with PACKET_RX_RING.
      When enabled, a struct virtio_net_hdr will precede the data in the
      packet ring slots.
      
      Verified with test program at
      github.com/wdebruij/kerneltools/blob/master/tests/psock_rxring_vnet.c
      
        pkt: 1454269209.798420 len=5066
        vnet: gso_type=tcpv4 gso_size=1448 hlen=66 ecn=off
        csum: start=34 off=16
        eth: proto=0x800
        ip: src=<masked> dst=<masked> proto=6 len=5052
      Signed-off-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      58d19b19
    • W
      packet: move vnet_hdr code to helper functions · 16cc1400
      Willem de Bruijn 提交于
      packet_snd and packet_rcv support virtio net headers for GSO.
      Move this logic into helper functions to be able to reuse it in
      tpacket_snd and tpacket_rcv.
      
      This is a straighforward code move with one exception. Instead of
      creating and passing a separate gso_type variable, reuse
      vnet_hdr.gso_type after conversion from virtio to kernel gso type.
      Signed-off-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      16cc1400
    • N
      bonding: 3ad: apply ad_actor settings changes immediately · 5ee14e6d
      Nikolay Aleksandrov 提交于
      Currently the bonding allows to set ad_actor_system and prio while the
      bond device is down, but these are actually applied only if there aren't
      any slaves yet (applied to bond device when first slave shows up, and to
      slaves at 3ad bind time). After this patch changes are applied immediately
      and the new values can be used/seen after the bond's upped so it's not
      necessary anymore to release all and enslave again to see the changes.
      
      CC: Jay Vosburgh <j.vosburgh@gmail.com>
      CC: Veaceslav Falico <vfalico@gmail.com>
      CC: Andy Gospodarek <gospo@cumulusnetworks.com>
      Signed-off-by: NNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: NJay Vosburgh <jay.vosburgh@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5ee14e6d
    • D
      Merge branch 'bridge-mdb-entry-offload-flag' · a1b486ae
      David S. Miller 提交于
      Jiri Pirko says:
      
      ====================
      bridge: mdb: flag offloaded mdb entries
      
      This patchset extends uapi to let the user know if an mdb entry is offloaded.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a1b486ae