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 45CD3A00C5 for ; Wed, 3 Aug 2022 11:58:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2513340A7E; Wed, 3 Aug 2022 11:58:52 +0200 (CEST) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id 0DD0740141 for ; Wed, 3 Aug 2022 11:58:51 +0200 (CEST) Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id C63A63F128 for ; Wed, 3 Aug 2022 09:58:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1659520730; bh=9liqpZyCPJxF5AmZvoL/U3l0vAMi03M2JypNMZWGaDg=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=vMov5gC0a8X8hOL1Nc6JvygmAIsd7awRxS9hHIry9hnFgFHFUx/DOvpiwMYqrv9jW s9wquPWEsY3Ymi+7POwuSoBMrgirmfVmh9aJ9cwZ3NlU5tvJYpE6rIOoHYbhs5aRXQ dgdLGH37aSArTjO+CNtzhe489aSNJoeeqmcJo5fraUD1paXPaz6P7W4tI8NFwBOhba lbr9/4MfUkSowxdVZw3SngZ8xWqnpQi68bjJOG9AeZlBfpzA5yBqJXqN1qcDC6iNTx VtgvmsZMF73ZaZPsivBCt8cSMIB6pdNUCPVycU1hifzI1cimLdYkKUVeWkx8H6Zw2S mXQpf3G287JZg== Received: by mail-lj1-f200.google.com with SMTP id x26-20020a2e9dda000000b0025e608acc1dso1326219ljj.5 for ; Wed, 03 Aug 2022 02:58:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=9liqpZyCPJxF5AmZvoL/U3l0vAMi03M2JypNMZWGaDg=; b=PhNEiCde8Fq+y8VoBvOT5xIuIn6+YuGnesBo3Mxc0bWD10hJ6ToP6aKcyHNE0nQKug LleisE8Oyh9X4NMCyGgEdo3y/BbcfJZa/O6rUC5u52cMJp1UjsjS9PZIit1fSfxMGrJ6 oFDr7CYV2w0w4aNQ8xk6+pcewZHgk1jkAD64ykJqIiPxvRzHBSUdcx8e1hRTNwAmQPw+ Pvq5z/UcRf/BWJvxVd6FZptLXOWes2GTjqWi1WjUmPc+L4ZovQNHU/9kgmcWEMtr/uQU vtXvuxvbKN1oNfHM3DBXmc7Mps/HxiVxvPxLkMA28t+YHdEgFi4wqTtjhWGKwnqMRF+k Bdaw== X-Gm-Message-State: ACgBeo2h2klza+SiK0vfS02f2ZPZ4phS7qNmu+H7WcjOd2jcKMjqrmJi Evep3zQNraYmGGH8XYLsdUbpKdS/R3QeNCtAafEfMfOt6Pl6RVV0SH9eiMuQTVVvsYy8AJ+vYUT SEXk1XJieUubgqqE91xkewCjgh86kx/8gdx6CfSwS X-Received: by 2002:a05:6512:a96:b0:48a:b087:2980 with SMTP id m22-20020a0565120a9600b0048ab0872980mr8344585lfu.258.1659520730108; Wed, 03 Aug 2022 02:58:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1taUHceju3hzPTfyNgjYPobS/yN1InerfxNkryrResX49LHfdt+72kFZ4w2F/A9obpEKL7jRTA8PK63l2ENq1U= X-Received: by 2002:a05:6512:a96:b0:48a:b087:2980 with SMTP id m22-20020a0565120a9600b0048ab0872980mr8344576lfu.258.1659520729891; Wed, 03 Aug 2022 02:58:49 -0700 (PDT) MIME-Version: 1.0 References: <20220720051926.272674-1-ke1x.zhang@intel.com> In-Reply-To: <20220720051926.272674-1-ke1x.zhang@intel.com> From: Christian Ehrhardt Date: Wed, 3 Aug 2022 11:58:23 +0200 Message-ID: Subject: Re: [PATCH 19.11] net/iavf: fix Rx queue interrupt setting To: Ke Zhang Cc: stable@dpdk.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Wed, Jul 20, 2022 at 7:28 AM Ke Zhang wrote: > > [ upstream commit a08f9cb698c3d4687765860e328dca727f7a516b ] Thank you, your patch was too late in regard to my original deadline and I was then unavailable for a while. In the meantime more patches came in and I do not want to waste any of them just because they were late. Your patch is applied to the WIP branch now, but currently testing of -rc1 is going on which I do not want to disrupt. If we need an -rc2 anyway or generally have the time to do an -rc2 without too much disruption it will be in 19.11.13, otherwise it is already queued for 19.11.14 > For Rx-Queue Interrupt Setting, when vf rx interrupt > disable(INTENA=0), there are two ways to write back > descriptor to host memory: > > 1)Set WB_ON_ITR bit 0 to Interrupt Dynamic Control Register: > Completed descriptors are posted to host memory according to > the internal descriptor cache policy (in other words when a > full cache line is available for write-back). > > A internal descriptor size is 16 bytes or 32 bytes, a cache > line size is 64 bytes or 128 bytes from datasheet : > PCIe Global Config 2 - GLPCI_CNF2 (0x000BE004; RO) > so the full cache line could contains 4 packets, it means > Network card will send 4 packets to host when a full cache line > is available. > > 2)Set WB_ON_ITR bit 1 to Interrupt Dynamic Control Register: > Completed descriptors also trigger the ITR. Following ITR > expiration, all leftover completed descriptors are posted to > host memory. > > Network card will send packet to host even if only one > descriptor is completed. > > Changing 1) to 2) to make sure VF send the packet to host even > if there is only one rx packet is ready in hardware. > > Fixes: d6bde6b5eae9 ("net/avf: enable Rx interrupt") > Cc: stable@dpdk.org > > Signed-off-by: Ke Zhang > --- > drivers/net/iavf/iavf_ethdev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c > index 3cb02bd1f..00a47bf13 100644 > --- a/drivers/net/iavf/iavf_ethdev.c > +++ b/drivers/net/iavf/iavf_ethdev.c > @@ -1209,7 +1209,7 @@ iavf_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id) > > IAVF_WRITE_REG(hw, > IAVFINT_DYN_CTLN1(msix_intr - IAVF_RX_VEC_START), > - 0); > + IAVF_VFINT_DYN_CTLN1_WB_ON_ITR_MASK); > > IAVF_WRITE_FLUSH(hw); > return 0; > -- > 2.25.1 > -- Christian Ehrhardt Senior Staff Engineer, Ubuntu Server Canonical Ltd