Lines Matching refs:tuple

44  * ipv6 and port nat (5) + tuple fields (4) + nic mode zone restore (1) = 10.
153 struct mlx5_ct_tuple tuple;
186 .key_offset = offsetof(struct mlx5_ct_entry, tuple),
187 .key_len = sizeof(((struct mlx5_ct_entry *)0)->tuple),
229 mlx5_tc_ct_rule_to_tuple(struct mlx5_ct_tuple *tuple, struct flow_rule *rule)
237 tuple->n_proto = basic.key->n_proto;
238 tuple->ip_proto = basic.key->ip_proto;
239 tuple->addr_type = control.key->addr_type;
241 if (tuple->addr_type == FLOW_DISSECTOR_KEY_IPV4_ADDRS) {
245 tuple->ip.src_v4 = match.key->src;
246 tuple->ip.dst_v4 = match.key->dst;
247 } else if (tuple->addr_type == FLOW_DISSECTOR_KEY_IPV6_ADDRS) {
251 tuple->ip.src_v6 = match.key->src;
252 tuple->ip.dst_v6 = match.key->dst;
261 switch (tuple->ip_proto) {
264 tuple->port.src = match.key->src;
265 tuple->port.dst = match.key->dst;
271 if (tuple->ip_proto != IPPROTO_GRE)
279 mlx5_tc_ct_rule_to_tuple_nat(struct mlx5_ct_tuple *tuple,
296 tuple->ip.src_v4 = cpu_to_be32(val);
298 tuple->ip.dst_v4 = cpu_to_be32(val);
307 tuple->ip.src_v6.s6_addr32[ip6_offset] = cpu_to_be32(val);
309 tuple->ip.dst_v6.s6_addr32[ip6_offset - 4] = cpu_to_be32(val);
316 tuple->port.src = cpu_to_be16(val);
318 tuple->port.dst = cpu_to_be16(val);
325 tuple->port.src = cpu_to_be16(val);
327 tuple->port.dst = cpu_to_be16(val);
517 ct_dbg("Deleting ct entry rule in zone %d", entry->tuple.zone);
829 if (entry->tuple.ip_proto == IPPROTO_TCP ||
830 entry->tuple.ip_proto == IPPROTO_UDP)
840 mlx5e_tc_match_to_reg_match(spec, ZONE_TO_REG, entry->tuple.zone, MLX5_CT_ZONE_MASK);
852 ct_dbg("Offloaded ct entry rule in zone %d", entry->tuple.zone);
898 mlx5e_tc_match_to_reg_match(spec, ZONE_TO_REG, entry->tuple.zone, MLX5_CT_ZONE_MASK);
915 ct_dbg("Replaced ct entry rule in zone %d", entry->tuple.zone);
936 mlx5_tc_ct_entry_get(struct mlx5_tc_ct_priv *ct_priv, struct mlx5_ct_tuple *tuple)
940 entry = rhashtable_lookup_fast(&ct_priv->ct_tuples_ht, tuple,
947 tuple, tuples_nat_ht_params);
1033 struct mlx5_ct_tuple rev_tuple = entry->tuple;
1037 /* get the reversed tuple */
1205 entry->tuple.zone = ft->zone;
1211 err = mlx5_tc_ct_rule_to_tuple(&entry->tuple, flow_rule);
1215 memcpy(&entry->tuple_nat, &entry->tuple, sizeof(entry->tuple));
1233 if (memcmp(&entry->tuple, &entry->tuple_nat, sizeof(entry->tuple))) {
1358 mlx5_tc_ct_skb_to_tuple(struct sk_buff *skb, struct mlx5_ct_tuple *tuple,
1366 tuple->zone = zone;
1375 tuple->port.src = flow_keys.ports.src;
1376 tuple->port.dst = flow_keys.ports.dst;
1378 tuple->n_proto = flow_keys.basic.n_proto;
1379 tuple->ip_proto = flow_keys.basic.ip_proto;
1383 tuple->addr_type = FLOW_DISSECTOR_KEY_IPV4_ADDRS;
1384 tuple->ip.src_v4 = flow_keys.addrs.v4addrs.src;
1385 tuple->ip.dst_v4 = flow_keys.addrs.v4addrs.dst;
1389 tuple->addr_type = FLOW_DISSECTOR_KEY_IPV6_ADDRS;
1390 tuple->ip.src_v6 = flow_keys.addrs.v6addrs.src;
1391 tuple->ip.dst_v6 = flow_keys.addrs.v6addrs.dst;
1907 * + tuple + zone match +
2292 struct mlx5_ct_tuple tuple = {};
2302 if (!mlx5_tc_ct_skb_to_tuple(skb, &tuple, zone))
2307 entry = mlx5_tc_ct_entry_get(ct_priv, &tuple);