DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: 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 11:25:52 +0200	[thread overview]
Message-ID: <CAJFAV8x9sPQXFA=7T7-cFBpb1Y4MJtY_Fs7h17eYanvkE_To=g@mail.gmail.com> (raw)
In-Reply-To: <20210615084241.139097-7-maxime.coquelin@redhat.com>

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).

> +                       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;



-- 
David Marchand


  reply	other threads:[~2021-06-15  9:26 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 [this message]
2021-06-15 11:27     ` Maxime Coquelin

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='CAJFAV8x9sPQXFA=7T7-cFBpb1Y4MJtY_Fs7h17eYanvkE_To=g@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=chenbo.xia@intel.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).