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 97929A0093; Fri, 22 Apr 2022 13:06:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 79303410D5; Fri, 22 Apr 2022 13:06:56 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 96E8740042 for ; Fri, 22 Apr 2022 13:06:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650625615; 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: in-reply-to:in-reply-to:references:references; bh=sZBgppPzRVz75ym3xNvdObxRVVrnqPNJyDaWHg7tkbE=; b=gbGgtBSoo7AFC9pNz3nSf/AHzzt9VvlT6Kyc0HrMAVeWKJ8pgqSxF7EoYyLLplU7KCIaQ2 +kRlDnUblpKKbBG4Aohx6LoQCGLo2UryzyK5+XBQicecRf4b51dTwVGhygagMY6pxmS5oI bhzMx7+wkftKFIFdP7c1rMJcUuQ0xCE= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-558-H1NrPHaZMhiErR1dbzDzOw-1; Fri, 22 Apr 2022 07:06:54 -0400 X-MC-Unique: H1NrPHaZMhiErR1dbzDzOw-1 Received: by mail-lj1-f197.google.com with SMTP id d5-20020a05651c088500b0024db8b6a445so2293885ljq.11 for ; Fri, 22 Apr 2022 04:06:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sZBgppPzRVz75ym3xNvdObxRVVrnqPNJyDaWHg7tkbE=; b=zEoeNQLAIEKm5zE4VLLwKKhcolQRW3mPx9I+9pcT9kiDWVGQL6/fDIUsdpcz4kd9E0 o/J8G+DB6NwIqjWjrdnOw0P+g/JNwidXqa64xyKiduPL3OFRHnxXP0tgCian69O9zT73 GxSnfatu3egVrUIoPhVawhoQL14pmJ8RMKkWDp8WGi1NbPQelZFl6rsOrq3EiC+mBYXY XrDy/brT3SXoaIvZrQVpD1d6HhsOuxD1S0U43HHbGjiDQJMWoH3M9kWY04yEJPutLWhE QXBqHTTrd4PfZaiWdF+AHZVwV930dvJ1Ca+tI1PQOqQjhS3SiKI9DV1J2K9WdE7MyJJc zWfQ== X-Gm-Message-State: AOAM533Kdtvj8B8MUryMVZdNTzVDusXgbEWOPXOIatd2/trMvxgV+rF2 jf/hRBxgKz1SdALorZ+Z0mZCF+Z9U0TnJu6CsTcfgsyUEGxqg32OErwy+X8n8+MmZWAivtz0Y5E RVah87DwwMwWS/3LqAlM= X-Received: by 2002:a05:6512:1326:b0:45a:3a4:f25a with SMTP id x38-20020a056512132600b0045a03a4f25amr2713331lfu.575.1650625612532; Fri, 22 Apr 2022 04:06:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0f1ti07DmkJXs+GCrLwoP5rPH00wVUkzZy/4BcCxuK+XT55BpaHQYt+aZzf24oBEORkMkpelwGN/Q/XrGX8s= X-Received: by 2002:a05:6512:1326:b0:45a:3a4:f25a with SMTP id x38-20020a056512132600b0045a03a4f25amr2713322lfu.575.1650625612344; Fri, 22 Apr 2022 04:06:52 -0700 (PDT) MIME-Version: 1.0 References: <20220407152546.38167-1-xuan.ding@intel.com> <20220419034323.92820-1-xuan.ding@intel.com> <20220419034323.92820-4-xuan.ding@intel.com> In-Reply-To: <20220419034323.92820-4-xuan.ding@intel.com> From: David Marchand Date: Fri, 22 Apr 2022 13:06:40 +0200 Message-ID: Subject: Re: [PATCH v3 3/5] vhost: merge sync and async descriptor to mbuf filling To: Xuan Ding Cc: Maxime Coquelin , "Xia, Chenbo" , dev , Jiayu Hu , Cheng Jiang , Sunil Pai G , liangma@liangbit.com Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 We (at RH) have some issues with our email infrastructure, so I can't reply inline of the patch. Copy/pasting the code: +static __rte_always_inline uint16_t +async_poll_dequeue_completed_split(struct virtio_net *dev, uint16_t queue_id, + struct rte_mbuf **pkts, uint16_t count, uint16_t dma_id, + uint16_t vchan_id, bool legacy_ol_flags) +{ + uint16_t start_idx, from, i; + uint16_t nr_cpl_pkts = 0; + struct async_inflight_info *pkts_info; + struct vhost_virtqueue *vq = dev->virtqueue[queue_id]; + Please, don't pass queue_id as an input parameter for async_poll_dequeue_completed_split(). The caller of this helper already dereferenced the vq. You can pass vq. -- David Marchand