• Home
  • Raw
  • Download

Lines Matching refs:gen_spec

2031 			       const struct efx_filter_spec *gen_spec)  in efx_farch_filter_from_gen_spec()  argument
2035 if ((gen_spec->flags & EFX_FILTER_FLAG_RX_RSS) && gen_spec->rss_context) in efx_farch_filter_from_gen_spec()
2038 spec->priority = gen_spec->priority; in efx_farch_filter_from_gen_spec()
2039 spec->flags = gen_spec->flags; in efx_farch_filter_from_gen_spec()
2040 spec->dmaq_id = gen_spec->dmaq_id; in efx_farch_filter_from_gen_spec()
2042 switch (gen_spec->match_flags) { in efx_farch_filter_from_gen_spec()
2053 EFX_WARN_ON_PARANOID(!(gen_spec->flags & EFX_FILTER_FLAG_RX)); in efx_farch_filter_from_gen_spec()
2055 if (gen_spec->ether_type != htons(ETH_P_IP)) in efx_farch_filter_from_gen_spec()
2057 if (gen_spec->loc_port == 0 || in efx_farch_filter_from_gen_spec()
2058 (is_full && gen_spec->rem_port == 0)) in efx_farch_filter_from_gen_spec()
2060 switch (gen_spec->ip_proto) { in efx_farch_filter_from_gen_spec()
2078 rhost = is_full ? gen_spec->rem_host[0] : 0; in efx_farch_filter_from_gen_spec()
2079 rport = is_full ? gen_spec->rem_port : 0; in efx_farch_filter_from_gen_spec()
2081 host2 = gen_spec->loc_host[0]; in efx_farch_filter_from_gen_spec()
2082 if (!is_full && gen_spec->ip_proto == IPPROTO_UDP) { in efx_farch_filter_from_gen_spec()
2083 port1 = gen_spec->loc_port; in efx_farch_filter_from_gen_spec()
2087 port2 = gen_spec->loc_port; in efx_farch_filter_from_gen_spec()
2102 spec->data[0] = is_full ? ntohs(gen_spec->outer_vid) : 0; in efx_farch_filter_from_gen_spec()
2103 spec->data[1] = (gen_spec->loc_mac[2] << 24 | in efx_farch_filter_from_gen_spec()
2104 gen_spec->loc_mac[3] << 16 | in efx_farch_filter_from_gen_spec()
2105 gen_spec->loc_mac[4] << 8 | in efx_farch_filter_from_gen_spec()
2106 gen_spec->loc_mac[5]); in efx_farch_filter_from_gen_spec()
2107 spec->data[2] = (gen_spec->loc_mac[0] << 8 | in efx_farch_filter_from_gen_spec()
2108 gen_spec->loc_mac[1]); in efx_farch_filter_from_gen_spec()
2112 spec->type = (is_multicast_ether_addr(gen_spec->loc_mac) ? in efx_farch_filter_from_gen_spec()
2126 efx_farch_filter_to_gen_spec(struct efx_filter_spec *gen_spec, in efx_farch_filter_to_gen_spec() argument
2135 memset(gen_spec, 0, sizeof(*gen_spec)); in efx_farch_filter_to_gen_spec()
2137 gen_spec->priority = spec->priority; in efx_farch_filter_to_gen_spec()
2138 gen_spec->flags = spec->flags; in efx_farch_filter_to_gen_spec()
2139 gen_spec->dmaq_id = spec->dmaq_id; in efx_farch_filter_to_gen_spec()
2151 gen_spec->match_flags = in efx_farch_filter_to_gen_spec()
2156 gen_spec->match_flags |= (EFX_FILTER_MATCH_REM_HOST | in efx_farch_filter_to_gen_spec()
2158 gen_spec->ether_type = htons(ETH_P_IP); in efx_farch_filter_to_gen_spec()
2159 gen_spec->ip_proto = in efx_farch_filter_to_gen_spec()
2169 gen_spec->loc_host[0] = host1; in efx_farch_filter_to_gen_spec()
2170 gen_spec->rem_host[0] = host2; in efx_farch_filter_to_gen_spec()
2172 gen_spec->loc_host[0] = host2; in efx_farch_filter_to_gen_spec()
2173 gen_spec->rem_host[0] = host1; in efx_farch_filter_to_gen_spec()
2175 if (!!(gen_spec->flags & EFX_FILTER_FLAG_TX) ^ in efx_farch_filter_to_gen_spec()
2176 (!is_full && gen_spec->ip_proto == IPPROTO_UDP)) { in efx_farch_filter_to_gen_spec()
2177 gen_spec->loc_port = port1; in efx_farch_filter_to_gen_spec()
2178 gen_spec->rem_port = port2; in efx_farch_filter_to_gen_spec()
2180 gen_spec->loc_port = port2; in efx_farch_filter_to_gen_spec()
2181 gen_spec->rem_port = port1; in efx_farch_filter_to_gen_spec()
2191 gen_spec->match_flags = EFX_FILTER_MATCH_LOC_MAC; in efx_farch_filter_to_gen_spec()
2193 gen_spec->match_flags |= EFX_FILTER_MATCH_OUTER_VID; in efx_farch_filter_to_gen_spec()
2194 gen_spec->loc_mac[0] = spec->data[2] >> 8; in efx_farch_filter_to_gen_spec()
2195 gen_spec->loc_mac[1] = spec->data[2]; in efx_farch_filter_to_gen_spec()
2196 gen_spec->loc_mac[2] = spec->data[1] >> 24; in efx_farch_filter_to_gen_spec()
2197 gen_spec->loc_mac[3] = spec->data[1] >> 16; in efx_farch_filter_to_gen_spec()
2198 gen_spec->loc_mac[4] = spec->data[1] >> 8; in efx_farch_filter_to_gen_spec()
2199 gen_spec->loc_mac[5] = spec->data[1]; in efx_farch_filter_to_gen_spec()
2200 gen_spec->outer_vid = htons(spec->data[0]); in efx_farch_filter_to_gen_spec()
2205 gen_spec->match_flags = EFX_FILTER_MATCH_LOC_MAC_IG; in efx_farch_filter_to_gen_spec()
2206 gen_spec->loc_mac[0] = spec->type == EFX_FARCH_FILTER_MC_DEF; in efx_farch_filter_to_gen_spec()
2385 struct efx_filter_spec *gen_spec, in efx_farch_filter_insert() argument
2396 rc = efx_farch_filter_from_gen_spec(&spec, gen_spec); in efx_farch_filter_insert()