From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AF1B8A0C47; Tue, 15 Jun 2021 13:27:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 796094067A; Tue, 15 Jun 2021 13:27:17 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id A566E40140 for ; Tue, 15 Jun 2021 13:27:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623756434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2lSAqfS8l+BZIRpjKekapSRuHgvewY4FuPWKqEfbHrk=; b=TCdm6pYIdpYYVI9lVTnHU4In6jhEHw2G517JIETiNNUgIB0aLq4eN7DnnsV5Jrg83fXtxf 9R0ScEG+FhTXDWrlQ4O+hNk9rUKOZ3+3QKc3yWBNUkGc4giyUyscCVTQdgPpRe1jDbkTE8 fI+FugKVL9yVnU90Snq+Jd8HblHf1hg= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-41-XiZD79zJOp21epry5OexMA-1; Tue, 15 Jun 2021 07:27:13 -0400 X-MC-Unique: XiZD79zJOp21epry5OexMA-1 Received: by mail-wm1-f69.google.com with SMTP id m33-20020a05600c3b21b02901a44b1d2d87so1391190wms.3 for ; Tue, 15 Jun 2021 04:27:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2lSAqfS8l+BZIRpjKekapSRuHgvewY4FuPWKqEfbHrk=; b=jsqruq4dzBFCx/nqMKNTcI+FaSLjLgHt1UMybu2xTT2NjcO2zlF7zj83MB6/Kc++7i 2553DTv3oXOmMby4Cc1UIJ5GDQo21HBNxY92BHIrYYL2Mt3Y5wLU/I1pAQ76FNbb1BSj RwjwqRLQ43zl510AakE3P0oLvkLaQQtxENY7XZestFBdxNglRSeeoylH93TFQf55TmqT YunRtJpy8dlF2ip+2m8jj15c6yRYyaviyIH91AEWxKrF6qK1hAILoTV/nXJyXUF82KkR xEqkBzFERmgyrjO5fhwQagUEQuRP42Fwhfu0t//KiZgiEYqoIW87zymTQ3L975tzKKkA aXwQ== X-Gm-Message-State: AOAM5304eu2Z8SenYmXoj+CtuQpNyDIkMfKopGd2+9ReLb1aTlrACDVD v3pCsJzYk1YetOhzV14HLLWEynYJIpbzKUy9Gd3gUEZvWpDnCSJLLlbKLQz+D1VutE9R+rJCeAE tdD4= X-Received: by 2002:a1c:4c07:: with SMTP id z7mr4610422wmf.90.1623756432345; Tue, 15 Jun 2021 04:27:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNczYWbZO92R/P65PZZouMklreFRdF+zXO/olu39DiALGafMiTVyIK4e2mZhpuk+zlv+uuEw== X-Received: by 2002:a1c:4c07:: with SMTP id z7mr4610398wmf.90.1623756432104; Tue, 15 Jun 2021 04:27:12 -0700 (PDT) Received: from [192.168.1.205] (219-230-83-45.ftth.cust.kwaoo.net. [45.83.230.219]) by smtp.gmail.com with ESMTPSA id f14sm18316755wri.16.2021.06.15.04.27.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Jun 2021 04:27:11 -0700 (PDT) To: David Marchand , Maxime Coquelin Cc: dev , "Xia, Chenbo" References: <20210615084241.139097-1-maxime.coquelin@redhat.com> <20210615084241.139097-7-maxime.coquelin@redhat.com> From: Maxime Coquelin Message-ID: <5d19dcb9-3aef-8971-7cd9-d25d3ab675de@redhat.com> Date: Tue, 15 Jun 2021 13:27:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mcoqueli@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 6/6] vhost: convert inflight data to DPDK allocation API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 6/15/21 11:25 AM, David Marchand wrote: > On Tue, Jun 15, 2021 at 10:43 AM Maxime Coquelin > 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; > > >