18 Aug, 2016

1 commit


16 Aug, 2016

1 commit

  • Ensure that the inner_protocol is set on transmit so that GSO segmentation,
    which relies on that field, works correctly.

    This is achieved by setting the inner_protocol in gre_build_header rather
    than each caller of that function. It ensures that the inner_protocol is
    set when gre_fb_xmit() is used to transmit GRE which was not previously the
    case.

    I have observed this is not the case when OvS transmits GRE using
    lwtunnel metadata (which it always does).

    Fixes: 38720352412a ("gre: Use inner_proto to obtain inner header protocol")
    Cc: Pravin Shelar
    Acked-by: Alexander Duyck
    Signed-off-by: Simon Horman
    Acked-by: Pravin B Shelar
    Signed-off-by: David S. Miller

    Simon Horman
     

11 Aug, 2016

1 commit

  • The PPTP is encapsulated by GRE header with that GRE_VERSION bits
    must contain one. But current GRE RPS needs the GRE_VERSION must be
    zero. So RPS does not work for PPTP traffic.

    In my test environment, there are four MIPS cores, and all traffic
    are passed through by PPTP. As a result, only one core is 100% busy
    while other three cores are very idle. After this patch, the usage
    of four cores are balanced well.

    Signed-off-by: Gao Feng
    Reviewed-by: Philip Prindeville
    Signed-off-by: David S. Miller

    Gao Feng
     

16 Jun, 2016

1 commit

  • 1) gre_parse_header() can be called from gre_err()

    At this point transport header points to ICMP header, not the inner
    header.

    2) We can not really change transport header as ipgre_err() will later
    assume transport header still points to ICMP header (using icmp_hdr())

    3) pskb_may_pull() logic in gre_parse_header() really works
    if we are interested at zone pointed by skb->data

    4) As Jiri explained in commit b7f8fe251e46 ("gre: do not pull header in
    ICMP error processing") we should not pull headers in error handler.

    So this fix :

    A) changes gre_parse_header() to use skb->data instead of
    skb_transport_header()

    B) Adds a nhs parameter to gre_parse_header() so that we can skip the
    not pulled IP header from error path.
    This offset is 0 for normal receive path.

    C) remove obsolete IPV6 includes

    Signed-off-by: Eric Dumazet
    Cc: Tom Herbert
    Cc: Maciej Żenczykowski
    Cc: Jiri Benc
    Signed-off-by: David S. Miller

    Eric Dumazet
     

13 May, 2016

1 commit


05 May, 2016

1 commit

  • It's easier for gre_parse_header to return the header length instead of
    filing it into a parameter. That way, the callers that don't care about the
    header length can just check whether the returned value is lower than zero.

    In gre_err, the tunnel header must not be pulled. See commit b7f8fe251e46
    ("gre: do not pull header in ICMP error processing") for details.

    This patch reduces the conflict between the mentioned commit and commit
    95f5c64c3c13 ("gre: Move utility functions to common headers").

    Signed-off-by: Jiri Benc
    Acked-by: Tom Herbert
    Signed-off-by: David S. Miller

    Jiri Benc
     

03 May, 2016

2 commits

  • Create common functions for both IPv4 and IPv6 GRE in transmit. These
    are put into gre.h.

    Common functions are for:
    - GRE checksum calculation. Move gre_checksum to gre.h.
    - Building a GRE header. Move GRE build_header and rename
    gre_build_header.

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

    Tom Herbert
     
  • Several of the GRE functions defined in net/ipv4/ip_gre.c are usable
    for IPv6 GRE implementation (that is they are protocol agnostic).

    These include:
    - GRE flag handling functions are move to gre.h
    - GRE build_header is moved to gre.h and renamed gre_build_header
    - parse_gre_header is moved to gre_demux.c and renamed gre_parse_header
    - iptunnel_pull_header is taken out of gre_parse_header. This is now
    done by caller. The header length is returned from gre_parse_header
    in an int* argument.

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

    Tom Herbert
     

11 Aug, 2015

2 commits

  • Support for sharing GREPROTO_CISCO port was added so that
    OVS gre port and kernel GRE devices can co-exist. After
    flow-based tunneling patches OVS GRE protocol processing
    is completely moved to ip_gre module. so there is no need
    for GRE protocol hook. Following patch consolidates
    GRE protocol related functions into ip_gre module.

    Signed-off-by: Pravin B Shelar
    Acked-by: Thomas Graf
    Signed-off-by: David S. Miller

    Pravin B Shelar
     
  • Using GRE tunnel meta data collection feature, we can implement
    OVS GRE vport. This patch removes all of the OVS
    specific GRE code and make OVS use a ip_gre net_device.
    Minimal GRE vport is kept to handle compatibility with
    current userspace application.

    Signed-off-by: Pravin B Shelar
    Acked-by: Thomas Graf
    Signed-off-by: David S. Miller

    Pravin B Shelar
     

05 Jun, 2014

1 commit

  • Call gso_make_checksum. This should have the benefit of using a
    checksum that may have been previously computed for the packet.

    This also adds NETIF_F_GSO_GRE_CSUM to differentiate devices that
    offload GRE GSO with and without the GRE checksum offloaed.

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

    Tom Herbert
     

07 Jan, 2014

1 commit


20 Oct, 2013

1 commit


04 Jul, 2013

1 commit


20 Jun, 2013

3 commits


27 Mar, 2013

1 commit

  • Following patch refactors GRE code into ip tunneling code and GRE
    specific code. Common tunneling code is moved to ip_tunnel module.
    ip_tunnel module is written as generic library which can be used
    by different tunneling implementations.

    ip_tunnel module contains following components:
    - packet xmit and rcv generic code. xmit flow looks like
    (gre_xmit/ipip_xmit)->ip_tunnel_xmit->ip_local_out.
    - hash table of all devices.
    - lookup for tunnel devices.
    - control plane operations like device create, destroy, ioctl, netlink
    operations code.
    - registration for tunneling modules, like gre, ipip etc.
    - define single pcpu_tstats dev->tstats.
    - struct tnl_ptk_info added to pass parsed tunnel packet parameters.

    ipip.h header is renamed to ip_tunnel.h

    Signed-off-by: Pravin B Shelar
    Signed-off-by: David S. Miller

    Pravin B Shelar
     

22 Aug, 2010

1 commit

  • PPP: introduce "pptp" module which implements point-to-point tunneling protocol using pppox framework
    NET: introduce the "gre" module for demultiplexing GRE packets on version criteria
    (required to pptp and ip_gre may coexists)
    NET: ip_gre: update to use the "gre" module

    This patch introduces then pptp support to the linux kernel which
    dramatically speeds up pptp vpn connections and decreases cpu usage in
    comparison of existing user-space implementation
    (poptop/pptpclient). There is accel-pptp project
    (https://sourceforge.net/projects/accel-pptp/) to utilize this module,
    it contains plugin for pppd to use pptp in client-mode and modified
    pptpd (poptop) to build high-performance pptp NAS.

    There was many changes from initial submitted patch, most important are:
    1. using rcu instead of read-write locks
    2. using static bitmap instead of dynamically allocated
    3. using vmalloc for memory allocation instead of BITS_PER_LONG + __get_free_pages
    4. fixed many coding style issues
    Thanks to Eric Dumazet.

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

    Dmitry Kozlov