Lines Matching refs:encap

468 					      struct efx_tc_encap_match *encap)
472 if (!refcount_dec_and_test(&encap->ref))
475 if (encap->type == EFX_TC_EM_DIRECT) {
476 rc = efx_mae_unregister_encap_match(efx, encap);
482 "Failed to release encap match %#x, rc %d\n",
483 encap->fw_id, rc);
485 rhashtable_remove_fast(&efx->tc->encap_match_ht, &encap->linkage,
487 if (encap->pseudo)
488 efx_tc_flower_release_encap_match(efx, encap->pseudo);
489 kfree(encap);
500 struct efx_tc_encap_match *encap, *old, *pseudo = NULL;
506 * if the field-set (and any masks) are the same for all encap
508 * pseudo encap matches.
513 "Egress encap match is not exact on dst IP address");
518 "Egress encap match is not exact on src IP address");
525 "Egress encap match on both IPv4 and IPv6, don't understand");
532 "Egress encap match is not exact on dst IP address");
537 "Egress encap match is not exact on src IP address");
543 NL_SET_ERR_MSG_MOD(extack, "Egress encap match is not exact on dst UDP port");
550 NL_SET_ERR_MSG_MOD(extack, "Bad recursion in egress encap match handler");
564 pseudo = pmatch.encap;
567 NL_SET_ERR_MSG_MOD(extack, "Egress encap match on IP TTL not supported");
577 encap = kzalloc(sizeof(*encap), GFP_USER);
578 if (!encap) {
582 encap->src_ip = match->value.enc_src_ip;
583 encap->dst_ip = match->value.enc_dst_ip;
585 encap->src_ip6 = match->value.enc_src_ip6;
586 encap->dst_ip6 = match->value.enc_dst_ip6;
588 encap->udp_dport = match->value.enc_dport;
589 encap->tun_type = type;
590 encap->ip_tos = match->value.enc_ip_tos;
591 encap->ip_tos_mask = match->mask.enc_ip_tos;
592 encap->child_ip_tos_mask = child_ip_tos_mask;
593 encap->udp_sport = match->value.enc_sport;
594 encap->udp_sport_mask = match->mask.enc_sport;
595 encap->child_udp_sport_mask = child_udp_sport_mask;
596 encap->type = em_type;
597 encap->pseudo = pseudo;
599 &encap->linkage,
603 kfree(encap);
616 NL_SET_ERR_MSG_MOD(extack, "Pseudo encap match conflicts with existing direct entry");
625 "%s encap match conflicts with existing pseudo(MASK) entry",
631 "Pseudo encap match for TOS mask %#04x conflicts with existing mask %#04x",
638 "Pseudo encap match for UDP src port mask %#x conflicts with existing mask %#x",
650 "%s encap match conflicts with existing pseudo(OR) entry",
655 "%s encap match conflicts with existing pseudo(%d) entry",
663 "Egress encap match with conflicting tun_type %u != %u",
670 encap = old;
673 rc = efx_mae_register_encap_match(efx, encap);
675 NL_SET_ERR_MSG_MOD(extack, "Failed to record egress encap match in HW");
679 refcount_set(&encap->ref, 1);
681 match->encap = encap;
684 rhashtable_remove_fast(&efx->tc->encap_match_ht, &encap->linkage,
686 kfree(encap);
754 if (rule->match.encap)
755 efx_tc_flower_release_encap_match(efx, rule->match.encap);
942 * encap header identification and parsing, then it can't be done in the Outer
943 * Rule lookup, because that lookup determines the encap type used to parse
1468 NL_SET_ERR_MSG_MOD(extack, "Egress encap match on unsupported tunnel device");
1475 "Firmware reports no support for %s encap match",
1554 if (match->encap)
1555 efx_tc_flower_release_encap_match(efx, match->encap);
1577 netif_dbg(efx, drv, efx->net_dev, "Ignoring foreign LHS filter without encap match\n");
1587 NL_SET_ERR_MSG_MOD(extack, "Egress encap match on unsupported tunnel device\n");
1594 "Firmware reports no support for %s encap match",
1666 if (match->encap)
1667 efx_tc_flower_release_encap_match(efx, match->encap);
1774 "Egress encap match on unsupported tunnel device");
1782 "Firmware reports no support for %s encap match",
1795 "Ignoring foreign filter without encap match\n");
1989 if (match.encap)
1990 efx_tc_flower_release_encap_match(efx, match.encap);
2303 struct efx_tc_encap_action *encap;
2311 encap = efx_tc_flower_create_encap_md(
2313 if (IS_ERR_OR_NULL(encap)) {
2314 rc = PTR_ERR(encap);
2319 act->encap_md = encap;
2320 list_add_tail(&act->encap_user, &encap->users);
2321 act->dest_mport = encap->dest_mport;
2324 /* This counter is used by an encap
2336 NL_SET_ERR_MSG_MOD(extack, "Failed to write action set to hw (encap)");
2430 /* Can't specify encap multiple times.
2454 * just undoing a previous encap action.
2572 if (lhs_rule->match.encap)
2573 efx_tc_flower_release_encap_match(efx, lhs_rule->match.encap);
2930 struct efx_tc_encap_match *encap = ptr;
2932 WARN_ON(refcount_read(&encap->ref));
2933 kfree(encap);