cryptodev: add feature flags to disable
[dpdk.git] / examples / ipsec-secgw / ipsec-secgw.c
index d47cdd5..931e5ea 100644 (file)
@@ -236,7 +236,7 @@ prepare_one_packet(struct rte_mbuf *pkt, struct ipsec_traffic *t)
        struct rte_ether_hdr *eth;
 
        eth = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
-       if (eth->ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4)) {
+       if (eth->ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4)) {
                nlp = (uint8_t *)rte_pktmbuf_adj(pkt, RTE_ETHER_HDR_LEN);
                nlp = RTE_PTR_ADD(nlp, offsetof(struct ip, ip_p));
                if (*nlp == IPPROTO_ESP)
@@ -247,7 +247,7 @@ prepare_one_packet(struct rte_mbuf *pkt, struct ipsec_traffic *t)
                }
                pkt->l2_len = 0;
                pkt->l3_len = sizeof(struct ip);
-       } else if (eth->ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6)) {
+       } else if (eth->ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6)) {
                nlp = (uint8_t *)rte_pktmbuf_adj(pkt, RTE_ETHER_HDR_LEN);
                nlp = RTE_PTR_ADD(nlp, offsetof(struct ip6_hdr, ip6_nxt));
                if (*nlp == IPPROTO_ESP)
@@ -341,15 +341,15 @@ prepare_tx_pkt(struct rte_mbuf *pkt, uint16_t port,
 
                /* calculate IPv4 cksum in SW */
                if ((pkt->ol_flags & PKT_TX_IP_CKSUM) == 0)
-                       ip->ip_sum = rte_ipv4_cksum((struct ipv4_hdr *)ip);
+                       ip->ip_sum = rte_ipv4_cksum((struct rte_ipv4_hdr *)ip);
 
-               ethhdr->ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+               ethhdr->ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
        } else {
                pkt->ol_flags |= qconf->outbound.ipv6_offloads;
                pkt->l3_len = sizeof(struct ip6_hdr);
                pkt->l2_len = RTE_ETHER_HDR_LEN;
 
-               ethhdr->ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
+               ethhdr->ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);
        }
 
        memcpy(&ethhdr->s_addr, &ethaddr_tbl[port].src,
@@ -1720,6 +1720,7 @@ cryptodevs_init(void)
 
                dev_conf.socket_id = rte_cryptodev_socket_id(cdev_id);
                dev_conf.nb_queue_pairs = qp;
+               dev_conf.ff_disable = RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO;
 
                uint32_t dev_max_sess = cdev_info.sym.max_nb_sessions;
                if (dev_max_sess != 0 && dev_max_sess < CDEV_MP_NB_OBJS)