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 AFAF3A0562; Tue, 4 May 2021 10:27:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2591540150; Tue, 4 May 2021 10:27:09 +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 B607240141 for ; Tue, 4 May 2021 10:27:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620116826; 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=ABhBowOazAQEXwfOIipqYES3HPq78xDpKEvozS8HP6A=; b=YndSEedYKq0+/zYO2EkawSYRBgUv7OSbbILljq8Zd2CdWLQy3h5/aUWfD+MiDOsrOsrdVP nQp6yuU0bjMNe9q6BGH24zaMU6gAlrC4HMlYX3x3f8rBeK2b13OihPjYhN2of4DHuxk575 3yPyfit91ioPtLvJkLOZ3R1S1lR+UHQ= 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-593-AJVpAHN_O7qc07Ubh2f76g-1; Tue, 04 May 2021 04:27:03 -0400 X-MC-Unique: AJVpAHN_O7qc07Ubh2f76g-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 955B08D76E1; Tue, 4 May 2021 08:27:00 +0000 (UTC) Received: from [10.36.110.22] (unknown [10.36.110.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6F09B5944A; Tue, 4 May 2021 08:26:57 +0000 (UTC) To: Xueming Li Cc: dev@dpdk.org, =?UTF-8?B?6LCi5Y2O5LyfICjmraTml7bmraTliLvvvIk=?= , jerin.jacob@caviumnetworks.com, drc@linux.vnet.ibm.com, stable@dpdk.org, Chenbo Xia , Jerin Jacob , Ruifeng Wang , Bruce Richardson , Konstantin Ananyev , Jianfeng Tan , Huawei Xie , Jianbo Liu , Yuanhan Liu References: <20210414042631.7041-1-xuemingl@nvidia.com> <20210414141404.9486-1-xuemingl@nvidia.com> From: Maxime Coquelin Message-ID: <40dab25b-b25e-6100-50da-f362dcad0b09@redhat.com> Date: Tue, 4 May 2021 10:26:55 +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: <20210414141404.9486-1-xuemingl@nvidia.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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: 8bit Subject: Re: [dpdk-dev] [PATCH v1] net/virtio: fix vectorized Rx queue stuck 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 4/14/21 4:14 PM, Xueming Li wrote: > From: ".Xueming Li" > > When Rx queue worked in vectorized mode and rxd <= 512, under traffic of > high PPS rate, testpmd often start and receive packets of rxd without > further growth. > > Testpmd started with rxq flush which tried to rx MAX_PKT_BURST(512) > packets and drop. When Rx burst size >= Rx queue size, all descriptors > in used queue consumed without rearm, device can't receive more packets. > The next Rx burst returned at once since no used descriptors found, > rearm logic was skipped, rx vq kept in starving state. > > To avoid rx vq starving, this patch always check the available queue, > rearm if needed even no used descriptor reported by device. > > Fixes: fc3d66212fed ("virtio: add vector Rx") > Cc: 谢华伟(此时此刻) > Fixes: 2d7c37194ee4 ("net/virtio: add NEON based Rx handler") > Cc: jerin.jacob@caviumnetworks.com > Fixes: 52b5a707e6ca ("net/virtio: add Altivec Rx") > Cc: drc@linux.vnet.ibm.com > Cc: stable@dpdk.org > > Signed-off-by: Xueming Li > --- > drivers/net/virtio/virtio_rxtx_simple_altivec.c | 12 ++++++------ > drivers/net/virtio/virtio_rxtx_simple_neon.c | 12 ++++++------ > drivers/net/virtio/virtio_rxtx_simple_sse.c | 12 ++++++------ > 3 files changed, 18 insertions(+), 18 deletions(-) > Applied to dpdk-next-virtio/main. Thanks, Maxime