Lines Matching refs:tuple

37 	/* Given an address into ethhdr build a header from tuple info */
40 /* Stringify the tuple for a print into the provided buffer */
58 struct qede_arfs_tuple tuple;
111 if (n->tuple.stringify) {
114 n->tuple.stringify(&n->tuple, tuple_buffer);
158 fltr->tuple.mode);
159 edev->arfs->mode = fltr->tuple.mode;
197 ntohs(fltr->tuple.src_port),
198 ntohs(fltr->tuple.dst_port), fltr->rxq_id);
370 if (tpos->tuple.src_ipv4 == ip_hdr(skb)->saddr &&
371 tpos->tuple.dst_ipv4 == ip_hdr(skb)->daddr)
376 struct in6_addr *src = &tpos->tuple.src_ipv6;
380 !memcmp(&tpos->tuple.dst_ipv6, &ipv6_hdr(skb)->daddr, size))
394 if (tpos->tuple.ip_proto == ip_proto &&
395 tpos->tuple.eth_proto == skb->protocol &&
397 tpos->tuple.src_port == src_port &&
398 tpos->tuple.dst_port == dst_port)
498 n->tuple.src_port = ports[0];
499 n->tuple.dst_port = ports[1];
503 n->tuple.src_ipv4 = ip_hdr(skb)->saddr;
504 n->tuple.dst_ipv4 = ip_hdr(skb)->daddr;
506 memcpy(&n->tuple.src_ipv6, &ipv6_hdr(skb)->saddr,
508 memcpy(&n->tuple.dst_ipv6, &ipv6_hdr(skb)->daddr,
514 n->tuple.eth_proto = skb->protocol;
515 n->tuple.ip_proto = ip_proto;
516 n->tuple.mode = QED_FILTER_CONFIG_MODE_5_TUPLE;
1342 if (fltr->tuple.eth_proto == htons(ETH_P_IP)) {
1343 if (fltr->tuple.ip_proto == IPPROTO_TCP)
1348 fsp->h_u.tcp_ip4_spec.psrc = fltr->tuple.src_port;
1349 fsp->h_u.tcp_ip4_spec.pdst = fltr->tuple.dst_port;
1350 fsp->h_u.tcp_ip4_spec.ip4src = fltr->tuple.src_ipv4;
1351 fsp->h_u.tcp_ip4_spec.ip4dst = fltr->tuple.dst_ipv4;
1353 if (fltr->tuple.ip_proto == IPPROTO_TCP)
1357 fsp->h_u.tcp_ip6_spec.psrc = fltr->tuple.src_port;
1358 fsp->h_u.tcp_ip6_spec.pdst = fltr->tuple.dst_port;
1360 &fltr->tuple.src_ipv6, sizeof(struct in6_addr));
1362 &fltr->tuple.dst_ipv6, sizeof(struct in6_addr));
1541 NL_SET_ERR_MSG_MOD(extack, "Invalid N-tuple");
1576 NL_SET_ERR_MSG_MOD(extack, "Invalid N-tuple");
1597 if (fltr->tuple.ip_proto == t->ip_proto &&
1598 fltr->tuple.src_port == t->src_port &&
1599 fltr->tuple.dst_port == t->dst_port &&
1600 t->ip_comp(&fltr->tuple, t))
1622 "Configuring N-tuple for VF 0x%02x\n", n->vfid - 1);
1790 qede_flow_parse_tcp_v6(struct flow_rule *rule, struct qede_arfs_tuple *tuple,
1793 tuple->ip_proto = IPPROTO_TCP;
1794 tuple->eth_proto = htons(ETH_P_IPV6);
1796 return qede_flow_parse_v6_common(rule, tuple, extack);
1800 qede_flow_parse_tcp_v4(struct flow_rule *rule, struct qede_arfs_tuple *tuple,
1803 tuple->ip_proto = IPPROTO_TCP;
1804 tuple->eth_proto = htons(ETH_P_IP);
1806 return qede_flow_parse_v4_common(rule, tuple, extack);
1810 qede_flow_parse_udp_v6(struct flow_rule *rule, struct qede_arfs_tuple *tuple,
1813 tuple->ip_proto = IPPROTO_UDP;
1814 tuple->eth_proto = htons(ETH_P_IPV6);
1816 return qede_flow_parse_v6_common(rule, tuple, extack);
1820 qede_flow_parse_udp_v4(struct flow_rule *rule, struct qede_arfs_tuple *tuple,
1823 tuple->ip_proto = IPPROTO_UDP;
1824 tuple->eth_proto = htons(ETH_P_IP);
1826 return qede_flow_parse_v4_common(rule, tuple, extack);
1831 struct qede_arfs_tuple *tuple,
1838 memset(tuple, 0, sizeof(*tuple));
1869 rc = qede_flow_parse_tcp_v4(rule, tuple, extack);
1871 rc = qede_flow_parse_tcp_v6(rule, tuple, extack);
1873 rc = qede_flow_parse_udp_v4(rule, tuple, extack);
1875 rc = qede_flow_parse_udp_v6(rule, tuple, extack);
1937 memcpy(&n->tuple, &t, sizeof(n->tuple));
1943 n->tuple.build_hdr(&n->tuple, n->data);
2083 memcpy(&n->tuple, &t, sizeof(n->tuple));
2088 n->tuple.build_hdr(&n->tuple, n->data);