diff options
author | Yi Yang <yi.y.yang@intel.com> | 2018-01-11 13:24:01 +0800 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-01-11 11:46:11 -0800 |
commit | 17553f27baa1d1883bed0d099f20e979cecd4a4c (patch) | |
tree | aaf7b7135045ab177d672435ce01990175609560 /ofproto/ofproto-dpif-xlate.c | |
parent | 74868f2c38f931cc355787152ebf9d9e9f1c8b37 (diff) | |
download | openvswitch-17553f27baa1d1883bed0d099f20e979cecd4a4c.tar.gz |
nsh: add new flow key 'ttl'
IETF NSH draft added a new filed ttl in NSH header, this patch
is to add new nsh key 'ttl' for it.
Signed-off-by: Yi Yang <yi.y.yang@intel.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto/ofproto-dpif-xlate.c')
-rw-r--r-- | ofproto/ofproto-dpif-xlate.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 71db425ab..effa9c23d 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -5774,10 +5774,10 @@ rewrite_flow_push_nsh(struct xlate_ctx *ctx, /* Populate the flow with the new NSH header. */ flow->packet_type = htonl(PT_NSH); flow->dl_type = htons(ETH_TYPE_NSH); - flow->nsh.flags = 0; /* */ + flow->nsh.flags = 0; + flow->nsh.ttl = 63; flow->nsh.np = np; - flow->nsh.spi = 0; - flow->nsh.si = 255; + flow->nsh.path_hdr = htonl(255); if (md_type == NSH_M_TYPE1) { flow->nsh.mdtype = NSH_M_TYPE1; @@ -5790,6 +5790,7 @@ rewrite_flow_push_nsh(struct xlate_ctx *ctx, } else if (md_type == NSH_M_TYPE2) { flow->nsh.mdtype = NSH_M_TYPE2; } + flow->nsh.mdtype &= NSH_MDTYPE_MASK; return buf; } |