10 Feb, 2016

9 commits

  • batman-adv uses a self-written reference implementation which is just based
    on atomic_t. This is less obvious when reading the code than kref and
    therefore increases the change that the reference counting will be missed.

    Signed-off-by: Sven Eckelmann
    Signed-off-by: Marek Lindner
    Signed-off-by: Antonio Quartulli

    Sven Eckelmann
     
  • batman-adv uses a self-written reference implementation which is just based
    on atomic_t. This is less obvious when reading the code than kref and
    therefore increases the change that the reference counting will be missed.

    Signed-off-by: Sven Eckelmann
    Signed-off-by: Marek Lindner
    Signed-off-by: Antonio Quartulli

    Sven Eckelmann
     
  • The batadv_tvlv_container* functions state in their kernel-doc that they
    require tvlv.container_list_lock. Add an assert to automatically detect
    when this might have been ignored by the caller.

    Signed-off-by: Sven Eckelmann
    Signed-off-by: Marek Lindner
    Signed-off-by: Antonio Quartulli

    Sven Eckelmann
     
  • To allow future use of the window protected function with different
    maximum sequence numbers, add a parameter to set this value which
    was previously hardcoded. Another parameter added for future use is a
    flag to return whether the protection window has started.

    While at it, also fix the kerneldoc.

    Signed-off-by: Simon Wunderlich
    Signed-off-by: Marek Lindner
    Signed-off-by: Antonio Quartulli

    Simon Wunderlich
     
  • The references to the network device should be dropped inside the release
    function for batadv_hard_iface similar to what is done with the batman-adv
    internal datastructures.

    Signed-off-by: Sven Eckelmann
    Signed-off-by: Marek Lindner
    Signed-off-by: Antonio Quartulli

    Sven Eckelmann
     
  • Remove the unused code of sxgbe_xpcs.

    Reported-by: Julia Lawall
    Suggested-by: David S. Miller
    Signed-off-by: Jean Sacren
    Cc: Byungho An
    Cc: Girish K S
    Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1601191918470.2531@hadrien
    Signed-off-by: David S. Miller

    Jean Sacren
     
  • Sergei Shtylyov says:

    ====================
    Factor out register bit twiddling in the Renesas Ethernet drivers

    Here's a set of 2 patches against DaveM's 'net-next.git' repo. We factor out
    the often repeated pattern of reading a register, AND'ing and/or OR'ing some
    bits, and then writing the value back.

    [1/2] ravb: factor out register bit twiddling code
    [2/2] sh_eth: factor out register bit twiddling code
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • The driver has often repeated pattern of reading a register, AND'ing and/or
    OR'ing some bits and writing the value back. Factor the pattern out into
    sh_eth_modify() -- this saves 84 bytes of code with ARM gcc 4.7.3.

    While at it, update Cogent Embedded's copyright.

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: David S. Miller

    Sergei Shtylyov
     
  • The driver has often repeated pattern of reading a register, AND'ing and/or
    OR'ing some bits and writing the value back. Factor the pattern out into
    ravb_modify() -- this saves 260 bytes of code with ARM gcc 4.7.3.

    While at it, update Cogent Embedded's copyrights.

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: David S. Miller

    Sergei Shtylyov
     

09 Feb, 2016

10 commits

  • 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: David S. Miller

    David S. Miller
     
  • 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: Willem de Bruijn
    Signed-off-by: David S. Miller

    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: Willem de Bruijn
    Signed-off-by: David S. Miller

    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= dst= proto=6 len=5052

    Signed-off-by: Willem de Bruijn
    Signed-off-by: David S. Miller

    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: Willem de Bruijn
    Signed-off-by: David S. Miller

    Willem de Bruijn
     
  • 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
    CC: Veaceslav Falico
    CC: Andy Gospodarek
    Signed-off-by: Nikolay Aleksandrov
    Signed-off-by: Jay Vosburgh
    Signed-off-by: David S. Miller

    Nikolay Aleksandrov
     
  • 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: David S. Miller

    David S. Miller
     
  • Passing the port-group to br_mdb in order to allow direct access to the
    structure. br_mdb will later use the structure to reflect HW reflection
    status via "state" variable.

    Signed-off-by: Elad Raz
    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Elad Raz
     
  • Change net_bridge_port_group 'state' member to 'flags' and define new set
    of flags internal to the kernel.

    Signed-off-by: Elad Raz
    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Elad Raz
     
  • Add new bitmask member 'flags' to br_mdb_entry structure. Adding
    MDB_FLAGS_OFFLOAD bit which indicates MDB entries is offloaded to hardware.

    Signed-off-by: Elad Raz
    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Elad Raz
     

08 Feb, 2016

21 commits