On Thu, Oct 19, 2017 at 03:41:18PM +0200, Jiri Benc wrote: > On Thu, 19 Oct 2017 21:12:15 +0800, Yang, Yi wrote: > > flow_key in set_nsh is got from netlink message which is set by > > commit_nsh in user space, here is code. > > Isn't this the 'key' local variable that you're talking about, while I'm > referring to the 'flow_key' parameter?
Oh, my mistake, but it is possible not to polulate nsh key in flow_key for push_nsh then set, as Jan and I explained before, we don't recirculate the packet after push_nsh for performance, so parse function isn't called for NSH header, mdtype can't be gotten from flow_key yet. Only one case is true, i.e. an ingress NSH packet is parsed then set by changing si and ttl. For push_nsh, my typical use scinario is push_nsh then set then output to vxlangpe port. > > Jiri