Lines Matching defs:spec
847 struct ef4_filter_spec spec;
862 ef4_filter_init_rx(&spec, EF4_FILTER_PRI_HINT,
865 spec.match_flags =
869 spec.ether_type = fk.basic.n_proto;
870 spec.ip_proto = fk.basic.ip_proto;
873 spec.rem_host[0] = fk.addrs.v4addrs.src;
874 spec.loc_host[0] = fk.addrs.v4addrs.dst;
876 memcpy(spec.rem_host, &fk.addrs.v6addrs.src, sizeof(struct in6_addr));
877 memcpy(spec.loc_host, &fk.addrs.v6addrs.dst, sizeof(struct in6_addr));
880 spec.rem_port = fk.ports.src;
881 spec.loc_port = fk.ports.dst;
883 rc = efx->type->filter_rfs_insert(efx, &spec);
892 if (spec.ether_type == htons(ETH_P_IP))
895 (spec.ip_proto == IPPROTO_TCP) ? "TCP" : "UDP",
896 spec.rem_host, ntohs(spec.rem_port), spec.loc_host,
897 ntohs(spec.loc_port), rxq_index, flow_id, rc);
901 (spec.ip_proto == IPPROTO_TCP) ? "TCP" : "UDP",
902 spec.rem_host, ntohs(spec.rem_port), spec.loc_host,
903 ntohs(spec.loc_port), rxq_index, flow_id, rc);
948 * ef4_filter_is_mc_recipient - test whether spec is a multicast recipient
949 * @spec: Specification to test
956 bool ef4_filter_is_mc_recipient(const struct ef4_filter_spec *spec)
958 if (!(spec->flags & EF4_FILTER_FLAG_RX) ||
959 spec->dmaq_id == EF4_FILTER_RX_DMAQ_ID_DROP)
962 if (spec->match_flags &
964 is_multicast_ether_addr(spec->loc_mac))
967 if ((spec->match_flags &
970 if (spec->ether_type == htons(ETH_P_IP) &&
971 ipv4_is_multicast(spec->loc_host[0]))
973 if (spec->ether_type == htons(ETH_P_IPV6) &&
974 ((const u8 *)spec->loc_host)[0] == 0xff)