X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fmemif%2Frte_eth_memif.c;h=de6becd45e3eba47ae52267acdd5562671e66584;hb=1c9e61b3a45321b3cae742e8769b10c06c0324f0;hp=37a49fa13ddd20ea654397102854eec81933782f;hpb=eeded2044af5bbe88220120b14933536cbb3edb6;p=dpdk.git diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c index 37a49fa13d..de6becd45e 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -383,9 +383,10 @@ next_slot: if (mbuf != mbuf_head) rte_pktmbuf_pkt_len(mbuf_head) += cp_len; - memcpy(rte_pktmbuf_mtod_offset(mbuf, void *, dst_off), - (uint8_t *)memif_get_buffer(proc_private, d0) + src_off, - cp_len); + rte_memcpy(rte_pktmbuf_mtod_offset(mbuf, void *, + dst_off), + (uint8_t *)memif_get_buffer(proc_private, d0) + + src_off, cp_len); src_off += cp_len; dst_off += cp_len; @@ -644,9 +645,10 @@ next_in_chain: } cp_len = RTE_MIN(dst_len, src_len); - memcpy((uint8_t *)memif_get_buffer(proc_private, d0) + dst_off, - rte_pktmbuf_mtod_offset(mbuf, void *, src_off), - cp_len); + rte_memcpy((uint8_t *)memif_get_buffer(proc_private, + d0) + dst_off, + rte_pktmbuf_mtod_offset(mbuf, void *, src_off), + cp_len); mq->n_bytes += cp_len; src_off += cp_len; @@ -706,6 +708,7 @@ next_in_chain: /* populate descriptor */ d0 = &ring->desc[slot & mask]; d0->length = rte_pktmbuf_data_len(mbuf); + mq->n_bytes += rte_pktmbuf_data_len(mbuf); /* FIXME: get region index */ d0->region = 1; d0->offset = rte_pktmbuf_mtod(mbuf, uint8_t *) -