Lines Matching defs:encap

469 					      struct efx_tc_encap_match *encap)
473 if (!refcount_dec_and_test(&encap->ref))
476 if (encap->type == EFX_TC_EM_DIRECT) {
477 rc = efx_mae_unregister_encap_match(efx, encap);
483 "Failed to release encap match %#x, rc %d\n",
484 encap->fw_id, rc);
486 rhashtable_remove_fast(&efx->tc->encap_match_ht, &encap->linkage,
488 if (encap->pseudo)
489 efx_tc_flower_release_encap_match(efx, encap->pseudo);
490 kfree(encap);
501 struct efx_tc_encap_match *encap, *old, *pseudo = NULL;
507 * if the field-set (and any masks) are the same for all encap
509 * pseudo encap matches.
514 "Egress encap match is not exact on dst IP address");
519 "Egress encap match is not exact on src IP address");
526 "Egress encap match on both IPv4 and IPv6, don't understand");
533 "Egress encap match is not exact on dst IP address");
538 "Egress encap match is not exact on src IP address");
544 NL_SET_ERR_MSG_MOD(extack, "Egress encap match is not exact on dst UDP port");
551 NL_SET_ERR_MSG_MOD(extack, "Bad recursion in egress encap match handler");
565 pseudo = pmatch.encap;
568 NL_SET_ERR_MSG_MOD(extack, "Egress encap match on IP TTL not supported");
578 encap = kzalloc(sizeof(*encap), GFP_USER);
579 if (!encap) {
583 encap->src_ip = match->value.enc_src_ip;
584 encap->dst_ip = match->value.enc_dst_ip;
586 encap->src_ip6 = match->value.enc_src_ip6;
587 encap->dst_ip6 = match->value.enc_dst_ip6;
589 encap->udp_dport = match->value.enc_dport;
590 encap->tun_type = type;
591 encap->ip_tos = match->value.enc_ip_tos;
592 encap->ip_tos_mask = match->mask.enc_ip_tos;
593 encap->child_ip_tos_mask = child_ip_tos_mask;
594 encap->udp_sport = match->value.enc_sport;
595 encap->udp_sport_mask = match->mask.enc_sport;
596 encap->child_udp_sport_mask = child_udp_sport_mask;
597 encap->type = em_type;
598 encap->pseudo = pseudo;
600 &encap->linkage,
604 kfree(encap);
617 NL_SET_ERR_MSG_MOD(extack, "Pseudo encap match conflicts with existing direct entry");
626 "%s encap match conflicts with existing pseudo(MASK) entry",
632 "Pseudo encap match for TOS mask %#04x conflicts with existing mask %#04x",
639 "Pseudo encap match for UDP src port mask %#x conflicts with existing mask %#x",
651 "%s encap match conflicts with existing pseudo(OR) entry",
656 "%s encap match conflicts with existing pseudo(%d) entry",
664 "Egress encap match with conflicting tun_type %u != %u",
671 encap = old;
674 rc = efx_mae_register_encap_match(efx, encap);
676 NL_SET_ERR_MSG_MOD(extack, "Failed to record egress encap match in HW");
680 refcount_set(&encap->ref, 1);
682 match->encap = encap;
685 rhashtable_remove_fast(&efx->tc->encap_match_ht, &encap->linkage,
687 kfree(encap);
755 if (rule->match.encap)
756 efx_tc_flower_release_encap_match(efx, rule->match.encap);
943 * encap header identification and parsing, then it can't be done in the Outer
944 * Rule lookup, because that lookup determines the encap type used to parse
1469 NL_SET_ERR_MSG_MOD(extack, "Egress encap match on unsupported tunnel device");
1476 "Firmware reports no support for %s encap match",
1555 if (match->encap)
1556 efx_tc_flower_release_encap_match(efx, match->encap);
1578 netif_dbg(efx, drv, efx->net_dev, "Ignoring foreign LHS filter without encap match\n");
1588 NL_SET_ERR_MSG_MOD(extack, "Egress encap match on unsupported tunnel device\n");
1595 "Firmware reports no support for %s encap match",
1667 if (match->encap)
1668 efx_tc_flower_release_encap_match(efx, match->encap);
1775 "Egress encap match on unsupported tunnel device");
1783 "Firmware reports no support for %s encap match",
1796 "Ignoring foreign filter without encap match\n");
1990 if (match.encap)
1991 efx_tc_flower_release_encap_match(efx, match.encap);
2304 struct efx_tc_encap_action *encap;
2312 encap = efx_tc_flower_create_encap_md(
2314 if (IS_ERR_OR_NULL(encap)) {
2315 rc = PTR_ERR(encap);
2320 act->encap_md = encap;
2321 list_add_tail(&act->encap_user, &encap->users);
2322 act->dest_mport = encap->dest_mport;
2325 /* This counter is used by an encap
2337 NL_SET_ERR_MSG_MOD(extack, "Failed to write action set to hw (encap)");
2431 /* Can't specify encap multiple times.
2455 * just undoing a previous encap action.
2573 if (lhs_rule->match.encap)
2574 efx_tc_flower_release_encap_match(efx, lhs_rule->match.encap);
2931 struct efx_tc_encap_match *encap = ptr;
2933 WARN_ON(refcount_read(&encap->ref));
2934 kfree(encap);