Jiri, here is description of this issue I sent to ovs-discussion mailing list, we didn't change these code, vxlan module in vanilla ovs will have the same behavior.
Hi, folks I noticed vxlan module always uses tp_dst from tunnel metadata in preference to vxlan->cfg.dst_port, this isn't the result we want in some use cases, for example, if we create two vxlan port which have different dst_port, when we forward the packet from the first vxlan port to the second one, we need the packet should be sent out with the second vxlan port's dst_port as tp_dst, but current vxlan module will use that one from the first vxlan port, the source code in vxlan module and our experiment have confirmed this. The line in file datapath/linux/compat/vxlan.c is here: dst_port = info->key.tp_dst ? : vxlan->cfg.dst_port; Anybody knows how we can change this? The below change seems more reasonable to me, or do we have some ways to dynamically change it by openflow actions? dst_port = vxlan->cfg.dst_port ? : info->key.tp_dst; -----Original Message----- From: Jiri Benc [mailto:[email protected]] Sent: Thursday, November 24, 2016 5:47 PM To: Jan Scheurich <[email protected]> Cc: Manuel Buil <[email protected]>; Yang, Yi Y <[email protected]>; [email protected]; Georgios Paraskevopoulos ([email protected]) <[email protected]>; Georg Schmuecking <[email protected]>; László Sürü <[email protected]> Subject: Re: Potential bug in NSH patch for OVS On Thu, 24 Nov 2016 08:29:29 +0000, Jan Scheurich wrote: > This looks like a bug in OVS VXLAN tunnel port implementation (in the > kernel datapath). This is not a bug in the kernel datapath. > For the OVS upstream development we'll have to make sure that the > tunnel port implementation uses the configured (or the default) > destination port, unless the tunnel port is explicitly configured with > option tp_dst=flow. This is exactly what is happening. > To change this line in datapath/linux/compat/vxlan.c > > dst_port = info->key.tp_dst ? : vxlan->cfg.dst_port; > > to this to fix your issue. > > dst_port = vxlan->cfg.dst_port ? : info->key.tp_dst; No, the original (current) code is correct. It says: "use the per-packet specified port; if the port is not specified, fall back to the one configured on the port". Which is exactly what is needed and what is the correct behavior. Note that the line you're suggesting is equivalent to: dst_port = vxlan->cfg.dst_port; ignoring info->key.tp_dst completely. I can't really comment on the rest of the email. It seems it's a bug in your non-upstream patches. Jiri _______________________________________________ sfc-dev mailing list [email protected] https://lists.opendaylight.org/mailman/listinfo/sfc-dev
