From: Maxime Coquelin <mcoqueli@redhat.com>
To: David Marchand <david.marchand@redhat.com>,
Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: dev <dev@dpdk.org>, "Xia, Chenbo" <chenbo.xia@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2 6/6] vhost: convert inflight data to DPDK allocation API
Date: Tue, 15 Jun 2021 13:27:11 +0200 [thread overview]
Message-ID: <5d19dcb9-3aef-8971-7cd9-d25d3ab675de@redhat.com> (raw)
In-Reply-To: <CAJFAV8x9sPQXFA=7T7-cFBpb1Y4MJtY_Fs7h17eYanvkE_To=g@mail.gmail.com>
On 6/15/21 11:25 AM, David Marchand wrote:
> On Tue, Jun 15, 2021 at 10:43 AM Maxime Coquelin
> <maxime.coquelin@redhat.com> wrote:
>> @@ -559,6 +559,31 @@ numa_realloc(struct virtio_net *dev, int index)
>> vq->log_cache = lc;
>> }
>>
>> + if (vq->resubmit_inflight) {
>> + struct rte_vhost_resubmit_info *ri;
>> +
>> + ri = rte_realloc_socket(vq->resubmit_inflight, sizeof(*ri), 0, node);
>> + if (!ri) {
>> + VHOST_LOG_CONFIG(ERR, "Failed to realloc resubmit inflight on node %d\n",
>> + node);
>> + return dev;
>> + }
>> + vq->resubmit_inflight = ri;
>> +
>> + if (vq->resubmit_inflight) {
>
> Quick first pass, I'll review more thoroughly the whole series later.
>
> I suppose you want to test ri->resubmit_list != NULL (else, this test
> is unnecessary since we made sure ri != NULL earlier).
Thanks for catching it, I screwed up my copy/paste...
this check should be about !ri->resubmit_list indeed, and below one
about !rd.
It will be fixed in v3, but I'll let time for review on this revision.
Thanks,
Maxime
>> + struct rte_vhost_resubmit_desc *rd;
>> +
>> + rd = rte_realloc_socket(ri->resubmit_list, sizeof(*rd) * ri->resubmit_num,
>> + 0, node);
>> + if (!ri) {
>> + VHOST_LOG_CONFIG(ERR, "Failed to realloc resubmit list on node %d\n",
>> + node);
>> + return dev;
>> + }
>> + ri->resubmit_list = rd;
>> + }
>> + }
>> +
>> vq->numa_node = node;
>
>
>
prev parent reply other threads:[~2021-06-15 11:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-15 8:42 [dpdk-dev] [PATCH v2 0/6] vhost: Fix and improve NUMA reallocation Maxime Coquelin
2021-06-15 8:42 ` [dpdk-dev] [PATCH v2 1/6] vhost: fix missing memory table NUMA realloc Maxime Coquelin
2021-06-15 8:42 ` [dpdk-dev] [PATCH v2 2/6] vhost: fix missing guest pages " Maxime Coquelin
2021-06-15 8:42 ` [dpdk-dev] [PATCH v2 3/6] vhost: fix missing cache logging " Maxime Coquelin
2021-06-15 8:42 ` [dpdk-dev] [PATCH v2 4/6] vhost: improve NUMA reallocation Maxime Coquelin
2021-06-16 14:59 ` Maxime Coquelin
2021-06-15 8:42 ` [dpdk-dev] [PATCH v2 5/6] vhost: allocate all data on same node as virtqueue Maxime Coquelin
2021-06-15 8:42 ` [dpdk-dev] [PATCH v2 6/6] vhost: convert inflight data to DPDK allocation API Maxime Coquelin
2021-06-15 9:25 ` David Marchand
2021-06-15 11:27 ` Maxime Coquelin [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=5d19dcb9-3aef-8971-7cd9-d25d3ab675de@redhat.com \
--to=mcoqueli@redhat.com \
--cc=chenbo.xia@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
/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).