Lines Matching refs:gen_spec
1964 const struct ef4_filter_spec *gen_spec) in ef4_farch_filter_from_gen_spec() argument
1968 if ((gen_spec->flags & EF4_FILTER_FLAG_RX_RSS) && in ef4_farch_filter_from_gen_spec()
1969 gen_spec->rss_context != EF4_FILTER_RSS_CONTEXT_DEFAULT) in ef4_farch_filter_from_gen_spec()
1972 spec->priority = gen_spec->priority; in ef4_farch_filter_from_gen_spec()
1973 spec->flags = gen_spec->flags; in ef4_farch_filter_from_gen_spec()
1974 spec->dmaq_id = gen_spec->dmaq_id; in ef4_farch_filter_from_gen_spec()
1976 switch (gen_spec->match_flags) { in ef4_farch_filter_from_gen_spec()
1987 EF4_BUG_ON_PARANOID(!(gen_spec->flags & EF4_FILTER_FLAG_RX)); in ef4_farch_filter_from_gen_spec()
1989 if (gen_spec->ether_type != htons(ETH_P_IP)) in ef4_farch_filter_from_gen_spec()
1991 if (gen_spec->loc_port == 0 || in ef4_farch_filter_from_gen_spec()
1992 (is_full && gen_spec->rem_port == 0)) in ef4_farch_filter_from_gen_spec()
1994 switch (gen_spec->ip_proto) { in ef4_farch_filter_from_gen_spec()
2012 rhost = is_full ? gen_spec->rem_host[0] : 0; in ef4_farch_filter_from_gen_spec()
2013 rport = is_full ? gen_spec->rem_port : 0; in ef4_farch_filter_from_gen_spec()
2015 host2 = gen_spec->loc_host[0]; in ef4_farch_filter_from_gen_spec()
2016 if (!is_full && gen_spec->ip_proto == IPPROTO_UDP) { in ef4_farch_filter_from_gen_spec()
2017 port1 = gen_spec->loc_port; in ef4_farch_filter_from_gen_spec()
2021 port2 = gen_spec->loc_port; in ef4_farch_filter_from_gen_spec()
2036 spec->data[0] = is_full ? ntohs(gen_spec->outer_vid) : 0; in ef4_farch_filter_from_gen_spec()
2037 spec->data[1] = (gen_spec->loc_mac[2] << 24 | in ef4_farch_filter_from_gen_spec()
2038 gen_spec->loc_mac[3] << 16 | in ef4_farch_filter_from_gen_spec()
2039 gen_spec->loc_mac[4] << 8 | in ef4_farch_filter_from_gen_spec()
2040 gen_spec->loc_mac[5]); in ef4_farch_filter_from_gen_spec()
2041 spec->data[2] = (gen_spec->loc_mac[0] << 8 | in ef4_farch_filter_from_gen_spec()
2042 gen_spec->loc_mac[1]); in ef4_farch_filter_from_gen_spec()
2046 spec->type = (is_multicast_ether_addr(gen_spec->loc_mac) ? in ef4_farch_filter_from_gen_spec()
2060 ef4_farch_filter_to_gen_spec(struct ef4_filter_spec *gen_spec, in ef4_farch_filter_to_gen_spec() argument
2069 memset(gen_spec, 0, sizeof(*gen_spec)); in ef4_farch_filter_to_gen_spec()
2071 gen_spec->priority = spec->priority; in ef4_farch_filter_to_gen_spec()
2072 gen_spec->flags = spec->flags; in ef4_farch_filter_to_gen_spec()
2073 gen_spec->dmaq_id = spec->dmaq_id; in ef4_farch_filter_to_gen_spec()
2085 gen_spec->match_flags = in ef4_farch_filter_to_gen_spec()
2090 gen_spec->match_flags |= (EF4_FILTER_MATCH_REM_HOST | in ef4_farch_filter_to_gen_spec()
2092 gen_spec->ether_type = htons(ETH_P_IP); in ef4_farch_filter_to_gen_spec()
2093 gen_spec->ip_proto = in ef4_farch_filter_to_gen_spec()
2103 gen_spec->loc_host[0] = host1; in ef4_farch_filter_to_gen_spec()
2104 gen_spec->rem_host[0] = host2; in ef4_farch_filter_to_gen_spec()
2106 gen_spec->loc_host[0] = host2; in ef4_farch_filter_to_gen_spec()
2107 gen_spec->rem_host[0] = host1; in ef4_farch_filter_to_gen_spec()
2109 if (!!(gen_spec->flags & EF4_FILTER_FLAG_TX) ^ in ef4_farch_filter_to_gen_spec()
2110 (!is_full && gen_spec->ip_proto == IPPROTO_UDP)) { in ef4_farch_filter_to_gen_spec()
2111 gen_spec->loc_port = port1; in ef4_farch_filter_to_gen_spec()
2112 gen_spec->rem_port = port2; in ef4_farch_filter_to_gen_spec()
2114 gen_spec->loc_port = port2; in ef4_farch_filter_to_gen_spec()
2115 gen_spec->rem_port = port1; in ef4_farch_filter_to_gen_spec()
2125 gen_spec->match_flags = EF4_FILTER_MATCH_LOC_MAC; in ef4_farch_filter_to_gen_spec()
2127 gen_spec->match_flags |= EF4_FILTER_MATCH_OUTER_VID; in ef4_farch_filter_to_gen_spec()
2128 gen_spec->loc_mac[0] = spec->data[2] >> 8; in ef4_farch_filter_to_gen_spec()
2129 gen_spec->loc_mac[1] = spec->data[2]; in ef4_farch_filter_to_gen_spec()
2130 gen_spec->loc_mac[2] = spec->data[1] >> 24; in ef4_farch_filter_to_gen_spec()
2131 gen_spec->loc_mac[3] = spec->data[1] >> 16; in ef4_farch_filter_to_gen_spec()
2132 gen_spec->loc_mac[4] = spec->data[1] >> 8; in ef4_farch_filter_to_gen_spec()
2133 gen_spec->loc_mac[5] = spec->data[1]; in ef4_farch_filter_to_gen_spec()
2134 gen_spec->outer_vid = htons(spec->data[0]); in ef4_farch_filter_to_gen_spec()
2139 gen_spec->match_flags = EF4_FILTER_MATCH_LOC_MAC_IG; in ef4_farch_filter_to_gen_spec()
2140 gen_spec->loc_mac[0] = spec->type == EF4_FARCH_FILTER_MC_DEF; in ef4_farch_filter_to_gen_spec()
2319 struct ef4_filter_spec *gen_spec, in ef4_farch_filter_insert() argument
2330 rc = ef4_farch_filter_from_gen_spec(&spec, gen_spec); in ef4_farch_filter_insert()
2822 struct ef4_filter_spec *gen_spec) in ef4_farch_filter_rfs_insert() argument
2824 return ef4_farch_filter_insert(efx, gen_spec, true); in ef4_farch_filter_rfs_insert()