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 82485A0546; Wed, 7 Apr 2021 09:48:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 68AE014103A; Wed, 7 Apr 2021 09:48:03 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mails.dpdk.org (Postfix) with ESMTP id 42483407FF for ; Wed, 7 Apr 2021 09:48:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617781681; 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=hEYgXHnHklqowEVm4+J5NgkJAvQ0WCUpfnXKJo7FkU8=; b=fCT7XWz4OgxDsdsKVxqMCZYntAnJq3hLQ6LN90TRRtT99qwKEyFp6PNnH/X2q+JFIfmdIZ cZ7m6j+HLQwKQmeV2/0b9eI37jRSCDy7vXc1MRyreer+UwgS8VTrrwBb/2aBp5wA/U8ZcL RbOh4jtNJxQfRkfSxrHtKjqP05ES4Fg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-554-w58bH3hqPsuDTWyVg2dRsg-1; Wed, 07 Apr 2021 03:48:00 -0400 X-MC-Unique: w58bH3hqPsuDTWyVg2dRsg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E313E107ACE6; Wed, 7 Apr 2021 07:47:55 +0000 (UTC) Received: from [10.36.110.28] (unknown [10.36.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D87B4610AE; Wed, 7 Apr 2021 07:47:53 +0000 (UTC) To: Cheng Jiang , chenbo.xia@intel.com, Thomas Monjalon Cc: dev@dpdk.org, jiayu.hu@intel.com, yvonnex.yang@intel.com, yinan.wang@intel.com, stable@dpdk.org References: <20210317054054.34616-1-Cheng1.jiang@intel.com> From: Maxime Coquelin Message-ID: <23c4f6e7-4895-44b7-4ff0-3a02f9f3f86a@redhat.com> Date: Wed, 7 Apr 2021 09:47:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210317054054.34616-1-Cheng1.jiang@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@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] examples/vhost: fix ioat ring space in callbacks 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 3/17/21 6:40 AM, Cheng Jiang wrote: > We use ioat ring space for determining if ioat callbacks can enqueue a > packet to ioat device. But there is one slot can't be used in ioat > ring due to the ioat driver design, so we need to reduce one slot in > ioat ring to prevent ring size mismatch in ioat callbacks. > > Fixes: 2aa47e94bfb2 ("examples/vhost: add ioat ring space count and check") > Cc: stable@dpdk.org > > Signed-off-by: Cheng Jiang > --- > examples/vhost/ioat.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/examples/vhost/ioat.c b/examples/vhost/ioat.c > index 60b73be93..9cb5e0d50 100644 > --- a/examples/vhost/ioat.c > +++ b/examples/vhost/ioat.c > @@ -113,7 +113,7 @@ open_ioat(const char *value) > goto out; > } > rte_rawdev_start(dev_id); > - cb_tracker[dev_id].ioat_space = IOAT_RING_SIZE; > + cb_tracker[dev_id].ioat_space = IOAT_RING_SIZE - 1; That really comforts me in thinking we need a generic abstraction for DMA devices. How is the application developer supposed to know that the DMA driver has such weird limitations? Can the driver be fixed to have a proper behavior? > dma_info->nr++; > i++; > } >