byteswap to cpu or network order */
| 58 | |
| 59 | /* byteswap to cpu or network order */ |
| 60 | static void |
| 61 | bswap_test_data(struct ipv4_7tuple *data, int len, int to_be) |
| 62 | { |
| 63 | int i; |
| 64 | |
| 65 | for (i = 0; i < len; i++) { |
| 66 | |
| 67 | if (to_be) { |
| 68 | /* swap all bytes so that they are in network order */ |
| 69 | data[i].ip_dst = rte_cpu_to_be_32(data[i].ip_dst); |
| 70 | data[i].ip_src = rte_cpu_to_be_32(data[i].ip_src); |
| 71 | data[i].port_dst = rte_cpu_to_be_16(data[i].port_dst); |
| 72 | data[i].port_src = rte_cpu_to_be_16(data[i].port_src); |
| 73 | data[i].vlan = rte_cpu_to_be_16(data[i].vlan); |
| 74 | data[i].domain = rte_cpu_to_be_16(data[i].domain); |
| 75 | } else { |
| 76 | data[i].ip_dst = rte_be_to_cpu_32(data[i].ip_dst); |
| 77 | data[i].ip_src = rte_be_to_cpu_32(data[i].ip_src); |
| 78 | data[i].port_dst = rte_be_to_cpu_16(data[i].port_dst); |
| 79 | data[i].port_src = rte_be_to_cpu_16(data[i].port_src); |
| 80 | data[i].vlan = rte_be_to_cpu_16(data[i].vlan); |
| 81 | data[i].domain = rte_be_to_cpu_16(data[i].domain); |
| 82 | } |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | static int |
| 87 | acl_ipv4vlan_check_rule(const struct rte_acl_ipv4vlan_rule *rule) |
no outgoing calls
no test coverage detected