Message ID | 20211015134319.1664761-1-xuemingl@nvidia.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Maxime Coquelin |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 62865A0C4E; Fri, 15 Oct 2021 15:43:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4F8A1411D8; Fri, 15 Oct 2021 15:43:52 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2061.outbound.protection.outlook.com [40.107.93.61]) by mails.dpdk.org (Postfix) with ESMTP id E282D411CB; Fri, 15 Oct 2021 15:43:50 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gZQAMzN0XKQ5FDd4dIWZMfgalJRCmBYOrMZMvIOTz9MBiuDSn60RikUON10GcCM1N5gFLuu4ThVbi7rfAQi7LRx4QiyN4wX1iai5q9DYi96TYb9SMQikWNWKW7sSd8eoQQbFb/BxqPgI3iiwrvj3y9XL2G+VycPDNDRW0smKxVemMK4fiWd5ucdr/iF6uBav0Y7JnBiuDgDaYvf/p+AwkurMy8Bq2tRzfEINAdRTGZP4f2fyEJgSHqhJeFWlXajRti+/xUmQvfMwxlDCpMU0an4xMbys4BFYT7j3bn6uC7TlaIGDIq4E7/b13N1TYQRFmAXRCp4SirpIfloVIVVt2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jTt82rHbO/B3wjoRjF+JR4YDf2h91dhP0VyWK+IhcvQ=; b=F+PtE5oxOt8JtkEJHQH1dA3EMF2I5V0Yrhzx3hyjnVyLxDfs+TqP/Ixe9eoP4bNrmXcU9hsu5wXSdbeFxf++Z84uKp5ldYjMRJcC/m9VNH8HCzsLSPmlWOl2JVjOi/wbAbgivqOrNH535ccRr2ldN+uE2pw2SUIZaJQLMJ/E7LQUxubSbmCpbn/gYBvKMKBfWACKjgFW3OsE09Yz6We8Haa9CMA7ARVPYMc4dGYWRZW3pS9ty+Ihqpd3SaD9gSo+poJUN6w5eXTFP01GFRB4lKtvTtViDsd6q384Ly9BWJ0N+oRRXyDhpNqGxrIfU62m6A8CpgTedzqMY1jlMXpF0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jTt82rHbO/B3wjoRjF+JR4YDf2h91dhP0VyWK+IhcvQ=; b=JRFgjG43VUcGfoypdFXGG9kZJ5tWV/OUjKAt9o+gkKxJlsaPibbv2+B/TaJzQ1mIrxjA3zrnr1gi4iMvGdSqaCTe3HlceJYGjZ3iCqSUI+b+plLaTmN9n6q58gjYBY9BbK+XXIL051hAlp4K6s/6a/cO/L+unu/rYK+4wgUX7K6w5V/kBFxisYxL4a13ea07IvGTdLWBy1FHzI//DQ7sZvWVJuQG7LJT7yz5+RO7lxlXrBWZVrcuxrZTqh5Ny42O2l7l/mBqjYIXyGTu7v6y0vnwzO9Zs3g1zCd0ubXFz+1SP6/pfKqAB8kgLt9dThZlwTbwAlok1LlsshY2m2tu7w== Received: from DM6PR02CA0039.namprd02.prod.outlook.com (2603:10b6:5:177::16) by MWHPR12MB1776.namprd12.prod.outlook.com (2603:10b6:300:113::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Fri, 15 Oct 2021 13:43:49 +0000 Received: from DM6NAM11FT057.eop-nam11.prod.protection.outlook.com (2603:10b6:5:177:cafe::96) by DM6PR02CA0039.outlook.office365.com (2603:10b6:5:177::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15 via Frontend Transport; Fri, 15 Oct 2021 13:43:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT057.mail.protection.outlook.com (10.13.172.252) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4608.15 via Frontend Transport; Fri, 15 Oct 2021 13:43:48 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 15 Oct 2021 13:43:44 +0000 From: Xueming Li <xuemingl@nvidia.com> To: Maxime Coquelin <maxime.coquelin@redhat.com>, <dev@dpdk.org> CC: <xuemingl@nvidia.com>, <stable@dpdk.org>, Matan Azrad <matan@nvidia.com>, Viacheslav Ovsiienko <viacheslavo@nvidia.com> Date: Fri, 15 Oct 2021 21:43:18 +0800 Message-ID: <20211015134319.1664761-1-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210923081758.178745-1-xuemingl@nvidia.com> References: <20210923081758.178745-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ec125df9-a6e4-4a4c-826e-08d98fe1d134 X-MS-TrafficTypeDiagnostic: MWHPR12MB1776: X-Microsoft-Antispam-PRVS: <MWHPR12MB17765C5A9A81F9502FB078A9A1B99@MWHPR12MB1776.namprd12.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:475; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SwsuQkBOhoRj3nSyJhNFP+mk33NXHnlt/JOpYPEEv+6jFMQVwBA4JiIg9IobeH6muWbp6gWHYAlWgE2fQfg9izq8ItXbxJQTEo5CyAGVvPuMbGLMud8hKdv4Ehw2ePwUCX170iL7vvaat30bJaFBd8bdBv4szEQF+oXSwALl/y7EODeAD9naFLBF83tAMY92K/xPy15BKACx0TY6zh+6YaADtWTr2hdL1sak+V+rWw9lKhacg4x66wRSabjlgL5xZRMXdbsGnYyejfQxNUkUoqW+wHMeDTFxsihbYWWVVG6ivteR1MPKolpVgKIizlPi8IWZRxhYX6a4+cfVgInqg39i/8gIaQd4ujn3GfoDQgTZ/S4IwP9p5bI5DVRCEwo02atGqjUi60g24T/lL2xvbDahulGZ+XZ09rS0noJXmKCSFufhCUkW9vvQtEha04FKjFXQb+O156Ber7GtKCrcpYktXfoslaKivBPwzAineNr7yDsNwhNw6hbuf0ynbUNcvExNEYuPNQZXqJSRIwAG8uQXCu0b+s8CLyxq2/0SK304Yat7b0au8lQjWp0akS/4m+L0OLru+EuGRU6vIGfSeoGvZZdecEA2FKgtr6xvi7AdGagmVDFJmdpECfcP20AdF5FZXLL8GdOhGVwlmWGsnQn0OmA7N+YlCM5+wxg4vlIXDuRZ629eNEm6XYrhAAMZ5pnvEwEnIrFx//0vJbjGBA== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(6286002)(426003)(2616005)(6666004)(26005)(86362001)(8676002)(82310400003)(70206006)(8936002)(16526019)(4326008)(336012)(186003)(2906002)(36860700001)(55016002)(36756003)(110136005)(5660300002)(47076005)(7696005)(356005)(316002)(107886003)(1076003)(83380400001)(7636003)(70586007)(508600001)(54906003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2021 13:43:48.8691 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ec125df9-a6e4-4a4c-826e-08d98fe1d134 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT057.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1776 Subject: [dpdk-dev] [PATCH v1 1/2] vdpa/mlx5: workaround FW first completion in start X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
[v1,1/2] vdpa/mlx5: workaround FW first completion in start
|
|
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
Commit Message
Xueming Li
Oct. 15, 2021, 1:43 p.m. UTC
After a vDPA application restart, qemu restores VQ with used and available index, new incoming packet triggers virtio driver to handle buffers. Under heavy traffic, no available buffer for firmware to receive new packets, no Rx interrupts generated, driver is stuck on endless interrupt waiting. As a firmware workaround, this patch sends a notification after VQ setup to ask driver handling buffers and filling new buffers. Cc: stable@dpdk.org Signed-off-by: Xueming Li <xuemingl@nvidia.com> Reviewed-by: Matan Azrad <matan@nvidia.com> --- drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 4 ++++ 1 file changed, 4 insertions(+)
Comments
On 10/15/21 15:43, Xueming Li wrote: > After a vDPA application restart, qemu restores VQ with used and > available index, new incoming packet triggers virtio driver to > handle buffers. Under heavy traffic, no available buffer for > firmware to receive new packets, no Rx interrupts generated, > driver is stuck on endless interrupt waiting. > > As a firmware workaround, this patch sends a notification after > VQ setup to ask driver handling buffers and filling new buffers. > As I mentionned on my reply to the v1, I would expect a Fixes tag, it would make downstream maintainers life easier. Maybe pointing to the commit introducing the function would help. this is not ideal, but otherwise the risk is that your patch get missed by the stable maintainers. Thanks! Maxime > Cc: stable@dpdk.org > > Signed-off-by: Xueming Li <xuemingl@nvidia.com> > Reviewed-by: Matan Azrad <matan@nvidia.com> > --- > drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c > index f530646058f..71470d23d9e 100644 > --- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c > +++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c > @@ -4,6 +4,7 @@ > #include <string.h> > #include <unistd.h> > #include <sys/mman.h> > +#include <sys/eventfd.h> > > #include <rte_malloc.h> > #include <rte_errno.h> > @@ -367,6 +368,9 @@ mlx5_vdpa_virtq_setup(struct mlx5_vdpa_priv *priv, int index) > goto error; > } > virtq->stopped = false; > + /* Initial notification to ask qemu handling completed buffers. */ > + if (virtq->eqp.cq.callfd != -1) > + eventfd_write(virtq->eqp.cq.callfd, (eventfd_t)1); > DRV_LOG(DEBUG, "vid %u virtq %u was created successfully.", priv->vid, > index); > return 0; >
On Fri, 2021-10-15 at 15:57 +0200, Maxime Coquelin wrote: > > On 10/15/21 15:43, Xueming Li wrote: > > After a vDPA application restart, qemu restores VQ with used and > > available index, new incoming packet triggers virtio driver to > > handle buffers. Under heavy traffic, no available buffer for > > firmware to receive new packets, no Rx interrupts generated, > > driver is stuck on endless interrupt waiting. > > > > As a firmware workaround, this patch sends a notification after > > VQ setup to ask driver handling buffers and filling new buffers. > > > > As I mentionned on my reply to the v1, I would expect a Fixes tag, > it would make downstream maintainers life easier. > > Maybe pointing to the commit introducing the function would help. > this is not ideal, but otherwise the risk is that your patch get > missed by the stable maintainers. Yes, my bad, a Fixes tag should be helpful to identify which LTS need it, thanks! > > Thanks! > Maxime > > > Cc: stable@dpdk.org > > > > Signed-off-by: Xueming Li <xuemingl@nvidia.com> > > Reviewed-by: Matan Azrad <matan@nvidia.com> > > --- > > drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c > > index f530646058f..71470d23d9e 100644 > > --- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c > > +++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c > > @@ -4,6 +4,7 @@ > > #include <string.h> > > #include <unistd.h> > > #include <sys/mman.h> > > +#include <sys/eventfd.h> > > > > #include <rte_malloc.h> > > #include <rte_errno.h> > > @@ -367,6 +368,9 @@ mlx5_vdpa_virtq_setup(struct mlx5_vdpa_priv *priv, int index) > > goto error; > > } > > virtq->stopped = false; > > + /* Initial notification to ask qemu handling completed buffers. */ > > + if (virtq->eqp.cq.callfd != -1) > > + eventfd_write(virtq->eqp.cq.callfd, (eventfd_t)1); > > DRV_LOG(DEBUG, "vid %u virtq %u was created successfully.", priv->vid, > > index); > > return 0; > > >
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c index f530646058f..71470d23d9e 100644 --- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c +++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c @@ -4,6 +4,7 @@ #include <string.h> #include <unistd.h> #include <sys/mman.h> +#include <sys/eventfd.h> #include <rte_malloc.h> #include <rte_errno.h> @@ -367,6 +368,9 @@ mlx5_vdpa_virtq_setup(struct mlx5_vdpa_priv *priv, int index) goto error; } virtq->stopped = false; + /* Initial notification to ask qemu handling completed buffers. */ + if (virtq->eqp.cq.callfd != -1) + eventfd_write(virtq->eqp.cq.callfd, (eventfd_t)1); DRV_LOG(DEBUG, "vid %u virtq %u was created successfully.", priv->vid, index); return 0;