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 CE4ADA00C3; Tue, 18 Jan 2022 13:32:12 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BBD5F4271B; Tue, 18 Jan 2022 13:32:11 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 8B4B44271B for ; Tue, 18 Jan 2022 13:32:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642509129; x=1674045129; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=ZvEXjJKjZ3t8c5N0XZYFTQrmtdlvQ1RdA4g4bbAUN7w=; b=XUwfaUO39OuobqIJChkf0PW5TeaoTTEL1ZOnHtYUF0nDZecnkd/+shx5 44/J/oHc3kz4YogZcgs7t3+VnJF0CiVSku8+GVrDKICiMBaOLAeggZfyM djcDYuo6TG7UqIRG0ObyCSsuvPTQtBGMZXBL0L0ll6TihbWjWzYjU0CBs luZGbQ4y8hORzAJYgNu5aTdA3X44QW2QWys5hM3JNs8U2OmmtLliW2+eH iOpP/kmo9pCOn4EiNYAuxw0u3o8dBgUCSAABW4rarAMqr7bs06GZ7/azP CSMpYZl8s21C8Xxi1iJljXhEe3wU99YohNXx9L1CU+g73QJTLl8jJAfGa Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10230"; a="242364833" X-IronPort-AV: E=Sophos;i="5.88,297,1635231600"; d="scan'208";a="242364833" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2022 04:32:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,297,1635231600"; d="scan'208";a="764584841" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga006.fm.intel.com with ESMTP; 18 Jan 2022 04:32:00 -0800 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 18 Jan 2022 04:31:59 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Tue, 18 Jan 2022 04:31:59 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.173) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Tue, 18 Jan 2022 04:31:59 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KtHJayxOvylx7OxX3gm4s68jeTSEOnXWoKs0gRAw8yBmxECRrYLhs0lPIbgH12LYqdyb7VI1TfRKUNLzoaCFIAYWi/CZBr+8B0CQWQECqFtZClGgz5pm09idj9iI3mGR/61lSuHOYnh+TKqN+wH9G18QCJ/pAPWCTk+nvOx+6ZSj5JJ3jbz5ikwwMji5Y+h/XnRgD+kANmBhFmKhdlaw2BZmBxnF1AA/7YbQZQD++aSp4Fa48MlLMBkFckqdWaNcbvJIe6AaTSHGbKDZgpjVzjBGg9XE5+v8kbD1dsyUe3L7cOwN8yBlTCWxKDDLHT40zuYs8bMhHn5UEYnpRvvV/w== 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=+Xs8r4bzDqlLsmwFG9p39TYGqND9Sbsuia87PHatKuw=; b=Twwlr2mevr7L+dKqjR6e64l/Ye6RM6WwN0dYFh7ByBqlrsnynRZt1yghbB/vmY6jxawTM9qy70ecx0EWz+6F7WWTJ02v88wHSZUcVJs/2ksWoU+RCiYrrQMFaeYJtdXFKf74Es+9i8MP7CZfAbii8CvFn/+5W7i9SCpKrQn7+b+5W5PVsK2UZ6FScrxwY4yEjOe9pxhWncB430xqhZvJVYhGRPW9yu1AItnjEcBRmvkDFhK0108ASxdrA7UGvq+yIqv+VJFmZgGoA+lX6fCwEhqM9ZHJMsOLwIt1mkq34poQowJjxZaFAzJD5vlXdEH/pXwvMh4YCSU1RYE18/+k4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by MWHPR1101MB2176.namprd11.prod.outlook.com (2603:10b6:301:4f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.12; Tue, 18 Jan 2022 12:31:57 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e%7]) with mapi id 15.20.4888.014; Tue, 18 Jan 2022 12:31:57 +0000 Message-ID: <0b462af2-8dfd-b7a9-074a-a0a8c7397c79@intel.com> Date: Tue, 18 Jan 2022 12:31:51 +0000 Content-Language: en-US To: Nobuhiro MIKI , CC: , , References: <20220112072324.30601-1-nmiki@yahoo-corp.jp> From: Ferruh Yigit Subject: Re: [PATCH v2 1/1] net/tap: add a check that Rx/Tx have the same num of queues X-User: ferruhy In-Reply-To: <20220112072324.30601-1-nmiki@yahoo-corp.jp> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0042.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:152::11) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b67139da-1fea-4575-d5d9-08d9da7e849a X-MS-TrafficTypeDiagnostic: MWHPR1101MB2176:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3513; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XdC+bWxXL7cMtKUv6UoW6SRNLQtX+msJNFbmqGuYsOdI789SpE0D9jK54JB34bJaTyS2Xos2PjeSXSFrFOY0OycvV0OlMzVRcgTMNA+Trd5zki4wabPWMUt8pylicSydjlpoT6hgFnyrVcUZAQVAv/SizouEy/ogfMB04n+WzCKhjzKJbpGvTVT4MPxp8IgkOsGLaM22/1Rc4NWhX1nDxRqiiLLnksGdrK3fD9zJCrzlgORfzpPARSsKDidPQ8e4+MaEE0D3wWChPbfg9ta/P4wrsbXD1kUXm98KLkMPqaB1EcacZuvm6s/Mc0eyT68eSS2YBWUCcompgCFAfnT39hb2hSFXoBoP/DuDoJk3FuGxiClDsTQlNuPJTJZijJ9C1nTX8vGcFxsySQrOnS/aNSnZZdv6tduFUK7RahJpZhdMvAlD0hsFeqlVgX2EomoULXZTY+npDcT3dQ+wfnzRLUd3g4JzRAr2tRXdUPKMb9y5HRZ2JeU5TSjq20fxmDHakAhDToyeb3MtHMptmi+i1sCtHtR0Rovv9CZIOkgKGApYnta5NY9M51zfF4L5uvxIbnoOTDPwEtzLHvPDFDWUR+CK2L9LSUYHWpu0DpgaRC5LdF8r0/T0ue7sAsZDj804w6NZEnXkwkE278eXgDem7Z0rdFLQh3lilFKUgJC1W1trvmA9uAp3uKh+UaJhS57q+QyFz0zmH3z9V/0/1rMdoEgsaenyr+a6kXWEpaDaTlIDCpKpO0IXz+7dD8PED3LNjw5ywhMKYMV3JoDDSR6It8sQEuaS3sehvAJzqjpYPWQ= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(6486002)(6636002)(5660300002)(31696002)(31686004)(8936002)(36756003)(508600001)(966005)(83380400001)(66556008)(4326008)(53546011)(6506007)(2906002)(66946007)(82960400001)(6666004)(38100700002)(316002)(86362001)(8676002)(26005)(66476007)(2616005)(6512007)(186003)(44832011)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZWdqOWhWQVdzKzgzYkZZR0ZIcERyS1kwRW5nUS9BTVhzTk5IdVJCYk1VNE8r?= =?utf-8?B?VEJ5UWxuVHI5Sm9mb3hmbUpRY0ZmSG5ITGdSYVZOQlgwMElsL3dNY0lQNC9C?= =?utf-8?B?c0JtcndkdTZ4UkJRalVCdjhpa3FLTGNMSDc0ZDlrTEQ4QmVFR29YOG92Um1X?= =?utf-8?B?T1cvMWJOT2UwVnhlTHVLYTVOdjBqMFFza3BMVUk5UzFXTEgxYUZWdEd4cnc5?= =?utf-8?B?Q2IwRm45MGZoNjVTbEtrNVM2azhZSlV3ejVOK3NZSTJmdDJIUGhPdFRES0FN?= =?utf-8?B?RnVsUGNpMU1BZFFHa2xFMjIvVkMyejJ2Sk55SVZ2eVFjemhxNmxvM09kOGVS?= =?utf-8?B?eGVWQi9QQkl2WTd1U3hMbFVKaXhRblRQZjhxVk8wcVhadTlDdTJLOGpzUkxP?= =?utf-8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CrossTenant-Network-Message-Id: b67139da-1fea-4575-d5d9-08d9da7e849a X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2022 12:31:57.8078 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jKIVy6pVCFzRJEzIExKwWtyxbfTyH+CHya8RqvCuWBOWInWfpKEke2tOPS/MnZV8kiCB05Fh3otlfz5buUC3ew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1101MB2176 X-OriginatorOrg: intel.com 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 On 1/12/2022 7:23 AM, Nobuhiro MIKI wrote: > Users can create the desired number of RxQ and TxQ in DPDK. For > example, if the number of RxQ = 2 and the number of TxQ = 5, > a total of 8 file descriptors will be created for a tap device, > including RxQ, TxQ, and one for keepalive. The RxQ and TxQ > with the same ID are paired by dup(2). > > In this scenario, Kernel will have 3 RxQ where packets are > incoming but not read. The reason for this is that there are only > 2 RxQ that are polled by DPDK, while there are 5 queues in Kernel. > This patch add a checking if DPDK has appropriate numbers of > queues to avoid unexpected packet drop. > > Signed-off-by: Nobuhiro MIKI It makes sense to add this check, since the driver logic seem already has the assumption that Rx & Tx queue numbers will be same. But can you please update the tap documentation for this limitation/restriction? 'doc/guides/nics/tap.rst'. > --- > v2: fix commit message > > I had first discussed this issue in OVS [1], but changed my mind > that a fix in DPDK would be more appropriate. > [1]: https://mail.openvswitch.org/pipermail/ovs-dev/2021-November/389690.html > --- > drivers/net/tap/rte_eth_tap.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c > index 5bb472f1a6..02eb311e09 100644 > --- a/drivers/net/tap/rte_eth_tap.c > +++ b/drivers/net/tap/rte_eth_tap.c > @@ -940,6 +940,14 @@ tap_dev_configure(struct rte_eth_dev *dev) > RTE_PMD_TAP_MAX_QUEUES); > return -1; > } > + if (dev->data->nb_rx_queues != dev->data->nb_tx_queues) { > + TAP_LOG(ERR, > + "%s: number of rx queues %d must be equal to number of tx queues %d", > + dev->device->name, > + dev->data->nb_rx_queues, > + dev->data->nb_tx_queues); > + return -1; > + } > > TAP_LOG(INFO, "%s: %s: TX configured queues number: %u", > dev->device->name, pmd->name, dev->data->nb_tx_queues);