Lines Matching defs:nsh
1330 /* nsh header length = NSH_BASE_HDR_LEN + mdlen */
1338 struct ovs_key_nsh *nsh, struct ovs_key_nsh *nsh_mask)
1353 nsh->base = *base;
1361 memcpy(nsh->context, md1->context, sizeof(*md1));
1397 OVS_NLERR(log, "nsh attr %d is out of range max %d",
1406 "nsh attr %d has unexpected len %d expected %d",
1420 SW_FLOW_KEY_PUT(match, nsh.base.flags,
1422 SW_FLOW_KEY_PUT(match, nsh.base.ttl,
1424 SW_FLOW_KEY_PUT(match, nsh.base.mdtype,
1426 SW_FLOW_KEY_PUT(match, nsh.base.np,
1428 SW_FLOW_KEY_PUT(match, nsh.base.path_hdr,
1437 SW_FLOW_KEY_PUT(match, nsh.context[i],
1458 OVS_NLERR(log, "Unknown nsh attribute %d",
1465 OVS_NLERR(log, "nsh attribute has %d unknown bytes.", rem);
1472 "invalid nsh attribute: md1 and md2 are exclusive."
1480 OVS_NLERR(1, "nsh attribute has unmatched MD type %d.",
1960 static int nsh_key_to_nlattr(const struct ovs_key_nsh *nsh, bool is_mask,
1969 if (nla_put(skb, OVS_NSH_KEY_ATTR_BASE, sizeof(nsh->base), &nsh->base))
1972 if (is_mask || nsh->base.mdtype == NSH_M_TYPE1) {
1974 sizeof(nsh->context), nsh->context))
2118 if (nsh_key_to_nlattr(&output->nsh, is_mask, skb))
3379 inner_proto = tun_p_to_eth_p(key->nsh.base.np);
3382 if (key->nsh.base.np == TUN_P_ETHERNET)