• Timo Teräs's avatar
    gre: fix the inner mac header in nbma tunnel xmit path · 9fc3d416
    Timo Teräs authored
    commit 8a0033a9 upstream.
    
    The NBMA GRE tunnels temporarily push GRE header that contain the
    per-packet NBMA destination on the skb via header ops early in xmit
    path. It is the later pulled before the real GRE header is constructed.
    
    The inner mac was thus set differently in nbma case: the GRE header
    has been pushed by neighbor layer, and mac header points to beginning
    of the temporary gre header (set by dev_queue_xmit).
    
    Now that the offloads expect mac header to point to the gre payload,
    fix the xmit patch to:
     - pull first the temporary gre header away
     - and reset mac header to point to gre payload
    
    This fixes tso to work again with nbma tunnels.
    
    Fixes: 14051f04 ("gre: Use inner mac length when computing tunnel length")
    Signed-off-by: default avatarTimo Teräs <timo.teras@iki.fi>
    Cc: Tom Herbert <therbert@google.com>
    Cc: Alexander Duyck <alexander.h.duyck@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
    9fc3d416
ip_gre.c 22.2 KB