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 05015A00C2; Thu, 24 Nov 2022 11:31:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9B6A142DB5; Thu, 24 Nov 2022 11:31:32 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2058.outbound.protection.outlook.com [40.107.223.58]) by mails.dpdk.org (Postfix) with ESMTP id C355342C4D for ; Thu, 24 Nov 2022 11:31:31 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k1Cvl7bjC7zT5buAa1pMfISmrdJ4W6AAFdmU8khWS5gMqcKWSLOhOHJ5Nx8DuooMN2sGvFsXa392J2cuOUuATHWla/iM3hzKEiQGBu/khRq+qMjHRErgubCidPrYaGaMwtqZWijwocx0y2WjTT+uI70gKkQJFL5OX05Q8z5tPY9kfjKyctsjdKVTjJCTkJMIFvVZC/avg+c8mmsbdJs2h+0XYLxu40uyponZnMoebyb6IhnpOXqO+UM5oL1O5w5uP8KHy9rIy/zUVqtjytCv4cz0/ZL8FA5nDEZWBPVNkRNd17Q0hZlQgL7o3xj3VEtF66x4pcDq3SYqEy5aeuy/cA== 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=Wopo1GfaYfdoGdxCMjww9bciZmbLgljKpkTSuRVOkzE=; b=VNZjNIe0+BUdtGi9TeopwmhJbASOumX48D5DbM6b6P4P82nW5+we1j92ceebiguJCOuelrigfh2ezczrpl8uvpi0pDpnn13AuyslHANJXUlbPsUgK2dmBm69nU831rGCGTA/3s3AL9I/zna6vrv39tykzcIXOpLgRxYW9sOIds/of4wgHun8ad8hK+qFxZwkqJJm8f9o6XTiQeESGOvWVpwbG/V7l0gsuP5kVVLvLu582Dw7UCNaqYrzLREudAARU6+dVFjfGSGwXLeg/NcSahacf60Bh4EWO0dXVwDtkLuQKg8tHAxyKj5RQR7v79gsju8NerHLYuP+pmqzWgFHTQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Wopo1GfaYfdoGdxCMjww9bciZmbLgljKpkTSuRVOkzE=; b=byOEJu/IWAQOGKpHgF5aLt5lKNVOVSK5c6IswRieTZ3YspvBFziat/seuVmXVqy+Uwd3TrQ+BLxWSP3YwmwH86FgfT3S9/tWDwqQ1u/bBXbMoNk9eQb5OSG4c+xBDu+JemPyL26HG50GGzpQ8jbtCTB3s8x+jSPWro9QcdxOlgs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by MW3PR12MB4410.namprd12.prod.outlook.com (2603:10b6:303:5b::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.19; Thu, 24 Nov 2022 10:31:27 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::b482:d5bd:c7d0:3842]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::b482:d5bd:c7d0:3842%8]) with mapi id 15.20.5857.019; Thu, 24 Nov 2022 10:31:27 +0000 Message-ID: <4a01c6bf-a8cd-c7b9-3c9a-a4aa3d443cce@amd.com> Date: Thu, 24 Nov 2022 10:31:18 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH v3 1/2] doc: note KNI alternatives To: =?UTF-8?Q?Morten_Br=c3=b8rup?= , Maxime Coquelin , Chenbo Xia Cc: dev@dpdk.org, Olivier Matz Olivier Matz , David Marchand David Marchand , Stephen Hemminger Stephen Hemminger , Elad Nachman , Igor Ryzhov , Dan Gora References: <20210623173142.3803801-1-ferruh.yigit@intel.com> <20211124171609.3101896-1-ferruh.yigit@intel.com> <98CBD80474FA8B44BF855DF32C47DC35D86D2D@smartserver.smartshare.dk> Content-Language: en-US From: Ferruh Yigit In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D86D2D@smartserver.smartshare.dk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO6P123CA0060.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:310::20) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|MW3PR12MB4410:EE_ X-MS-Office365-Filtering-Correlation-Id: bbcf6e38-19dd-4965-3dcd-08dace070b33 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1wpCPtk30NocBGnq3fI0DyXOONaJaX9Ye6R1i8A/h/bJ/cSgg6LvMg+GzNso7BCa+MOHurONSSpDDNocGIwlCANfQ6MLigZHWdYUaEMyoZHOBSCbM1hE+6k67Wk5P2QN3fE/BJkhNhB9RYvomO4AF8mtarfgYAXj7cpCaGszG1SUhwLx2AqQqINadohjVrmok/P1E8uqt1LcvgxMgG/Tno5MWHoBw3090C8HaVgnpvPY+0RU45jR0a9iJpSKndBHkpp614oIMAA7VvDODYMVT2DDxl6H4XUFiKDmRyUKqAeQw0+kaPH8NCRmwOs6qJ2n2TxutvR6+by29uJxpsnMik/GsRhdCKhBLy5RKRIJ/pP+DJYONxWeEO94NEuvPZRH/hrwcfYjPFxwO7m5aAW0Mhk9LACX5pICy+Wzc6vzsIfBhqbrXXULB73FZVWDvG91k+TnvjnPEkbmOa78tYXVnht/Zk1JbYuRi5P87ZHG2OLSWGpPeb82YmU2F5rKgurlu01EDQzE0TGdmkkAxNCeqQsU8vFV3+i1IwOnzpQqYludCt1m5jQ4peVZ12/VbhxV/YRAcUUiVKY5BYEG6jnT7VSb3E/E2wjNc46DBcjpEJtx0ATq76PydJAHUJz5bh7N/sQeK4Sphv0TRVuqsq94rZc/+MXLMagzHT8UjYqynYHZUtNRbB7SrmT5FbySf5gUO48nM0yveesslJfmKi0NTElISha2nik3JIAd89ji60t32BYBrv3ZscMdOH2Z1bc4 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(376002)(366004)(346002)(136003)(396003)(39860400002)(451199015)(26005)(6666004)(6512007)(2616005)(66574015)(6506007)(86362001)(66476007)(66946007)(66556008)(4326008)(8676002)(186003)(31696002)(53546011)(5660300002)(7416002)(8936002)(44832011)(36756003)(41300700001)(6486002)(478600001)(38100700002)(316002)(83380400001)(110136005)(54906003)(2906002)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UEZXNlVMWVdaY2orR0xHbG9aYU5JMWg1cnh1VmFaVnJISFBOcmFWMFRQZ1lQ?= =?utf-8?B?bkg1bmZvRUtKUXdJUmNBYzAwMmtRTUJKMmNHVHlWbFhpMHl5MnZibkVNUnBW?= =?utf-8?B?TDNHRCtIT0JZWnllOGRQcHJDR3dEUGR0d0lJellucnlEUXNUMVlWckZUQT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9wVFMxMytKSUM2N0REeWZCelE0WEZNeGJ2?= =?utf-8?B?MDd4SmtaRC9RUXFjZ0I1TW5JbUJpbDMzUkUzV3g3cnAzUEZ1akgrM1BNcVRi?= =?utf-8?B?M1VFTWdqQVVzLzkrUjhKRms3TWhHMkQrZUZSMkVGM0hBZUk4Z1U2eHpRSCtl?= =?utf-8?Q?4fWqY1Iqi+CpN3IyvQAEveXxY?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: bbcf6e38-19dd-4965-3dcd-08dace070b33 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Nov 2022 10:31:27.7626 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ST3TZL/cjP52zewEdaSLZQsM99QDKBmchhYALgsvBou83ND2W2fObKHSIFGpg+uw X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4410 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 12/1/2021 4:31 PM, Morten Brørup wrote: >> From: Ferruh Yigit [mailto:ferruh.yigit@intel.com] >> Sent: Wednesday, 24 November 2021 18.16 >> >> Add more information on alternatives of KNI and the cons of KNI against >> these alternatives. >> >> Signed-off-by: Ferruh Yigit >> --- >> Cc: Olivier Matz Olivier Matz >> Cc: David Marchand David Marchand >> Cc: Stephen Hemminger Stephen Hemminger >> Cc: Elad Nachman >> Cc: Igor Ryzhov >> Cc: Dan Gora >> >> v3: >> * reference tap document directly instead of adding label to it. >> --- >> .../prog_guide/kernel_nic_interface.rst | 34 +++++++++++++++++-- >> 1 file changed, 31 insertions(+), 3 deletions(-) >> >> diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst >> b/doc/guides/prog_guide/kernel_nic_interface.rst >> index 1ce03ec1a374..f5a8b7c0782c 100644 >> --- a/doc/guides/prog_guide/kernel_nic_interface.rst >> +++ b/doc/guides/prog_guide/kernel_nic_interface.rst >> @@ -6,16 +6,44 @@ >> Kernel NIC Interface >> ==================== >> >> +.. Note:: >> + >> + :ref:`virtio_user_as_exceptional_path` alternative is the preferred >> way for >> + interfacing with the Linux network stack as it is an in-kernel >> solution and >> + has similar performance expectations. >> + >> The DPDK Kernel NIC Interface (KNI) allows userspace applications >> access to the Linux* control plane. >> >> -The benefits of using the DPDK KNI are: >> +KNI provides an interface with the kernel network stack and allows >> management of >> +DPDK ports using standard Linux net tools such as ``ethtool``, >> ``ifconfig`` and >> +``tcpdump``. >> + >> +The main use case of KNI is to get/receive exception packets from/to >> Linux network >> +stack while main datapath IO is done bypassing the networking stack. >> + >> +There are other alternatives to KNI, all are available in the upstream >> Linux: >> + >> +#. :ref:`virtio_user_as_exceptional_path` >> + >> +#. :doc:`../nics/tap` as wrapper to `Linux tun/tap >> + `_ >> + >> +The benefits of using the KNI against alternatives are: >> >> * Faster than existing Linux TUN/TAP interfaces >> (by eliminating system calls and copy_to_user()/copy_from_user() >> operations. >> >> -* Allows management of DPDK ports using standard Linux net tools >> such as ethtool, ifconfig and tcpdump. >> +The cons of the KNI are: > > Consider if "disadvantages" is more appropriate than "cons". (I'm not a native English speaker.) > Both fine for me, OK to use 'disadvantages'. >> + >> +* It is out-of-tree Linux kernel module and it can't be distributed as >> binary as >> + part of operating system vendor DPDK packages. This makes it harder >> to >> + consume, although it is always possible to compile it from the >> source code. >> + >> +* As it shares memory between userspace and kernelspace, and kernel >> part >> + directly uses input provided by userspace, it is not safe. This >> makes hard to >> + upstream the module. >> >> -* Allows an interface with the kernel network stack. >> +* Only a subset of net devices control commands are supported by KNI. > > If it is still relevant, add something along the lines of: > * Requires dedicated kernel cores. > ack >> >> The components of an application using the DPDK Kernel NIC Interface >> are shown in :numref:`figure_kernel_nic_intf`. >> >> -- >> 2.31.1 >> > > Could you perhaps also promote the virtio-user documentation by moving it from the HowTo Guides to the Programmer's Guide? > Hi Morten, This is an old patch, I assumed merged v4 by Thomas superseded this patch, but it seems this patch was not involved in that, so I will make a new version. For the virtio-user documentation, no objection to move it to programmer's guide, I hope Maxime and Chenbo can help there.