On 10/19/2018 8:59 PM, Yousong Zhou wrote:
On Sat, 20 Oct 2018 at 01:37, Gregory Rose <[email protected]> wrote:
On 10/18/2018 10:28 PM, Yousong Zhou wrote:
On Fri, 19 Oct 2018 at 01:13, Gregory Rose <[email protected]> wrote:
On 10/17/2018 6:01 AM, Yousong Zhou wrote:
I tried to use ip-over-gre with openvswitch 2.8.4, but no "ip proto
47" traffic can be seen with tcpdump. Later I added a WARN_ON_ONCE(1)
line just before the "goto drop" statement in ovs_vport_send() and it
was triggered right away thus pinpointed the problem.
It looks to me openvswitch linux kernel datapath always create
ARPHRD_IPGRE device and never set dev->type to ARPHRD_NONE. Please
correct me if this is not the case. The ovs-vswitchd.conf.db doc says
setting packet_type=legacy_l3 should work. I am trying to figure
what's the missing piece.
Openvswitch 2.8.4 depends on the built-in gre kernel module and it is true that
module will always set the device type to ARPHRD_IPGRE upon initial creation
but if the tunnel is set to a metadata type tunnel then the device type should
be reset to ARPHRD_NONE.
From ../net/ipv4/ip_gre.c:L1037
if (data[IFLA_GRE_COLLECT_METADATA]) {
struct ip_tunnel *t = netdev_priv(dev);
t->collect_md = true;
if (dev->type == ARPHRD_IPGRE)
dev->type = ARPHRD_NONE;
}
https://elixir.bootlin.com/linux/v4.6/source/net/ipv4/ip_gre.c#L1037
Perhaps that code is not being hit?
No, nl_attr *data[] was zeroed out in gretap_fb_dev_create().
And you are sure there is no subsequent call to ipgre_netlink_parms()?
gretap_fb_dev_create() will call ipgre_newlink() with zeroed out
nlattr *tb[] and NULL as nlattr *data[]
ipgre_newlink() then calls ipgre_netlink_params() which returns
immediately when data == NULL
I was thinking there would be another subsequent call to set the
parameters but evidently there is not.
Let me do some investigation and find out whether this is a bug or just
something that was never
implemented. If it was just never implemented then the documentation
needs to be fixed up.
Thanks,
- Greg
By the way, I can now get vxlan to carry L3 packets by setting
options:exts=gpe. LISP is still no go as the openvswitch
implementation seems to provide no way to change dev->type =
ARPHRD_NONE.
yousong
_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss