Report failure when tap port is not mapped to real dpdk port.
[samplevnf.git] / VNFs / DPPD-PROX / tx_pkt.c
index f45516e..551056a 100644 (file)
@@ -61,17 +61,17 @@ void store_packet(struct task_base *tbase, struct rte_mbuf *mbuf)
 
 int tx_pkt_ndp(struct task_base *tbase, struct rte_mbuf **mbufs, uint16_t n_pkts, uint8_t *out)
 {
-       // TODO NDP
        struct ipv6_addr ip_dst;
        int first = 0, ret, ok = 0, rc;
        const struct port_queue *port_queue = &tbase->tx_params_hw.tx_port_queue[0];
        struct rte_mbuf *mbuf = NULL;       // used when one need to send both an ARP and a mbuf
        uint16_t vlan;
+       uint64_t tsc = rte_rdtsc();
 
        for (int j = 0; j < n_pkts; j++) {
                if ((out) && (out[j] >= OUT_HANDLED))
                        continue;
-               if (unlikely((rc = write_ip6_dst_mac(tbase, mbufs[j], &ip_dst, &vlan)) != SEND_MBUF)) {
+               if (unlikely((rc = write_ip6_dst_mac(tbase, mbufs[j], &ip_dst, &vlan, tsc)) != SEND_MBUF)) {
                        if (j - first) {
                                ret = tbase->aux->tx_pkt_l2(tbase, mbufs + first, j - first, out);
                                ok += ret;