summaryrefslogtreecommitdiff
path: root/examples/server_node_efd
diff options
context:
space:
mode:
authorOlivier Matz <[email protected]>2019-05-21 18:13:10 +0200
committerFerruh Yigit <[email protected]>2019-05-24 13:34:46 +0200
commita7c528e5d71ff3f569898d268f9de129fdfc152b (patch)
treeead7c352fb1a817707a3ffbe471e6484850607d4 /examples/server_node_efd
parentecaeed4f1d042b4317f756ad49ab4d918d0e4f76 (diff)
net: add rte prefix to IP structure
Add 'rte_' prefix to structures: - rename struct ipv4_hdr as struct rte_ipv4_hdr. - rename struct ipv6_hdr as struct rte_ipv6_hdr. Signed-off-by: Olivier Matz <[email protected]> Reviewed-by: Stephen Hemminger <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
Diffstat (limited to 'examples/server_node_efd')
-rw-r--r--examples/server_node_efd/node/node.c6
-rw-r--r--examples/server_node_efd/server/main.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/examples/server_node_efd/node/node.c b/examples/server_node_efd/node/node.c
index 8bec351ec1..67a55808bf 100644
--- a/examples/server_node_efd/node/node.c
+++ b/examples/server_node_efd/node/node.c
@@ -266,7 +266,7 @@ transmit_packet(struct rte_mbuf *buf)
static inline void
handle_packets(struct rte_hash *h, struct rte_mbuf **bufs, uint16_t num_packets)
{
- struct ipv4_hdr *ipv4_hdr;
+ struct rte_ipv4_hdr *ipv4_hdr;
uint32_t ipv4_dst_ip[PKT_READ_SIZE];
const void *key_ptrs[PKT_READ_SIZE];
unsigned int i;
@@ -274,8 +274,8 @@ handle_packets(struct rte_hash *h, struct rte_mbuf **bufs, uint16_t num_packets)
for (i = 0; i < num_packets; i++) {
/* Handle IPv4 header.*/
- ipv4_hdr = rte_pktmbuf_mtod_offset(bufs[i], struct ipv4_hdr *,
- sizeof(struct rte_ether_hdr));
+ ipv4_hdr = rte_pktmbuf_mtod_offset(bufs[i],
+ struct rte_ipv4_hdr *, sizeof(struct rte_ether_hdr));
ipv4_dst_ip[i] = ipv4_hdr->dst_addr;
key_ptrs[i] = &ipv4_dst_ip[i];
}
diff --git a/examples/server_node_efd/server/main.c b/examples/server_node_efd/server/main.c
index a086c5a779..7b4657e42b 100644
--- a/examples/server_node_efd/server/main.c
+++ b/examples/server_node_efd/server/main.c
@@ -247,13 +247,13 @@ process_packets(uint32_t port_num __rte_unused, struct rte_mbuf *pkts[],
efd_value_t data[RTE_EFD_BURST_MAX];
const void *key_ptrs[RTE_EFD_BURST_MAX];
- struct ipv4_hdr *ipv4_hdr;
+ struct rte_ipv4_hdr *ipv4_hdr;
uint32_t ipv4_dst_ip[RTE_EFD_BURST_MAX];
for (i = 0; i < rx_count; i++) {
/* Handle IPv4 header.*/
- ipv4_hdr = rte_pktmbuf_mtod_offset(pkts[i], struct ipv4_hdr *,
- sizeof(struct rte_ether_hdr));
+ ipv4_hdr = rte_pktmbuf_mtod_offset(pkts[i],
+ struct rte_ipv4_hdr *, sizeof(struct rte_ether_hdr));
ipv4_dst_ip[i] = ipv4_hdr->dst_addr;
key_ptrs[i] = (void *)&ipv4_dst_ip[i];
}