X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fl2fwd-crypto%2Fmain.c;h=afc658e5dc7f57e27dc6907784917685dbf881a7;hb=24ac604ef7469eb5773c2504b313dd00257f8df3;hp=06517b47184b9bd8f1a9dca10ccffc6d3f053180;hpb=6723c0fc7207ca4416822b170b1485a78aa47c7c;p=dpdk.git diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index 06517b4718..afc658e5dc 100644 --- a/examples/l2fwd-crypto/main.c +++ b/examples/l2fwd-crypto/main.c @@ -79,7 +79,7 @@ static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT; static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT; /* ethernet addresses of ports */ -static struct ether_addr l2fwd_ports_eth_addr[RTE_MAX_ETHPORTS]; +static struct rte_ether_addr l2fwd_ports_eth_addr[RTE_MAX_ETHPORTS]; /* mask of enabled ports */ static uint64_t l2fwd_enabled_port_mask; @@ -212,7 +212,7 @@ struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE]; static struct rte_eth_conf port_conf = { .rxmode = { .mq_mode = ETH_MQ_RX_NONE, - .max_rx_pkt_len = ETHER_MAX_LEN, + .max_rx_pkt_len = RTE_ETHER_MAX_LEN, .split_hdr_size = 0, }, .txmode = { @@ -387,25 +387,25 @@ l2fwd_simple_crypto_enqueue(struct rte_mbuf *m, struct rte_crypto_op *op, struct l2fwd_crypto_params *cparams) { - struct ether_hdr *eth_hdr; - struct ipv4_hdr *ip_hdr; + struct rte_ether_hdr *eth_hdr; + struct rte_ipv4_hdr *ip_hdr; uint32_t ipdata_offset, data_len; uint32_t pad_len = 0; char *padding; - eth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *); + eth_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *); - if (eth_hdr->ether_type != rte_cpu_to_be_16(ETHER_TYPE_IPv4)) + if (eth_hdr->ether_type != rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4)) return -1; - ipdata_offset = sizeof(struct ether_hdr); + ipdata_offset = sizeof(struct rte_ether_hdr); - ip_hdr = (struct ipv4_hdr *)(rte_pktmbuf_mtod(m, char *) + + ip_hdr = (struct rte_ipv4_hdr *)(rte_pktmbuf_mtod(m, char *) + ipdata_offset); - ipdata_offset += (ip_hdr->version_ihl & IPV4_HDR_IHL_MASK) - * IPV4_IHL_MULTIPLIER; + ipdata_offset += (ip_hdr->version_ihl & RTE_IPV4_HDR_IHL_MASK) + * RTE_IPV4_IHL_MULTIPLIER; /* Zero pad data to be crypto'd so it is block aligned */ @@ -593,17 +593,17 @@ l2fwd_send_packet(struct rte_mbuf *m, uint16_t port) static void l2fwd_mac_updating(struct rte_mbuf *m, uint16_t dest_portid) { - struct ether_hdr *eth; + struct rte_ether_hdr *eth; void *tmp; - eth = rte_pktmbuf_mtod(m, struct ether_hdr *); + eth = rte_pktmbuf_mtod(m, struct rte_ether_hdr *); /* 02:00:00:00:00:xx */ tmp = ð->d_addr.addr_bytes[0]; *((uint64_t *)tmp) = 0x000000000002 + ((uint64_t)dest_portid << 40); /* src addr */ - ether_addr_copy(&l2fwd_ports_eth_addr[dest_portid], ð->s_addr); + rte_ether_addr_copy(&l2fwd_ports_eth_addr[dest_portid], ð->s_addr); } static void