21 Mar, 2016

1 commit

  • If a packet is either locally encapsulated or processed through GRO
    it is marked with the offloads that it requires. However, when it is
    decapsulated these tunnel offload indications are not removed. This
    means that if we receive an encapsulated TCP packet, aggregate it with
    GRO, decapsulate, and retransmit the resulting frame on a NIC that does
    not support encapsulation, we won't be able to take advantage of hardware
    offloads even though it is just a simple TCP packet at this point.

    This fixes the problem by stripping off encapsulation offload indications
    when packets are decapsulated.

    The performance impacts of this bug are significant. In a test where a
    Geneve encapsulated TCP stream is sent to a hypervisor, GRO'ed, decapsulated,
    and bridged to a VM performance is improved by 60% (5Gbps->8Gbps) as a
    result of avoiding unnecessary segmentation at the VM tap interface.

    Reported-by: Ramu Ramamurthy
    Fixes: 68c33163 ("v4 GRE: Add TCP segmentation offload for GRE")
    Signed-off-by: Jesse Gross
    Signed-off-by: David S. Miller

    Jesse Gross
     

19 Feb, 2016

1 commit


17 Feb, 2016

1 commit

  • The current ip_tunnel cache implementation is prone to a race
    that will cause the wrong dst to be cached on cuncurrent dst cache
    miss and ip tunnel update via netlink.

    Replacing with the generic implementation fix the issue.

    Signed-off-by: Paolo Abeni
    Suggested-and-acked-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Paolo Abeni
     

12 Feb, 2016

1 commit


26 Jan, 2016

1 commit


26 Dec, 2015

1 commit


03 Nov, 2015

1 commit

  • sit0 device allocates its percpu storage twice :
    - One time in ipip6_tunnel_init()
    - One time in ipip6_fb_tunnel_init()

    Thus we leak 48 bytes per possible cpu per network namespace dismantle.

    ipip6_fb_tunnel_init() can be much simpler and does not
    return an error, and should be called after register_netdev()

    Note that ipip6_tunnel_clone_6rd() also needs to be called
    after register_netdev() (calling ipip6_tunnel_init())

    Fixes: ebe084aafb7e ("sit: Use ipip6_tunnel_init as the ndo_init function.")
    Signed-off-by: Eric Dumazet
    Reported-by: Dmitry Vyukov
    Cc: Steffen Klassert
    Signed-off-by: David S. Miller

    Eric Dumazet
     

11 Aug, 2015

1 commit


09 Apr, 2015

1 commit


03 Apr, 2015

1 commit


01 Apr, 2015

4 commits


06 Feb, 2015

1 commit

  • Conflicts:
    drivers/net/vxlan.c
    drivers/vhost/net.c
    include/linux/if_vlan.h
    net/core/dev.c

    The net/core/dev.c conflict was the overlap of one commit marking an
    existing function static whilst another was adding a new function.

    In the include/linux/if_vlan.h case, the type used for a local
    variable was changed in 'net', whereas the function got rewritten
    to fix a stacked vlan bug in 'net-next'.

    In drivers/vhost/net.c, Al Viro's iov_iter conversions in 'net-next'
    overlapped with an endainness fix for VHOST 1.0 in 'net'.

    In drivers/net/vxlan.c, vxlan_find_vni() added a 'flags' parameter
    in 'net-next' whereas in 'net' there was a bug fix to pass in the
    correct network namespace pointer in calls to this function.

    Signed-off-by: David S. Miller

    David S. Miller
     

05 Feb, 2015

1 commit

  • Fixes following sparse warnings :

    net/ipv6/sit.c:1509:32: warning: incorrect type in assignment (different base types)
    net/ipv6/sit.c:1509:32: expected restricted __be16 [usertype] sport
    net/ipv6/sit.c:1509:32: got unsigned short
    net/ipv6/sit.c:1514:32: warning: incorrect type in assignment (different base types)
    net/ipv6/sit.c:1514:32: expected restricted __be16 [usertype] dport
    net/ipv6/sit.c:1514:32: got unsigned short
    net/ipv6/sit.c:1711:38: warning: incorrect type in argument 3 (different base types)
    net/ipv6/sit.c:1711:38: expected unsigned short [unsigned] [usertype] value
    net/ipv6/sit.c:1711:38: got restricted __be16 [usertype] sport
    net/ipv6/sit.c:1713:38: warning: incorrect type in argument 3 (different base types)
    net/ipv6/sit.c:1713:38: expected unsigned short [unsigned] [usertype] value
    net/ipv6/sit.c:1713:38: got restricted __be16 [usertype] dport

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

20 Jan, 2015

1 commit


24 Nov, 2014

1 commit


07 Nov, 2014

1 commit


06 Nov, 2014

1 commit


04 Nov, 2014

1 commit

  • ipip6_tunnel_init() sets the dev->iflink via a call to
    ipip6_tunnel_bind_dev(). After that, register_netdevice()
    sets dev->iflink = -1. So we loose the iflink configuration
    for ipv6 tunnels. Fix this by using ipip6_tunnel_init() as the
    ndo_init function. Then ipip6_tunnel_init() is called after
    dev->iflink is set to -1 from register_netdevice().

    Signed-off-by: Steffen Klassert
    Signed-off-by: David S. Miller

    Steffen Klassert
     

19 Oct, 2014

1 commit

  • pskb_may_pull() maybe change skb->data and make iph pointer oboslete,
    fix it by geting ip header length directly.

    Fixes: ca15a078 (sit: generate icmpv6 error when receiving icmpv4 error)
    Cc: Oussama Ghorbel
    Signed-off-by: Li RongQing
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Li RongQing
     

08 Oct, 2014

1 commit

  • Testing xmit_more support with netperf and connected UDP sockets,
    I found strange dst refcount false sharing.

    Current handling of IFF_XMIT_DST_RELEASE is not optimal.

    Dropping dst in validate_xmit_skb() is certainly too late in case
    packet was queued by cpu X but dequeued by cpu Y

    The logical point to take care of drop/force is in __dev_queue_xmit()
    before even taking qdisc lock.

    As Julian Anastasov pointed out, need for skb_dst() might come from some
    packet schedulers or classifiers.

    This patch adds new helper to cleanly express needs of various drivers
    or qdiscs/classifiers.

    Drivers that need skb_dst() in their ndo_start_xmit() should call
    following helper in their setup instead of the prior :

    dev->priv_flags &= ~IFF_XMIT_DST_RELEASE;
    ->
    netif_keep_dst(dev);

    Instead of using a single bit, we use two bits, one being
    eventually rebuilt in bonding/team drivers.

    The other one, is permanent and blocks IFF_XMIT_DST_RELEASE being
    rebuilt in bonding/team. Eventually, we could add something
    smarter later.

    Signed-off-by: Eric Dumazet
    Cc: Julian Anastasov
    Signed-off-by: David S. Miller

    Eric Dumazet
     

02 Oct, 2014

1 commit


20 Sep, 2014

1 commit


25 Aug, 2014

1 commit

  • This patch makes no changes to the logic of the code but simply addresses
    coding style issues as detected by checkpatch.

    Both objdump and diff -w show no differences.

    A number of items are addressed in this patch:
    * Multiple spaces converted to tabs
    * Spaces before tabs removed.
    * Spaces in pointer typing cleansed (char *)foo etc.
    * Remove space after sizeof
    * Ensure spacing around comparators such as if statements.

    Signed-off-by: Ian Morris
    Signed-off-by: David S. Miller

    Ian Morris
     

15 Aug, 2014

1 commit

  • As of 4fddbf5d78 ("sit: strictly restrict incoming traffic to tunnel link device"),
    when looking up a tunnel, tunnel's underlying interface (t->parms.link)
    is verified to match incoming traffic's ingress device.

    However the comparison was incorrectly based on skb->dev->iflink.

    Instead, dev->ifindex should be used, which correctly represents the
    interface from which the IP stack hands the ipip6 packets.

    This allows setting up sit tunnels bound to vlan interfaces (otherwise
    incoming ipip6 traffic on the vlan interface was dropped due to
    ipip6_tunnel_lookup match failure).

    Signed-off-by: Shmulik Ladkani
    Acked-by: Nicolas Dichtel
    Signed-off-by: David S. Miller

    Shmulik Ladkani
     

16 Jul, 2014

1 commit

  • Extend alloc_netdev{,_mq{,s}}() to take name_assign_type as argument, and convert
    all users to pass NET_NAME_UNKNOWN.

    Coccinelle patch:

    @@
    expression sizeof_priv, name, setup, txqs, rxqs, count;
    @@

    (
    -alloc_netdev_mqs(sizeof_priv, name, setup, txqs, rxqs)
    +alloc_netdev_mqs(sizeof_priv, name, NET_NAME_UNKNOWN, setup, txqs, rxqs)
    |
    -alloc_netdev_mq(sizeof_priv, name, setup, count)
    +alloc_netdev_mq(sizeof_priv, name, NET_NAME_UNKNOWN, setup, count)
    |
    -alloc_netdev(sizeof_priv, name, setup)
    +alloc_netdev(sizeof_priv, name, NET_NAME_UNKNOWN, setup)
    )

    v9: move comments here from the wrong commit

    Signed-off-by: Tom Gundersen
    Reviewed-by: David Herrmann
    Signed-off-by: David S. Miller

    Tom Gundersen
     

12 Jun, 2014

1 commit


11 Jun, 2014

1 commit

  • ipv4_{update_pmtu,redirect} were called with tunnel's ifindex (t->dev is a
    tunnel netdevice). It caused wrong route lookup and failure of pmtu update or
    redirect. We should use the same ifindex that we use in ip_route_output_* in
    *tunnel_xmit code. It is t->parms.link .

    Signed-off-by: Dmitry Popov
    Signed-off-by: David S. Miller

    Dmitry Popov
     

22 May, 2014

1 commit

  • Enable the module alias hookup to allow tunnel modules to be autoloaded on demand.

    This is in line with how most other netdev kinds work, and will allow userspace
    to create tunnels without having CAP_SYS_MODULE.

    Signed-off-by: Tom Gundersen
    Signed-off-by: David S. Miller

    Tom Gundersen
     

17 Apr, 2014

1 commit

  • Because the netdevice may be in another netns than the i/o netns, we should
    use the i/o netns instead of dev_net(dev).

    Note that netdev_priv(dev) cannot bu NULL, hence we can remove these useless
    checks.

    Signed-off-by: Nicolas Dichtel
    Signed-off-by: David S. Miller

    Nicolas Dichtel
     

16 Apr, 2014

1 commit

  • In the dst->output() path for ipv4, the code assumes the skb it has to
    transmit is attached to an inet socket, specifically via
    ip_mc_output() : The sk_mc_loop() test triggers a WARN_ON() when the
    provider of the packet is an AF_PACKET socket.

    The dst->output() method gets an additional 'struct sock *sk'
    parameter. This needs a cascade of changes so that this parameter can
    be propagated from vxlan to final consumer.

    Fixes: 8f646c922d55 ("vxlan: keep original skb ownership")
    Reported-by: lucien xin
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

06 Mar, 2014

1 commit

  • Conflicts:
    drivers/net/wireless/ath/ath9k/recv.c
    drivers/net/wireless/mwifiex/pcie.c
    net/ipv6/sit.c

    The SIT driver conflict consists of a bug fix being done by hand
    in 'net' (missing u64_stats_init()) whilst in 'net-next' a helper
    was created (netdev_alloc_pcpu_stats()) which takes care of this.

    The two wireless conflicts were overlapping changes.

    Signed-off-by: David S. Miller

    David S. Miller
     

21 Feb, 2014

1 commit


15 Feb, 2014

1 commit


07 Jan, 2014

1 commit


05 Jan, 2014

1 commit


02 Jan, 2014

1 commit


28 Dec, 2013

1 commit