common/octeontx2: add VF mailbox IRQ and msg handler
[dpdk.git] / examples / l3fwd-vf / main.c
index 5e3809b..9594867 100644 (file)
@@ -201,10 +201,10 @@ struct l3fwd_route {
 };
 
 static struct l3fwd_route l3fwd_route_array[] = {
-       {{RTE_IPv4(100,10,0,1), RTE_IPv4(200,10,0,1), 101, 11, IPPROTO_TCP}, 0},
-       {{RTE_IPv4(100,20,0,2), RTE_IPv4(200,20,0,2), 102, 12, IPPROTO_TCP}, 1},
-       {{RTE_IPv4(100,30,0,3), RTE_IPv4(200,30,0,3), 103, 13, IPPROTO_TCP}, 2},
-       {{RTE_IPv4(100,40,0,4), RTE_IPv4(200,40,0,4), 104, 14, IPPROTO_TCP}, 3},
+       {{RTE_IPV4(100,10,0,1), RTE_IPV4(200,10,0,1), 101, 11, IPPROTO_TCP}, 0},
+       {{RTE_IPV4(100,20,0,2), RTE_IPV4(200,20,0,2), 102, 12, IPPROTO_TCP}, 1},
+       {{RTE_IPV4(100,30,0,3), RTE_IPV4(200,30,0,3), 103, 13, IPPROTO_TCP}, 2},
+       {{RTE_IPV4(100,40,0,4), RTE_IPV4(200,40,0,4), 104, 14, IPPROTO_TCP}, 3},
 };
 
 typedef struct rte_hash lookup_struct_t;
@@ -234,14 +234,14 @@ struct l3fwd_route {
 };
 
 static struct l3fwd_route l3fwd_route_array[] = {
-       {RTE_IPv4(1,1,1,0), 24, 0},
-       {RTE_IPv4(2,1,1,0), 24, 1},
-       {RTE_IPv4(3,1,1,0), 24, 2},
-       {RTE_IPv4(4,1,1,0), 24, 3},
-       {RTE_IPv4(5,1,1,0), 24, 4},
-       {RTE_IPv4(6,1,1,0), 24, 5},
-       {RTE_IPv4(7,1,1,0), 24, 6},
-       {RTE_IPv4(8,1,1,0), 24, 7},
+       {RTE_IPV4(1,1,1,0), 24, 0},
+       {RTE_IPV4(2,1,1,0), 24, 1},
+       {RTE_IPV4(3,1,1,0), 24, 2},
+       {RTE_IPV4(4,1,1,0), 24, 3},
+       {RTE_IPV4(5,1,1,0), 24, 4},
+       {RTE_IPV4(6,1,1,0), 24, 5},
+       {RTE_IPV4(7,1,1,0), 24, 6},
+       {RTE_IPV4(8,1,1,0), 24, 7},
 };
 
 #define L3FWD_NUM_ROUTES \
@@ -366,8 +366,8 @@ get_dst_port(struct rte_ipv4_hdr *ipv4_hdr, uint16_t portid,
              lookup_struct_t *l3fwd_lookup_struct)
 {
        struct ipv4_5tuple key;
-       struct tcp_hdr *tcp;
-       struct udp_hdr *udp;
+       struct rte_tcp_hdr *tcp;
+       struct rte_udp_hdr *udp;
        int ret = 0;
 
        key.ip_dst = rte_be_to_cpu_32(ipv4_hdr->dst_addr);
@@ -376,14 +376,14 @@ get_dst_port(struct rte_ipv4_hdr *ipv4_hdr, uint16_t portid,
 
        switch (ipv4_hdr->next_proto_id) {
        case IPPROTO_TCP:
-               tcp = (struct tcp_hdr *)((unsigned char *) ipv4_hdr +
+               tcp = (struct rte_tcp_hdr *)((unsigned char *) ipv4_hdr +
                                        sizeof(struct rte_ipv4_hdr));
                key.port_dst = rte_be_to_cpu_16(tcp->dst_port);
                key.port_src = rte_be_to_cpu_16(tcp->src_port);
                break;
 
        case IPPROTO_UDP:
-               udp = (struct udp_hdr *)((unsigned char *) ipv4_hdr +
+               udp = (struct rte_udp_hdr *)((unsigned char *) ipv4_hdr +
                                        sizeof(struct rte_ipv4_hdr));
                key.port_dst = rte_be_to_cpu_16(udp->dst_port);
                key.port_src = rte_be_to_cpu_16(udp->src_port);