[dpdk-dev] [PATCH v2 6/6] vhost: convert inflight data to DPDK allocation API
Maxime Coquelin
mcoqueli at redhat.com
Tue Jun 15 13:27:11 CEST 2021
On 6/15/21 11:25 AM, David Marchand wrote:
> On Tue, Jun 15, 2021 at 10:43 AM Maxime Coquelin
> <maxime.coquelin at 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;
>
>
>
More information about the dev
mailing list