From: Balazs Nemeth <bnemeth@redhat.com>
To: bnemeth@redhat.com, dev@dpdk.org
Subject: [dpdk-dev] [PATCH 4/4] vhost: remove unnecessary level of indirection
Date: Tue, 6 Apr 2021 17:44:46 +0200 [thread overview]
Message-ID: <e52542758fb627a709dfb03d96a164fd58135f3b.1617723339.git.bnemeth@redhat.com> (raw)
In-Reply-To: <cover.1617723339.git.bnemeth@redhat.com>
There is no need to pass a pointer to an mbuf pointer.
Signed-off-by: Balazs Nemeth <bnemeth@redhat.com>
---
lib/librte_vhost/virtio_net.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index e1696c0c0..179c57b46 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -2390,7 +2390,7 @@ static __rte_always_inline int
vhost_dequeue_single_packed(struct virtio_net *dev,
struct vhost_virtqueue *vq,
struct rte_mempool *mbuf_pool,
- struct rte_mbuf **pkts,
+ struct rte_mbuf *pkts,
uint16_t *buf_id,
uint16_t *desc_count)
{
@@ -2408,7 +2408,7 @@ vhost_dequeue_single_packed(struct virtio_net *dev,
return -1;
- if (unlikely(virtio_dev_pktmbuf_prep(dev, *pkts, buf_len))) {
+ if (unlikely(virtio_dev_pktmbuf_prep(dev, pkts, buf_len))) {
if (!allocerr_warned) {
VHOST_LOG_DATA(ERR,
"Failed mbuf alloc of size %d from %s on %s.\n",
@@ -2418,7 +2418,7 @@ vhost_dequeue_single_packed(struct virtio_net *dev,
return -1;
}
- err = copy_desc_to_mbuf(dev, vq, buf_vec, nr_vec, *pkts,
+ err = copy_desc_to_mbuf(dev, vq, buf_vec, nr_vec, pkts,
mbuf_pool);
if (unlikely(err)) {
if (!allocerr_warned) {
@@ -2437,7 +2437,7 @@ static __rte_always_inline int
virtio_dev_tx_single_packed(struct virtio_net *dev,
struct vhost_virtqueue *vq,
struct rte_mempool *mbuf_pool,
- struct rte_mbuf **pkts)
+ struct rte_mbuf *pkts)
{
uint16_t buf_id, desc_count = 0;
@@ -2490,7 +2490,7 @@ virtio_dev_tx_packed(struct virtio_net *dev,
}
if (virtio_dev_tx_single_packed(dev, vq, mbuf_pool,
- &pkts[pkt_idx])) {
+ pkts[pkt_idx])) {
break;
}
pkt_idx++;
--
2.30.2
prev parent reply other threads:[~2021-04-06 15:45 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-06 15:44 [dpdk-dev] [PATCH 0/4] Use bulk alloc/free in virtio packed Balazs Nemeth
2021-04-06 15:44 ` [dpdk-dev] [PATCH 1/4] vhost: move allocation of mbuf outside of packet enqueue Balazs Nemeth
2021-04-07 10:17 ` [dpdk-dev] [PATCH v2 " Balazs Nemeth
2021-04-15 12:37 ` Maxime Coquelin
2021-04-16 8:18 ` [dpdk-dev] [PATCH v3] vhost: allocate and free packets in bulk Balazs Nemeth
2021-04-16 8:36 ` Maxime Coquelin
2021-04-16 9:05 ` David Marchand
2021-04-16 9:12 ` Balazs Nemeth
2021-04-16 9:41 ` Maxime Coquelin
2021-04-16 9:43 ` David Marchand
2021-04-16 9:48 ` [dpdk-dev] [PATCH v4] " Balazs Nemeth
2021-04-16 10:25 ` [dpdk-dev] [PATCH v5] vhost: allocate and free packets in bulk in Tx packed Balazs Nemeth
2021-04-16 11:14 ` David Marchand
2021-04-21 7:48 ` Maxime Coquelin
2021-04-28 3:16 ` Xia, Chenbo
2021-04-07 10:17 ` [dpdk-dev] [PATCH v2 2/4] vhost: perform all mbuf allocations in one loop Balazs Nemeth
2021-04-15 15:30 ` Maxime Coquelin
2021-04-07 10:17 ` [dpdk-dev] [PATCH v2 3/4] vhost: allocate and free packets in bulk Balazs Nemeth
2021-04-15 15:32 ` Maxime Coquelin
2021-04-15 15:45 ` David Marchand
2021-04-15 15:50 ` Maxime Coquelin
2021-04-15 15:58 ` Maxime Coquelin
2021-04-07 10:17 ` [dpdk-dev] [PATCH v2 4/4] vhost: remove unnecessary level of indirection Balazs Nemeth
2021-04-15 15:38 ` Maxime Coquelin
2021-04-06 15:44 ` [dpdk-dev] [PATCH 2/4] vhost: perform all mbuf allocations in one loop Balazs Nemeth
2021-04-06 15:44 ` [dpdk-dev] [PATCH 3/4] vhost: allocate and free packets in bulk Balazs Nemeth
2021-04-06 15:44 ` Balazs Nemeth [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e52542758fb627a709dfb03d96a164fd58135f3b.1617723339.git.bnemeth@redhat.com \
--to=bnemeth@redhat.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).