Lines Matching refs:gen_spec
2034 const struct efx_filter_spec *gen_spec) in efx_farch_filter_from_gen_spec() argument
2038 if ((gen_spec->flags & EFX_FILTER_FLAG_RX_RSS) && gen_spec->rss_context) in efx_farch_filter_from_gen_spec()
2041 spec->priority = gen_spec->priority; in efx_farch_filter_from_gen_spec()
2042 spec->flags = gen_spec->flags; in efx_farch_filter_from_gen_spec()
2043 spec->dmaq_id = gen_spec->dmaq_id; in efx_farch_filter_from_gen_spec()
2045 switch (gen_spec->match_flags) { in efx_farch_filter_from_gen_spec()
2056 EFX_WARN_ON_PARANOID(!(gen_spec->flags & EFX_FILTER_FLAG_RX)); in efx_farch_filter_from_gen_spec()
2058 if (gen_spec->ether_type != htons(ETH_P_IP)) in efx_farch_filter_from_gen_spec()
2060 if (gen_spec->loc_port == 0 || in efx_farch_filter_from_gen_spec()
2061 (is_full && gen_spec->rem_port == 0)) in efx_farch_filter_from_gen_spec()
2063 switch (gen_spec->ip_proto) { in efx_farch_filter_from_gen_spec()
2081 rhost = is_full ? gen_spec->rem_host[0] : 0; in efx_farch_filter_from_gen_spec()
2082 rport = is_full ? gen_spec->rem_port : 0; in efx_farch_filter_from_gen_spec()
2084 host2 = gen_spec->loc_host[0]; in efx_farch_filter_from_gen_spec()
2085 if (!is_full && gen_spec->ip_proto == IPPROTO_UDP) { in efx_farch_filter_from_gen_spec()
2086 port1 = gen_spec->loc_port; in efx_farch_filter_from_gen_spec()
2090 port2 = gen_spec->loc_port; in efx_farch_filter_from_gen_spec()
2105 spec->data[0] = is_full ? ntohs(gen_spec->outer_vid) : 0; in efx_farch_filter_from_gen_spec()
2106 spec->data[1] = (gen_spec->loc_mac[2] << 24 | in efx_farch_filter_from_gen_spec()
2107 gen_spec->loc_mac[3] << 16 | in efx_farch_filter_from_gen_spec()
2108 gen_spec->loc_mac[4] << 8 | in efx_farch_filter_from_gen_spec()
2109 gen_spec->loc_mac[5]); in efx_farch_filter_from_gen_spec()
2110 spec->data[2] = (gen_spec->loc_mac[0] << 8 | in efx_farch_filter_from_gen_spec()
2111 gen_spec->loc_mac[1]); in efx_farch_filter_from_gen_spec()
2115 spec->type = (is_multicast_ether_addr(gen_spec->loc_mac) ? in efx_farch_filter_from_gen_spec()
2129 efx_farch_filter_to_gen_spec(struct efx_filter_spec *gen_spec, in efx_farch_filter_to_gen_spec() argument
2138 memset(gen_spec, 0, sizeof(*gen_spec)); in efx_farch_filter_to_gen_spec()
2140 gen_spec->priority = spec->priority; in efx_farch_filter_to_gen_spec()
2141 gen_spec->flags = spec->flags; in efx_farch_filter_to_gen_spec()
2142 gen_spec->dmaq_id = spec->dmaq_id; in efx_farch_filter_to_gen_spec()
2154 gen_spec->match_flags = in efx_farch_filter_to_gen_spec()
2159 gen_spec->match_flags |= (EFX_FILTER_MATCH_REM_HOST | in efx_farch_filter_to_gen_spec()
2161 gen_spec->ether_type = htons(ETH_P_IP); in efx_farch_filter_to_gen_spec()
2162 gen_spec->ip_proto = in efx_farch_filter_to_gen_spec()
2172 gen_spec->loc_host[0] = host1; in efx_farch_filter_to_gen_spec()
2173 gen_spec->rem_host[0] = host2; in efx_farch_filter_to_gen_spec()
2175 gen_spec->loc_host[0] = host2; in efx_farch_filter_to_gen_spec()
2176 gen_spec->rem_host[0] = host1; in efx_farch_filter_to_gen_spec()
2178 if (!!(gen_spec->flags & EFX_FILTER_FLAG_TX) ^ in efx_farch_filter_to_gen_spec()
2179 (!is_full && gen_spec->ip_proto == IPPROTO_UDP)) { in efx_farch_filter_to_gen_spec()
2180 gen_spec->loc_port = port1; in efx_farch_filter_to_gen_spec()
2181 gen_spec->rem_port = port2; in efx_farch_filter_to_gen_spec()
2183 gen_spec->loc_port = port2; in efx_farch_filter_to_gen_spec()
2184 gen_spec->rem_port = port1; in efx_farch_filter_to_gen_spec()
2194 gen_spec->match_flags = EFX_FILTER_MATCH_LOC_MAC; in efx_farch_filter_to_gen_spec()
2196 gen_spec->match_flags |= EFX_FILTER_MATCH_OUTER_VID; in efx_farch_filter_to_gen_spec()
2197 gen_spec->loc_mac[0] = spec->data[2] >> 8; in efx_farch_filter_to_gen_spec()
2198 gen_spec->loc_mac[1] = spec->data[2]; in efx_farch_filter_to_gen_spec()
2199 gen_spec->loc_mac[2] = spec->data[1] >> 24; in efx_farch_filter_to_gen_spec()
2200 gen_spec->loc_mac[3] = spec->data[1] >> 16; in efx_farch_filter_to_gen_spec()
2201 gen_spec->loc_mac[4] = spec->data[1] >> 8; in efx_farch_filter_to_gen_spec()
2202 gen_spec->loc_mac[5] = spec->data[1]; in efx_farch_filter_to_gen_spec()
2203 gen_spec->outer_vid = htons(spec->data[0]); in efx_farch_filter_to_gen_spec()
2208 gen_spec->match_flags = EFX_FILTER_MATCH_LOC_MAC_IG; in efx_farch_filter_to_gen_spec()
2209 gen_spec->loc_mac[0] = spec->type == EFX_FARCH_FILTER_MC_DEF; in efx_farch_filter_to_gen_spec()
2388 struct efx_filter_spec *gen_spec, in efx_farch_filter_insert() argument
2399 rc = efx_farch_filter_from_gen_spec(&spec, gen_spec); in efx_farch_filter_insert()