Lines Matching refs:spec

625  * efx_filter_is_mc_recipient - test whether spec is a multicast recipient
626 * @spec: Specification to test
633 bool efx_filter_is_mc_recipient(const struct efx_filter_spec *spec)
635 if (!(spec->flags & EFX_FILTER_FLAG_RX) ||
636 spec->dmaq_id == EFX_FILTER_RX_DMAQ_ID_DROP)
639 if (spec->match_flags &
641 is_multicast_ether_addr(spec->loc_mac))
644 if ((spec->match_flags &
647 if (spec->ether_type == htons(ETH_P_IP) &&
648 ipv4_is_multicast(spec->loc_host[0]))
650 if (spec->ether_type == htons(ETH_P_IPV6) &&
651 ((const u8 *)spec->loc_host)[0] == 0xff)
671 u32 efx_filter_spec_hash(const struct efx_filter_spec *spec)
674 return jhash2((const u32 *)&spec->vport_id,
709 const struct efx_filter_spec *spec)
711 u32 hash = efx_filter_spec_hash(spec);
720 const struct efx_filter_spec *spec)
726 head = efx_rps_hash_bucket(efx, spec);
731 if (efx_filter_spec_equal(spec, &rule->spec))
738 const struct efx_filter_spec *spec,
745 head = efx_rps_hash_bucket(efx, spec);
750 if (efx_filter_spec_equal(spec, &rule->spec)) {
758 memcpy(&rule->spec, spec, sizeof(rule->spec));
764 void efx_rps_hash_del(struct efx_nic *efx, const struct efx_filter_spec *spec)
770 head = efx_rps_hash_bucket(efx, spec);
775 if (efx_filter_spec_equal(spec, &rule->spec)) {
868 rc = efx->type->filter_insert(efx, &req->spec, true);
874 rule = efx_rps_hash_find(efx, &req->spec);
876 * for the same spec was already worked and then expired before
900 if (req->spec.ether_type == htons(ETH_P_IP))
903 (req->spec.ip_proto == IPPROTO_TCP) ? "TCP" : "UDP",
904 req->spec.rem_host, ntohs(req->spec.rem_port),
905 req->spec.loc_host, ntohs(req->spec.loc_port),
910 (req->spec.ip_proto == IPPROTO_TCP) ? "TCP" : "UDP",
911 req->spec.rem_host, ntohs(req->spec.rem_port),
912 req->spec.loc_host, ntohs(req->spec.loc_port),
916 if (req->spec.ether_type == htons(ETH_P_IP))
919 (req->spec.ip_proto == IPPROTO_TCP) ? "TCP" : "UDP",
920 req->spec.rem_host, ntohs(req->spec.rem_port),
921 req->spec.loc_host, ntohs(req->spec.loc_port),
926 (req->spec.ip_proto == IPPROTO_TCP) ? "TCP" : "UDP",
927 req->spec.rem_host, ntohs(req->spec.rem_port),
928 req->spec.loc_host, ntohs(req->spec.loc_port),
981 efx_filter_init_rx(&req->spec, EFX_FILTER_PRI_HINT,
984 req->spec.match_flags =
988 req->spec.ether_type = fk.basic.n_proto;
989 req->spec.ip_proto = fk.basic.ip_proto;
992 req->spec.rem_host[0] = fk.addrs.v4addrs.src;
993 req->spec.loc_host[0] = fk.addrs.v4addrs.dst;
995 memcpy(req->spec.rem_host, &fk.addrs.v6addrs.src,
997 memcpy(req->spec.loc_host, &fk.addrs.v6addrs.dst,
1001 req->spec.rem_port = fk.ports.src;
1002 req->spec.loc_port = fk.ports.dst;
1007 rule = efx_rps_hash_add(efx, &req->spec, &new);