git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mbuf: add raw allocation function
[dpdk.git]
/
drivers
/
net
/
virtio
/
virtio_rxtx.c
diff --git
a/drivers/net/virtio/virtio_rxtx.c
b/drivers/net/virtio/virtio_rxtx.c
index
f326222
..
04f6832
100644
(file)
--- a/
drivers/net/virtio/virtio_rxtx.c
+++ b/
drivers/net/virtio/virtio_rxtx.c
@@
-281,17
+281,6
@@
virtqueue_enqueue_xmit(struct virtqueue *txvq, struct rte_mbuf *cookie,
vq_update_avail_ring(txvq, head_idx);
}
vq_update_avail_ring(txvq, head_idx);
}
-static inline struct rte_mbuf *
-rte_rxmbuf_alloc(struct rte_mempool *mp)
-{
- struct rte_mbuf *m;
-
- m = __rte_mbuf_raw_alloc(mp);
- __rte_mbuf_sanity_check_raw(m, 0);
-
- return m;
-}
-
static void
virtio_dev_vring_start(struct virtqueue *vq, int queue_type)
{
static void
virtio_dev_vring_start(struct virtqueue *vq, int queue_type)
{
@@
-343,7
+332,7
@@
virtio_dev_vring_start(struct virtqueue *vq, int queue_type)
vq->sw_ring[vq->vq_nentries + i] = &vq->fake_mbuf;
while (!virtqueue_full(vq)) {
vq->sw_ring[vq->vq_nentries + i] = &vq->fake_mbuf;
while (!virtqueue_full(vq)) {
- m = rte_
rxmbuf
_alloc(vq->mpool);
+ m = rte_
mbuf_raw
_alloc(vq->mpool);
if (m == NULL)
break;
if (m == NULL)
break;
@@
-658,7
+647,7
@@
virtio_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
/* Allocate new mbuf for the used descriptor */
error = ENOSPC;
while (likely(!virtqueue_full(rxvq))) {
/* Allocate new mbuf for the used descriptor */
error = ENOSPC;
while (likely(!virtqueue_full(rxvq))) {
- new_mbuf = rte_
rxmbuf
_alloc(rxvq->mpool);
+ new_mbuf = rte_
mbuf_raw
_alloc(rxvq->mpool);
if (unlikely(new_mbuf == NULL)) {
struct rte_eth_dev *dev
= &rte_eth_devices[rxvq->port_id];
if (unlikely(new_mbuf == NULL)) {
struct rte_eth_dev *dev
= &rte_eth_devices[rxvq->port_id];
@@
-822,7
+811,7
@@
virtio_recv_mergeable_pkts(void *rx_queue,
/* Allocate new mbuf for the used descriptor */
error = ENOSPC;
while (likely(!virtqueue_full(rxvq))) {
/* Allocate new mbuf for the used descriptor */
error = ENOSPC;
while (likely(!virtqueue_full(rxvq))) {
- new_mbuf = rte_
rxmbuf
_alloc(rxvq->mpool);
+ new_mbuf = rte_
mbuf_raw
_alloc(rxvq->mpool);
if (unlikely(new_mbuf == NULL)) {
struct rte_eth_dev *dev
= &rte_eth_devices[rxvq->port_id];
if (unlikely(new_mbuf == NULL)) {
struct rte_eth_dev *dev
= &rte_eth_devices[rxvq->port_id];