Lines Matching defs:spec
845 struct ef4_filter_spec spec;
860 ef4_filter_init_rx(&spec, EF4_FILTER_PRI_HINT,
863 spec.match_flags =
867 spec.ether_type = fk.basic.n_proto;
868 spec.ip_proto = fk.basic.ip_proto;
871 spec.rem_host[0] = fk.addrs.v4addrs.src;
872 spec.loc_host[0] = fk.addrs.v4addrs.dst;
874 memcpy(spec.rem_host, &fk.addrs.v6addrs.src, sizeof(struct in6_addr));
875 memcpy(spec.loc_host, &fk.addrs.v6addrs.dst, sizeof(struct in6_addr));
878 spec.rem_port = fk.ports.src;
879 spec.loc_port = fk.ports.dst;
881 rc = efx->type->filter_rfs_insert(efx, &spec);
890 if (spec.ether_type == htons(ETH_P_IP))
893 (spec.ip_proto == IPPROTO_TCP) ? "TCP" : "UDP",
894 spec.rem_host, ntohs(spec.rem_port), spec.loc_host,
895 ntohs(spec.loc_port), rxq_index, flow_id, rc);
899 (spec.ip_proto == IPPROTO_TCP) ? "TCP" : "UDP",
900 spec.rem_host, ntohs(spec.rem_port), spec.loc_host,
901 ntohs(spec.loc_port), rxq_index, flow_id, rc);
946 * ef4_filter_is_mc_recipient - test whether spec is a multicast recipient
947 * @spec: Specification to test
954 bool ef4_filter_is_mc_recipient(const struct ef4_filter_spec *spec)
956 if (!(spec->flags & EF4_FILTER_FLAG_RX) ||
957 spec->dmaq_id == EF4_FILTER_RX_DMAQ_ID_DROP)
960 if (spec->match_flags &
962 is_multicast_ether_addr(spec->loc_mac))
965 if ((spec->match_flags &
968 if (spec->ether_type == htons(ETH_P_IP) &&
969 ipv4_is_multicast(spec->loc_host[0]))
971 if (spec->ether_type == htons(ETH_P_IPV6) &&
972 ((const u8 *)spec->loc_host)[0] == 0xff)