On Wed, May 4, 2016 at 12:36 AM, Simon Horman
<simon.hor...@netronome.com> wrote:
> This allows GRE tunnels to send and receive both
> layer 2 packets (packets with an ethernet header) and
> layer 3 packets (packets without an ethernet header).
>
> Signed-off-by: Simon Horman <simon.hor...@netronome.com>
> ---
> v9
> New Patch
> ---
>  include/net/gre.h              |  4 ++--
>  net/ipv4/ip_gre.c              |  8 ++++----
>  net/openvswitch/vport-gre.c    |  4 ++--
>  net/openvswitch/vport-netdev.c | 12 +++++++++++-
>  net/openvswitch/vport-netdev.h |  1 +
>  5 files changed, 20 insertions(+), 9 deletions(-)
>
...
...
> diff --git a/net/openvswitch/vport-gre.c b/net/openvswitch/vport-gre.c
> index f003225de994..b1aa02904ae4 100644
> --- a/net/openvswitch/vport-gre.c
> +++ b/net/openvswitch/vport-gre.c
> @@ -60,7 +60,7 @@ static struct vport *gre_tnl_create(const struct 
> vport_parms *parms)
>                 return vport;
>
>         rtnl_lock();
> -       dev = gretap_fb_dev_create(net, parms->name, NET_NAME_USER);
> +       dev = gre_fb_dev_create(net, parms->name, NET_NAME_USER);
>         if (IS_ERR(dev)) {
>                 rtnl_unlock();
>                 ovs_vport_free(vport);
> @@ -87,7 +87,7 @@ static struct vport *gre_create(const struct vport_parms 
> *parms)
>  static struct vport_ops ovs_gre_vport_ops = {
>         .type           = OVS_VPORT_TYPE_GRE,
>         .create         = gre_create,
> -       .send           = ovs_netdev_send_tap,
> +       .send           = ovs_netdev_send_raw_tun,
>         .destroy        = ovs_netdev_tunnel_destroy,
>  };
>

This trick of using vport-send only works in case of compat tunnel
device mode. But in normal case the LWT interface allows us to use net
devices for tunnel traffic. So you need some sort of mechanism to
handle l3 only packets on vport-netdev.

Reply via email to