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 B23ADA00C5; Thu, 14 Jul 2022 10:45:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A671042B7E; Thu, 14 Jul 2022 10:45:16 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2049.outbound.protection.outlook.com [40.107.92.49]) by mails.dpdk.org (Postfix) with ESMTP id C76A941156 for ; Thu, 14 Jul 2022 10:45:15 +0200 (CEST) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=f1avEx17MuwchJLcVl+JtDAMPqoY/79heC//IlWLu6Mi3zdGoIAUousJ4ZNqVaTn4OaObHTDyLnMuhQGWfAihSYORrly49dzC5y4OOz8EidsN/8BAwLUTHusIzdeUSkbaG288+BnrwAnxGBUSTN3mwTDK7VMVsPiV+4PQM3ANORmMFOUCjclT8EtbE3/Q6dmbBszNrG82AuIoQzaAFif2El3eyp/NnPNdz67CtAoCMW1xlxyvdlxJtJchCBGTXVwPh+20JEzvwQA8teHCexL4yIwVGqDvAlhnm1wyGVNAQCJCcXjX24tlpaLUqgjM5igMSUEQPtx6tEgjCV00YU0qQ== ARC-Message-Signature: i=2; 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=Al6DonR1dSaQa1fZyf7MQUgmkpDk1GUDABUHMaxShis=; b=KhKkdV9htfpn0M+xnqZgNYGNwKHVWNrWTlduZszf5dVUJUKRos5vMDdFGcbFq5xd7p4DQtzv26MZj9ZNNSAHGvnJX2ZQGkeU4SOtsWKjYEJ2sUpRsDFB6wG24jry1szCs8hmZkSpFzNU8oXUxxwZ19r41Xfj0KXNYNW60nWWMk1XfU0ZI0mFJrNbAyQKGoIGK7P+pbiT00QLL8evJS+r97irsTaUkMo6V4JAmlOHhbo1hYwRo4F0KbJtY1E2IUngsdvN+pRznK8YPQIXzpeGwy/nfSKqXemgxj7Qekra4SWKcTED+U/rP1AeyUxzmBUI3l/iMCA37DqV1GgUgMfJEA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 20.83.241.18) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=fail (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=xilinx.com] dmarc=[1,1,header.from=xilinx.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Al6DonR1dSaQa1fZyf7MQUgmkpDk1GUDABUHMaxShis=; b=Ond+v9XD2ZVinHfTUwtzoTSIZpU7kbWswb02UfAqRzxZKm6FfDRWXnkgCGNDG05lACvBP64TgsvK+tyzKMHgkiP0kdG6u/LKN0LMlnb9aUC8QC5x9b3rrEAjmgxEc4Uh6BuY6OWZlyqjdI43llANBR8nloIgZFUlpo1LOknzWtcuHLURjREPsMF3Xmg0+xzjIEyBWT0OAbvNIblAzLzBP6RzlfD+Ov7K19drtV8UnOt7vKcPzBCIETyB3ENGagt7ivLJkNtFtrm3Zx7DsdcjqXxRbsdpjqjFUU4S7JyNNrcPKVqDG4S/qK/j0EmESL3D/YNrfz/HCZInUvwx3RoWSA== Received: from BN9PR03CA0890.namprd03.prod.outlook.com (2603:10b6:408:13c::25) by MW2PR12MB2587.namprd12.prod.outlook.com (2603:10b6:907:f::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.12; Thu, 14 Jul 2022 08:45:11 +0000 Received: from BN8NAM11FT015.eop-nam11.prod.protection.outlook.com (2603:10b6:408:13c:cafe::8f) by BN9PR03CA0890.outlook.office365.com (2603:10b6:408:13c::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.21 via Frontend Transport; Thu, 14 Jul 2022 08:45:11 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 20.83.241.18) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 20.83.241.18 as permitted sender) receiver=protection.outlook.com; client-ip=20.83.241.18; helo=mailrelay000001.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net; pr=C Received: from mailrelay000001.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net (20.83.241.18) by BN8NAM11FT015.mail.protection.outlook.com (10.13.176.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.12 via Frontend Transport; Thu, 14 Jul 2022 08:45:11 +0000 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2105.outbound.protection.outlook.com [104.47.70.105]) by mailrelay000001.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net (Postfix) with ESMTPS id CE6E141F7C; Thu, 14 Jul 2022 08:45:10 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I52ZVQ4J5FdR/021OjF6B16q2+6jqNaZUpl6TYn55w12Hba1YYsuyjBJQ+voHlwcxxp2SHZyLUYInHNepJ5bX3wR8nAMYule7UXw0Qeowq749hMND54/uMLWA0HkRpNM1KMQ/+lrqevOlgkf3GElefw8yRJuot08N7KxFNMxY51Eli12gncC9Gj/g3sEWcBQz8KMca4ou4wXNt9SseFgkU+YP1g/UKGboQ9xdDExK48L6lBVD4+zBf+LCg8nCgomXeQ+GpgZR3PFSIy2mJhBufsrUPv8cPdEdYhYASXwu/WxKvBFQnmCIBIYhS9zApv9zk86UPd2YMkbxRU/+I+ZgQ== 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=Al6DonR1dSaQa1fZyf7MQUgmkpDk1GUDABUHMaxShis=; b=mLVX9dFCGftjdrb2jsvyzX4+0vTMPSj+JX5frER7VzCi5Rw0yf68ScazKPluz/z3TnbpNT/5xLvaDk6uD6dwkP+Mcv0f8Nzdqe5MMGizfbjvp69cxVFSzoEzINAYZmcIvPJyJxACKhBT89PMcHYbwMNKpqIMaqRQLGuSZZ9phHEM7Not6/8Li9vHc+PNtawYaeBDU65KRtEbfhjTdW5yAB78rS+IqJdvfLKApF8NupljNwHJI6vgzbUw/eGcusg2cYxJrO3orZq21gyuu3AlttqVNf0MWsl8n2rJ4M7rjpNwi79iH2NjVWjT5ytWFk0rhHAKKcMvAswa/0uVyttMDw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=dpdk.org smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none Received: from DM6PR08CA0062.namprd08.prod.outlook.com (2603:10b6:5:1e0::36) by DM6PR02MB5100.namprd02.prod.outlook.com (2603:10b6:5:47::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.26; Thu, 14 Jul 2022 08:45:08 +0000 Received: from DM3NAM02FT005.eop-nam02.prod.protection.outlook.com (2603:10b6:5:1e0:cafe::f5) by DM6PR08CA0062.outlook.office365.com (2603:10b6:5:1e0::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.25 via Frontend Transport; Thu, 14 Jul 2022 08:45:08 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by DM3NAM02FT005.mail.protection.outlook.com (10.13.5.123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5438.12 via Frontend Transport; Thu, 14 Jul 2022 08:45:07 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Thu, 14 Jul 2022 01:45:07 -0700 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Thu, 14 Jul 2022 01:45:07 -0700 Envelope-to: dev@dpdk.org, chenbo.xia@intel.com, maxime.coquelin@redhat.com, andrew.rybchenko@oktetlabs.ru, absaini@amd.com Received: from [10.170.66.118] (port=50766 helo=xndengvm004118.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1oBuT4-0005xh-Jk; Thu, 14 Jul 2022 01:45:07 -0700 From: To: CC: , , , Abhimanyu Saini Subject: [PATCH v2 4/5] vdpa/sfc: enable support for multi-queue Date: Thu, 14 Jul 2022 14:14:50 +0530 Message-ID: <20220714084451.38375-5-asaini@xilinx.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20220714084451.38375-1-asaini@xilinx.com> References: <20220714084451.38375-1-asaini@xilinx.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: e5f8bfdc-0d8e-4f39-7ca3-08da65752a01 X-MS-TrafficTypeDiagnostic: DM6PR02MB5100:EE_|BN8NAM11FT015:EE_|MW2PR12MB2587:EE_ X-MS-Exchange-SenderADCheck: 0 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 7xNECT6+22RD0DxxxV8hUwamShaNsgcCrmWdDJ2gj/tkuiR/FiBau0wwj1/no1tn1jAgah5vVT7mMenVgk4QSAVwBmQMeqJHrC2J12G9W6bvFJLpwT0mIisF8viqwxXvnKgp7RBr5OKFVyyNwhIKkQWxXPxeGHqumrEdxFT/tZeS84bOCCjJlscC6U0y/wvZ8V86s2yAjc6rHFV1wRaMZuy38rZRJAibnF1mV2IRbsFvASfuVl0qiW0/53KY+9CNAm4hDf8hg7vm8bZN2thU3vE2MV03x8qa+Og723b6UAYKYi/R/q1wwQO6sA6ZsubwVk5y2ku12TFN7H1acYieOhN87e2u3SWjVQ4MP1q6k5PMjkd1Ijk8QJAyvg1OOKvX9HVCgK3PstR5dzfCpH6GpyfHxqj33AvdKwpMe5S54KGZDQ4BBtafzbvouQPl29Kstztvh6/y07DspEwUZPuLvndEA4Wl+zfZpvkotUpCC1z/CuA3UVwxdLlodx91pr1D7sJ2z6qre9hgVxE21WTZhoxvlvataSmyRNqeIYkxRIvOAaWuaAmUwh2qyRLNvUg5tFwdepFOnDUo284mPJJpcr3bYVht0Zlui+FkWGho69i6PO46GykYqimZtqYSM0KSCu399nzWzXxF3L2z1pObQrf2VOOHotuAaksO/dmSIERhqVBGXoqnBHejxJbRnIjkrjxGE6YsvQv75vvG8TF0kCUYxsOqOrESYdBnI8FbFpqg2uWOz2Mn47Fsaa4AXI4DaGi7pcHY4ZXJO7inKt3gTFzXFopghtAvORh6QMV44xjLCPUV4Pdn08/AjXFTTmg3ekDhIOuwWUnaW11UaNzlRMbXsQZLkTLtjR8oyR8srq0= X-Forefront-Antispam-Report-Untrusted: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch01.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(13230016)(4636009)(396003)(346002)(376002)(136003)(39860400002)(36840700001)(46966006)(40470700004)(40460700003)(4326008)(2616005)(82740400003)(1076003)(40480700001)(186003)(54906003)(7636003)(70586007)(478600001)(83380400001)(6916009)(2906002)(316002)(336012)(41300700001)(70206006)(8676002)(6666004)(7696005)(2876002)(9786002)(5660300002)(36860700001)(8936002)(26005)(82310400005)(36756003)(426003)(47076005)(356005)(102446001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR02MB5100 X-MS-Exchange-Transport-CrossTenantHeadersStripped: BN8NAM11FT015.eop-nam11.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 25c0b379-6ece-4ebc-e69d-08da657527ac X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WffMuUEh21jzJKlBNyTj980+jK9Kbr9iESy2TH9D3qOEOPZvq/o/LD5ZCabWDKVD5FdF3YU0vUzjrHyRnetNRZ2JuuYt6yrcOlkA7H54xN59KOPun3lC/7nKXOM1e+tKNm+GEXCQNDx4o7wHlUciVKjvsz4GxXpbMoeMdtHlY1IRztf7CkrXr7vYAu0jWa7V6vTTSAv5meId3KL8yBSCmdrnH5HHgmBI+hJQKxd95W3sujqF3gvfeMnhOFJ6KW1aohrJnecY6wkJte5m3xkIU3hwaMfHxHYLd3UyZVhh6vITpYjMjerGO8ZTh2+DCqkJ7IsahZeosgymLqdVwy+grFyx8RqbdiKaUvwJc90En8XWkXvYRiTCvb5ny+9l/xd2fKcKlH7i2lMgJJOo2MODhOu0H2hvmjzk9Ui8H0Fr2Kgdx+tRcwSGSl6AQWZJdn+PAGsw4eyvoWIi/1V/Y4zcKMxv69rQWG4HnVknfvyNFSmtwciRLvo/obKIaYrmePInxH0frmAHhlMvn4ldtBmwq7Jz9tElEsYRIeoVPTLLRaQUR1IxeggSt/LRdYULRfPzONB0f4sLcYl94JIkzYGvWfwsb0U5yB2z19mQU+M2oNRjrwreFdDMx/hG902CK9UaLGMGWORwmbcqg4L9C0YblUXZSLlLaN0Sqqmd/FaUIJORsRJElATJv960Ez/k9MPlM94zwvt/GhWuT/tNy+bAEY6icSue07Klr+woZZuwbd5/DF+lLYsdGWOSwu6g+O6CzDXvbX0+vR5xll34Cb2q9duyQEIU8XRq5VOPJjJWYOwdy8e8nGlpNXHUl7muvF+w1XPy5eWBqJtksRn72FMtSYZgpt6Lk6nvwsqJLTea+9A= X-Forefront-Antispam-Report: CIP:20.83.241.18; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mailrelay000001.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230016)(4636009)(396003)(346002)(39860400002)(376002)(136003)(46966006)(36840700001)(26005)(40480700001)(478600001)(41300700001)(9786002)(2906002)(2876002)(6666004)(83380400001)(47076005)(8936002)(5660300002)(186003)(336012)(426003)(1076003)(83170400001)(2616005)(36756003)(42882007)(82310400005)(7696005)(54906003)(316002)(81166007)(8676002)(82740400003)(4326008)(6916009)(36860700001)(70206006)(102446001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2022 08:45:11.4947 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e5f8bfdc-0d8e-4f39-7ca3-08da65752a01 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[20.83.241.18]; Helo=[mailrelay000001.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-BN8NAM11FT015.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR12MB2587 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 From: Abhimanyu Saini Increase the number to default RX/TX queue pairs to 8, and add MQ feature flag to vDPA protocol features. Signed-off-by: Abhimanyu Saini --- v2: * Fix checkpatch warnings * Add a cover letter drivers/vdpa/sfc/sfc_vdpa_hw.c | 2 ++ drivers/vdpa/sfc/sfc_vdpa_ops.c | 10 ++++++---- drivers/vdpa/sfc/sfc_vdpa_ops.h | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/vdpa/sfc/sfc_vdpa_hw.c b/drivers/vdpa/sfc/sfc_vdpa_hw.c index a7018b1ffe..edb7e35c2c 100644 --- a/drivers/vdpa/sfc/sfc_vdpa_hw.c +++ b/drivers/vdpa/sfc/sfc_vdpa_hw.c @@ -286,6 +286,8 @@ sfc_vdpa_estimate_resource_limits(struct sfc_vdpa_adapter *sva) SFC_VDPA_ASSERT(max_queue_cnt > 0); sva->max_queue_count = max_queue_cnt; + sfc_vdpa_log_init(sva, "NIC init done with %u pair(s) of queues", + max_queue_cnt); return 0; diff --git a/drivers/vdpa/sfc/sfc_vdpa_ops.c b/drivers/vdpa/sfc/sfc_vdpa_ops.c index f4c4f82605..6401d4e16f 100644 --- a/drivers/vdpa/sfc/sfc_vdpa_ops.c +++ b/drivers/vdpa/sfc/sfc_vdpa_ops.c @@ -24,14 +24,16 @@ (1ULL << VHOST_USER_PROTOCOL_F_SLAVE_REQ) | \ (1ULL << VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD) | \ (1ULL << VHOST_USER_PROTOCOL_F_HOST_NOTIFIER) | \ - (1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD)) + (1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD) | \ + (1ULL << VHOST_USER_PROTOCOL_F_MQ)) /* * Set of features which are enabled by default. * Protocol feature bit is needed to enable notification notifier ctrl. */ #define SFC_VDPA_DEFAULT_FEATURES \ - (1ULL << VHOST_USER_F_PROTOCOL_FEATURES) + ((1ULL << VHOST_USER_F_PROTOCOL_FEATURES) | \ + (1ULL << VIRTIO_NET_F_MQ)) #define SFC_VDPA_MSIX_IRQ_SET_BUF_LEN \ (sizeof(struct vfio_irq_set) + \ @@ -321,8 +323,8 @@ sfc_vdpa_virtq_stop(struct sfc_vdpa_ops_data *ops_data, int vq_num) /* stop the vq */ rc = efx_virtio_qstop(vq, &vq_idx); if (rc == 0) { - ops_data->vq_cxt[vq_num].cidx = vq_idx.evvd_vq_cidx; - ops_data->vq_cxt[vq_num].pidx = vq_idx.evvd_vq_pidx; + ops_data->vq_cxt[vq_num].cidx = vq_idx.evvd_vq_used_idx; + ops_data->vq_cxt[vq_num].pidx = vq_idx.evvd_vq_avail_idx; } ops_data->vq_cxt[vq_num].enable = B_FALSE; diff --git a/drivers/vdpa/sfc/sfc_vdpa_ops.h b/drivers/vdpa/sfc/sfc_vdpa_ops.h index 9dbd5b84dd..5c8e352de3 100644 --- a/drivers/vdpa/sfc/sfc_vdpa_ops.h +++ b/drivers/vdpa/sfc/sfc_vdpa_ops.h @@ -7,7 +7,7 @@ #include -#define SFC_VDPA_MAX_QUEUE_PAIRS 1 +#define SFC_VDPA_MAX_QUEUE_PAIRS 8 enum sfc_vdpa_context { SFC_VDPA_AS_VF -- 2.18.2