Lines Matching refs: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",
647 "%s encap match conflicts with existing pseudo(%d) entry",
655 "Egress encap match with conflicting tun_type %u != %u",
662 encap = old;
665 rc = efx_mae_register_encap_match(efx, encap);
667 NL_SET_ERR_MSG_MOD(extack, "Failed to record egress encap match in HW");
671 refcount_set(&encap->ref, 1);
673 match->encap = encap;
676 rhashtable_remove_fast(&efx->tc->encap_match_ht, &encap->linkage,
678 kfree(encap);
746 if (rule->match.encap)
747 efx_tc_flower_release_encap_match(efx, rule->match.encap);
1455 "Egress encap match on unsupported tunnel device");
1463 "Firmware reports no support for %s encap match",
1476 "Ignoring foreign filter without encap match\n");
1669 if (match.encap)
1670 efx_tc_flower_release_encap_match(efx, match.encap);
1983 struct efx_tc_encap_action *encap;
1991 encap = efx_tc_flower_create_encap_md(
1993 if (IS_ERR_OR_NULL(encap)) {
1994 rc = PTR_ERR(encap);
1999 act->encap_md = encap;
2000 list_add_tail(&act->encap_user, &encap->users);
2001 act->dest_mport = encap->dest_mport;
2004 /* This counter is used by an encap
2016 NL_SET_ERR_MSG_MOD(extack, "Failed to write action set to hw (encap)");
2110 /* Can't specify encap multiple times.
2134 * just undoing a previous encap action.
2244 if (lhs_rule->match.encap)
2245 efx_tc_flower_release_encap_match(efx, lhs_rule->match.encap);
2602 struct efx_tc_encap_match *encap = ptr;
2604 WARN_ON(refcount_read(&encap->ref));
2605 kfree(encap);