From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 20B87C7EE22 for ; Tue, 9 May 2023 15:08:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 50FD240E46; Tue, 9 May 2023 15:08:29 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 50FD240E46 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1683644909; bh=ab2VZCfigYm+cmfAIKd3mV0DM1PYjPyvbgbRV+P/oHA=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=3qJVGFOoKNab8BAqCN3DhJvMSzWoqQfyjIz2m0Obq7m9MEUL9O+Twqj822TyAloHu Rk2PTQ5zFDriWiCpax2o+HlzpRPZjNO08TPr5VBmACH1QgQxGaBtLuIyrq/YN7ntvf SWAOvdKt0qXVg5ux0Rel4y7u/nh7FYDObMfFRR3oJpQ5lHmFthrgGM8ZTy4pvrs7lW VYLdaPWzYScTrzDINMAAf/vbH5Rn9aqSBaWqXDSz2VjqSOqrkE9KvEDALoEUGdY3RO mRos0b7osY+tbKjohDDPMabiJ9UI5g3phNysqGdQKXGh+iMHvHSz3sB9NAAE+YOE01 vp5XJOmlzE+ug== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9h2yfyQes9CS; Tue, 9 May 2023 15:08:27 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 64327413D3; Tue, 9 May 2023 15:08:27 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 64327413D3 Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id EFA381BF869 for ; Tue, 9 May 2023 04:46:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id C828F84462 for ; Tue, 9 May 2023 04:46:16 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org C828F84462 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8eAheqcJVFaA for ; Tue, 9 May 2023 04:46:15 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 963FA8445F Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by smtp1.osuosl.org (Postfix) with ESMTPS id 963FA8445F for ; Tue, 9 May 2023 04:46:15 +0000 (UTC) Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-64115e652eeso39740298b3a.0 for ; Mon, 08 May 2023 21:46:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683607575; x=1686199575; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=FS+SrlPswE4eD+uqPBjYmKG/qWI7CqlW44O7ac6sfQw=; b=jS/Vgyhs4OvGHtES7CQn6HTJ7TrcEo5nxvIbB1HOts558yzS0CHFdAFqWy5T2Y7yOY LT5XRBwVXGZupITfoADbTIca8ByDOjZdQ//uUFEQSUgyNVpSxVXYyNLnm8W00eQQNVQI PfIHxYl9FMBAp6VB2nkAnlEcyuvir/xEvYCY+/8d477RjL9q8f8VfhtLJL6nY8V005ux Gt25JELwjT8hOnDDwImQkxsG4Z1GZEM2IxUOcvEv2ZrQnNB8xNBRGqt5SDkbQc/teOK7 fyHijPJ+granJIUW2TpIgRsbVSHPP49ndgM6mxBluqY0ziQ5LDDjiqW664ab/2nB0ijo pP1A== X-Gm-Message-State: AC+VfDxQtoJHc1w2rhC5EdftskhTAJEYC2F1PC1WRh1NcJHHY3x0Spid mDg1iOHac2bDxHGJS1W77hY= X-Google-Smtp-Source: ACHHUZ4NIdDCu3bFcAsii8fJUKI9h0WIH0WIawuxsax4YXaZZNlptGilxn0XFUas/f325ghGRGa2Mw== X-Received: by 2002:a17:902:e751:b0:1a9:a408:a52f with SMTP id p17-20020a170902e75100b001a9a408a52fmr20321289plf.24.1683607574777; Mon, 08 May 2023 21:46:14 -0700 (PDT) Received: from debian.me (subs03-180-214-233-91.three.co.id. [180.214.233.91]) by smtp.gmail.com with ESMTPSA id iy3-20020a170903130300b001ab1cdb4295sm384636plb.130.2023.05.08.21.46.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 May 2023 21:46:14 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id C5C1D1068D5; Tue, 9 May 2023 11:46:09 +0700 (WIB) Date: Tue, 9 May 2023 11:46:09 +0700 From: Bagas Sanjaya To: Emil Tantilov , intel-wired-lan@lists.osuosl.org Message-ID: References: <20230508194326.482-1-emil.s.tantilov@intel.com> <20230508194326.482-16-emil.s.tantilov@intel.com> MIME-Version: 1.0 In-Reply-To: <20230508194326.482-16-emil.s.tantilov@intel.com> X-Mailman-Approved-At: Tue, 09 May 2023 15:08:22 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683607575; x=1686199575; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=FS+SrlPswE4eD+uqPBjYmKG/qWI7CqlW44O7ac6sfQw=; b=jqCfQVQamQEid34WI5mvpzB6I59Gz5y00SZqQYzHgqwUgkW/HUo+i2Ja5H3vGeNkQx 4HjsHHLFEmkS7a0bdvev+JlCBnqWdfXvQNMuR5mN66SzG0rhC3u8f7XvDoEdL9MGwMWX TnogcfHk4P/zNt89ZHn6NSSoM8Te8jnmyIFlguKpt8BjcfJutf9VlvhOc6oQL6JbCzoZ Hb20Wnf2MS3suyE9m6YhC3N8AbC3AFH6nTdTh2Jp2HzbJ4V7jnyNHI/kMq0zoA/QjnfU DKEJNcQL7NYuLUadf8tfAOh/h054J585T4SCmEGnXpFWDDZ6JLoVZk1O8Kxys152Yes4 WL/A== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=jqCfQVQa Subject: Re: [Intel-wired-lan] [PATCH iwl-next v4 15/15] idpf: configure SRIOV and add other ndo_ops X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: willemb@google.com, pabeni@redhat.com, leon@kernel.org, corbet@lwn.net, simon.horman@corigine.com, linux-doc@vger.kernel.org, jesse.brandeburg@intel.com, edumazet@google.com, anthony.l.nguyen@intel.com, netdev@vger.kernel.org, kuba@kernel.org, Phani Burra , decot@google.com, davem@davemloft.net, shannon.nelson@amd.com Content-Type: multipart/mixed; boundary="===============2363629602696330763==" Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" --===============2363629602696330763== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="XB1CMNuCitGT0anZ" Content-Disposition: inline --XB1CMNuCitGT0anZ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 08, 2023 at 12:43:26PM -0700, Emil Tantilov wrote: > From: Joshua Hay >=20 > Add PCI callback to configure SRIOV and add the necessary support > to initialize the requested number of VFs by sending the virtchnl > message to the device Control Plane. >=20 > Add other ndo ops supported by the driver such as features_check, > set_rx_mode, validate_addr, set_mac_address, change_mtu, get_stats64, > set_features, and tx_timeout. Initialize the statistics task which > requests the queue related statistics to the CP. Add loopback > and promiscuous mode support and the respective virtchnl messages. >=20 > Finally, add documentation and build support for the driver. >=20 > Signed-off-by: Joshua Hay > Co-developed-by: Alan Brady > Signed-off-by: Alan Brady > Co-developed-by: Madhu Chittim > Signed-off-by: Madhu Chittim > Co-developed-by: Phani Burra > Signed-off-by: Phani Burra > Co-developed-by: Pavan Kumar Linga > Signed-off-by: Pavan Kumar Linga > Reviewed-by: Sridhar Samudrala > Reviewed-by: Willem de Bruijn > --- > .../device_drivers/ethernet/intel/idpf.rst | 162 +++++ > drivers/net/ethernet/intel/Kconfig | 10 + > drivers/net/ethernet/intel/Makefile | 1 + > drivers/net/ethernet/intel/idpf/idpf.h | 40 ++ > drivers/net/ethernet/intel/idpf/idpf_lib.c | 642 +++++++++++++++++- > drivers/net/ethernet/intel/idpf/idpf_main.c | 17 + > drivers/net/ethernet/intel/idpf/idpf_txrx.c | 26 + > drivers/net/ethernet/intel/idpf/idpf_txrx.h | 2 + > .../net/ethernet/intel/idpf/idpf_virtchnl.c | 193 ++++++ You forget to add toctree entry for the doc: ---- >8 ---- diff --git a/Documentation/networking/device_drivers/ethernet/index.rst b/D= ocumentation/networking/device_drivers/ethernet/index.rst index 417ca514a4d057..5a7e377ae2b7f5 100644 --- a/Documentation/networking/device_drivers/ethernet/index.rst +++ b/Documentation/networking/device_drivers/ethernet/index.rst @@ -30,6 +30,7 @@ Contents: intel/e1000 intel/e1000e intel/fm10k + intel/idpf intel/igb intel/igbvf intel/ixgbe > +Contents > +=3D=3D=3D=3D=3D=3D=3D=3D > + > +- Overview > +- Identifying Your Adapter > +- Additional Features & Configurations > +- Performance Optimization Automatically generate table of contents instead: ---- >8 ---- diff --git a/Documentation/networking/device_drivers/ethernet/intel/idpf.rs= t b/Documentation/networking/device_drivers/ethernet/intel/idpf.rst index ae5e6430d0e636..6f7c8e15fa20df 100644 --- a/Documentation/networking/device_drivers/ethernet/intel/idpf.rst +++ b/Documentation/networking/device_drivers/ethernet/intel/idpf.rst @@ -7,14 +7,7 @@ idpf Linux* Base Driver for the Intel(R) Infrastructure Da= ta Path Function Intel idpf Linux driver. Copyright(C) 2023 Intel Corporation. =20 -Contents -=3D=3D=3D=3D=3D=3D=3D=3D - -- Overview -- Identifying Your Adapter -- Additional Features & Configurations -- Performance Optimization - +.. contents:: =20 The idpf driver serves as both the Physical Function (PF) and Virtual Func= tion (VF) driver for the Intel(R) Infrastructure Data Path Function. > +Identifying Your Adapter > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +For information on how to identify your adapter, and for the latest Intel > +network drivers, refer to the Intel Support website: > +http://www.intel.com/support What support article(s) do you mean on identifying the adapter? > + > + > +Additional Features and Configurations > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +ethtool > +------- > +The driver utilizes the ethtool interface for driver configuration and > +diagnostics, as well as displaying statistical information. The latest e= thtool > +version is required for this functionality. Download it at: > +https://kernel.org/pub/software/network/ethtool/ "... If you don't have one yet, you can obtain it at ..." > + > + > +Viewing Link Messages > +--------------------- > +Link messages will not be displayed to the console if the distribution is > +restricting system messages. In order to see network driver link message= s on > +your console, set dmesg to eight by entering the following: > + > +# dmesg -n 8 > + > +NOTE: This setting is not saved across reboots. How can I permanently save above dmesg setting? > + > + > +Jumbo Frames > +------------ > +Jumbo Frames support is enabled by changing the Maximum Transmission Uni= t (MTU) > +to a value larger than the default value of 1500. > + > +Use the ip command to increase the MTU size. For example, enter the foll= owing > +where is the interface number: > + > +# ip link set mtu 9000 dev > +# ip link set up dev For command line snippets, use literal code blocks: ---- >8 ---- diff --git a/Documentation/networking/device_drivers/ethernet/intel/idpf.rs= t b/Documentation/networking/device_drivers/ethernet/intel/idpf.rst index 0a2982fb6f0045..30148d8cf34b14 100644 --- a/Documentation/networking/device_drivers/ethernet/intel/idpf.rst +++ b/Documentation/networking/device_drivers/ethernet/intel/idpf.rst @@ -48,9 +48,9 @@ Viewing Link Messages --------------------- Link messages will not be displayed to the console if the distribution is restricting system messages. In order to see network driver link messages = on -your console, set dmesg to eight by entering the following: +your console, set dmesg to eight by entering the following:: =20 -# dmesg -n 8 + # dmesg -n 8 =20 NOTE: This setting is not saved across reboots. =20 @@ -61,10 +61,10 @@ Jumbo Frames support is enabled by changing the Maximum= Transmission Unit (MTU) to a value larger than the default value of 1500. =20 Use the ip command to increase the MTU size. For example, enter the follow= ing -where is the interface number: +where is the interface number:: =20 -# ip link set mtu 9000 dev -# ip link set up dev + # ip link set mtu 9000 dev + # ip link set up dev =20 NOTE: The maximum MTU setting for jumbo frames is 9706. This corresponds t= o the maximum jumbo frame size of 9728 bytes. @@ -92,40 +92,40 @@ is tuned for general workloads. The user can customize = the interrupt rate control for specific workloads, via ethtool, adjusting the number of microseconds between interrupts. =20 -To set the interrupt rate manually, you must disable adaptive mode: +To set the interrupt rate manually, you must disable adaptive mode:: =20 -# ethtool -C adaptive-rx off adaptive-tx off + # ethtool -C adaptive-rx off adaptive-tx off =20 For lower CPU utilization: - Disable adaptive ITR and lower Rx and Tx interrupts. The examples below affect every queue of the specified interface. =20 - Setting rx-usecs and tx-usecs to 80 will limit interrupts to about - 12,500 interrupts per second per queue: + 12,500 interrupts per second per queue:: =20 - # ethtool -C adaptive-rx off adaptive-tx off rx-usecs 80 - tx-usecs 80 + # ethtool -C adaptive-rx off adaptive-tx off rx-usecs 80 + tx-usecs 80 =20 For reduced latency: - Disable adaptive ITR and ITR by setting rx-usecs and tx-usecs to 0 - using ethtool: + using ethtool:: =20 - # ethtool -C adaptive-rx off adaptive-tx off rx-usecs 0 - tx-usecs 0 + # ethtool -C adaptive-rx off adaptive-tx off rx-usecs 0 + tx-usecs 0 =20 Per-queue interrupt rate settings: - The following examples are for queues 1 and 3, but you can adjust other queues. =20 - To disable Rx adaptive ITR and set static Rx ITR to 10 microseconds or - about 100,000 interrupts/second, for queues 1 and 3: + about 100,000 interrupts/second, for queues 1 and 3:: =20 - # ethtool --per-queue queue_mask 0xa --coalesce adaptive-rx off - rx-usecs 10 + # ethtool --per-queue queue_mask 0xa --coalesce adaptive-rx = off + rx-usecs 10 =20 - - To show the current coalesce settings for queues 1 and 3: + - To show the current coalesce settings for queues 1 and 3:: =20 - # ethtool --per-queue queue_mask 0xa --show-coalesce + # ethtool --per-queue queue_mask 0xa --show-coalesce =20 =20 =20 @@ -139,9 +139,9 @@ helpful to optimize performance in VMs. device's local_cpulist: /sys/class/net//device/local_cpulist. =20 - Configure as many Rx/Tx queues in the VM as available. (See the idpf dr= iver - documentation for the number of queues supported.) For example: + documentation for the number of queues supported.) For example:: =20 - # ethtool -L rx tx + # ethtool -L rx tx =20 =20 Support > + > +NOTE: The maximum MTU setting for jumbo frames is 9706. This corresponds= to the > +maximum jumbo frame size of 9728 bytes. > + > +NOTE: This driver will attempt to use multiple page sized buffers to rec= eive > +each jumbo packet. This should help to avoid buffer starvation issues wh= en > +allocating receive packets. > + > +NOTE: Packet loss may have a greater impact on throughput when you use j= umbo > +frames. If you observe a drop in performance after enabling jumbo frames, > +enabling flow control may mitigate the issue. Sphinx has admonition directive facility to style above notes: ---- >8 ---- diff --git a/Documentation/networking/device_drivers/ethernet/intel/idpf.rs= t b/Documentation/networking/device_drivers/ethernet/intel/idpf.rst index 30148d8cf34b14..ae5e6430d0e636 100644 --- a/Documentation/networking/device_drivers/ethernet/intel/idpf.rst +++ b/Documentation/networking/device_drivers/ethernet/intel/idpf.rst @@ -52,7 +52,8 @@ your console, set dmesg to eight by entering the followin= g:: =20 # dmesg -n 8 =20 -NOTE: This setting is not saved across reboots. +.. note:: + This setting is not saved across reboots. =20 =20 Jumbo Frames @@ -66,16 +67,19 @@ where is the interface number:: # ip link set mtu 9000 dev # ip link set up dev =20 -NOTE: The maximum MTU setting for jumbo frames is 9706. This corresponds t= o the -maximum jumbo frame size of 9728 bytes. +.. note:: + The maximum MTU setting for jumbo frames is 9706. This corresponds to t= he + maximum jumbo frame size of 9728 bytes. =20 -NOTE: This driver will attempt to use multiple page sized buffers to recei= ve -each jumbo packet. This should help to avoid buffer starvation issues when -allocating receive packets. +.. note:: + This driver will attempt to use multiple page sized buffers to receive + each jumbo packet. This should help to avoid buffer starvation issues w= hen + allocating receive packets. =20 -NOTE: Packet loss may have a greater impact on throughput when you use jum= bo -frames. If you observe a drop in performance after enabling jumbo frames, -enabling flow control may mitigate the issue. +.. note:: + Packet loss may have a greater impact on throughput when you use jumbo + frames. If you observe a drop in performance after enabling jumbo frame= s, + enabling flow control may mitigate the issue. =20 =20 Performance Optimization Thanks. --=20 An old man doll... just what I always wanted! - Clara --XB1CMNuCitGT0anZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSSYQ6Cy7oyFNCHrUH2uYlJVVFOowUCZFnQCgAKCRD2uYlJVVFO o0eoAQCwcoPTSGgmJhLW0P24FRnk4ErnBTTj0tID9AHLUb/NRgD/Y4yHw1UgO9xe TWkZ258kY2iGsCapKd9PuKqMj/asjwA= =PHLZ -----END PGP SIGNATURE----- --XB1CMNuCitGT0anZ-- --===============2363629602696330763== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan --===============2363629602696330763==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF321C7EE22 for ; Tue, 9 May 2023 04:47:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234738AbjEIEr3 (ORCPT ); Tue, 9 May 2023 00:47:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234619AbjEIEq7 (ORCPT ); Tue, 9 May 2023 00:46:59 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D028AD38; Mon, 8 May 2023 21:46:17 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-64115eef620so39619765b3a.1; Mon, 08 May 2023 21:46:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683607575; x=1686199575; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=FS+SrlPswE4eD+uqPBjYmKG/qWI7CqlW44O7ac6sfQw=; b=jqCfQVQamQEid34WI5mvpzB6I59Gz5y00SZqQYzHgqwUgkW/HUo+i2Ja5H3vGeNkQx 4HjsHHLFEmkS7a0bdvev+JlCBnqWdfXvQNMuR5mN66SzG0rhC3u8f7XvDoEdL9MGwMWX TnogcfHk4P/zNt89ZHn6NSSoM8Te8jnmyIFlguKpt8BjcfJutf9VlvhOc6oQL6JbCzoZ Hb20Wnf2MS3suyE9m6YhC3N8AbC3AFH6nTdTh2Jp2HzbJ4V7jnyNHI/kMq0zoA/QjnfU DKEJNcQL7NYuLUadf8tfAOh/h054J585T4SCmEGnXpFWDDZ6JLoVZk1O8Kxys152Yes4 WL/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683607575; x=1686199575; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=FS+SrlPswE4eD+uqPBjYmKG/qWI7CqlW44O7ac6sfQw=; b=g+3VLhbF2B1pYVYM4WUmpwaCrYDbUNXX4jej1YyKSptrrepPwc3dZcoDZpISZz+xqt yxULKrv+TvGso4Fqwu7pBCKDaoGrMcImG1jUaFXBgOlOd3/i6KmrMbzi5PMQxtRLgBhe aJxk7uJUJ3JANIafRRWFAw8LrTGRRjX+sTVroC4u0ZhTvZGJjcUn3UN2nx1oXP5eXzoH TZdKeBmkCdk0inOk7yWciojLXk39yEhUf0SR/cnpscFizeq8so1ai20FIJR5rNdQhykw m+tmmS8OCrhCBjsJBSSbLkVqUyFWrACuEjMtkIOtY77MvZoXqnOB7s5IqNiN4uU/f2UC 24CA== X-Gm-Message-State: AC+VfDy4O1Y8ouHA0OnegXUc5dvEX+4Sc4W3pR/dzDINMOZ8U2sysWM3 avfU3Wx1o60VHLRT5wgyB+Y= X-Google-Smtp-Source: ACHHUZ4NIdDCu3bFcAsii8fJUKI9h0WIH0WIawuxsax4YXaZZNlptGilxn0XFUas/f325ghGRGa2Mw== X-Received: by 2002:a17:902:e751:b0:1a9:a408:a52f with SMTP id p17-20020a170902e75100b001a9a408a52fmr20321289plf.24.1683607574777; Mon, 08 May 2023 21:46:14 -0700 (PDT) Received: from debian.me (subs03-180-214-233-91.three.co.id. [180.214.233.91]) by smtp.gmail.com with ESMTPSA id iy3-20020a170903130300b001ab1cdb4295sm384636plb.130.2023.05.08.21.46.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 May 2023 21:46:14 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id C5C1D1068D5; Tue, 9 May 2023 11:46:09 +0700 (WIB) Date: Tue, 9 May 2023 11:46:09 +0700 From: Bagas Sanjaya To: Emil Tantilov , intel-wired-lan@lists.osuosl.org Cc: shannon.nelson@amd.com, simon.horman@corigine.com, leon@kernel.org, decot@google.com, willemb@google.com, Joshua Hay , jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, corbet@lwn.net, linux-doc@vger.kernel.org, Alan Brady , Madhu Chittim , Phani Burra , Pavan Kumar Linga Subject: Re: [PATCH iwl-next v4 15/15] idpf: configure SRIOV and add other ndo_ops Message-ID: References: <20230508194326.482-1-emil.s.tantilov@intel.com> <20230508194326.482-16-emil.s.tantilov@intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="XB1CMNuCitGT0anZ" Content-Disposition: inline In-Reply-To: <20230508194326.482-16-emil.s.tantilov@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org --XB1CMNuCitGT0anZ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 08, 2023 at 12:43:26PM -0700, Emil Tantilov wrote: > From: Joshua Hay >=20 > Add PCI callback to configure SRIOV and add the necessary support > to initialize the requested number of VFs by sending the virtchnl > message to the device Control Plane. >=20 > Add other ndo ops supported by the driver such as features_check, > set_rx_mode, validate_addr, set_mac_address, change_mtu, get_stats64, > set_features, and tx_timeout. Initialize the statistics task which > requests the queue related statistics to the CP. Add loopback > and promiscuous mode support and the respective virtchnl messages. >=20 > Finally, add documentation and build support for the driver. >=20 > Signed-off-by: Joshua Hay > Co-developed-by: Alan Brady > Signed-off-by: Alan Brady > Co-developed-by: Madhu Chittim > Signed-off-by: Madhu Chittim > Co-developed-by: Phani Burra > Signed-off-by: Phani Burra > Co-developed-by: Pavan Kumar Linga > Signed-off-by: Pavan Kumar Linga > Reviewed-by: Sridhar Samudrala > Reviewed-by: Willem de Bruijn > --- > .../device_drivers/ethernet/intel/idpf.rst | 162 +++++ > drivers/net/ethernet/intel/Kconfig | 10 + > drivers/net/ethernet/intel/Makefile | 1 + > drivers/net/ethernet/intel/idpf/idpf.h | 40 ++ > drivers/net/ethernet/intel/idpf/idpf_lib.c | 642 +++++++++++++++++- > drivers/net/ethernet/intel/idpf/idpf_main.c | 17 + > drivers/net/ethernet/intel/idpf/idpf_txrx.c | 26 + > drivers/net/ethernet/intel/idpf/idpf_txrx.h | 2 + > .../net/ethernet/intel/idpf/idpf_virtchnl.c | 193 ++++++ You forget to add toctree entry for the doc: ---- >8 ---- diff --git a/Documentation/networking/device_drivers/ethernet/index.rst b/D= ocumentation/networking/device_drivers/ethernet/index.rst index 417ca514a4d057..5a7e377ae2b7f5 100644 --- a/Documentation/networking/device_drivers/ethernet/index.rst +++ b/Documentation/networking/device_drivers/ethernet/index.rst @@ -30,6 +30,7 @@ Contents: intel/e1000 intel/e1000e intel/fm10k + intel/idpf intel/igb intel/igbvf intel/ixgbe > +Contents > +=3D=3D=3D=3D=3D=3D=3D=3D > + > +- Overview > +- Identifying Your Adapter > +- Additional Features & Configurations > +- Performance Optimization Automatically generate table of contents instead: ---- >8 ---- diff --git a/Documentation/networking/device_drivers/ethernet/intel/idpf.rs= t b/Documentation/networking/device_drivers/ethernet/intel/idpf.rst index ae5e6430d0e636..6f7c8e15fa20df 100644 --- a/Documentation/networking/device_drivers/ethernet/intel/idpf.rst +++ b/Documentation/networking/device_drivers/ethernet/intel/idpf.rst @@ -7,14 +7,7 @@ idpf Linux* Base Driver for the Intel(R) Infrastructure Da= ta Path Function Intel idpf Linux driver. Copyright(C) 2023 Intel Corporation. =20 -Contents -=3D=3D=3D=3D=3D=3D=3D=3D - -- Overview -- Identifying Your Adapter -- Additional Features & Configurations -- Performance Optimization - +.. contents:: =20 The idpf driver serves as both the Physical Function (PF) and Virtual Func= tion (VF) driver for the Intel(R) Infrastructure Data Path Function. > +Identifying Your Adapter > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +For information on how to identify your adapter, and for the latest Intel > +network drivers, refer to the Intel Support website: > +http://www.intel.com/support What support article(s) do you mean on identifying the adapter? > + > + > +Additional Features and Configurations > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +ethtool > +------- > +The driver utilizes the ethtool interface for driver configuration and > +diagnostics, as well as displaying statistical information. The latest e= thtool > +version is required for this functionality. Download it at: > +https://kernel.org/pub/software/network/ethtool/ "... If you don't have one yet, you can obtain it at ..." > + > + > +Viewing Link Messages > +--------------------- > +Link messages will not be displayed to the console if the distribution is > +restricting system messages. In order to see network driver link message= s on > +your console, set dmesg to eight by entering the following: > + > +# dmesg -n 8 > + > +NOTE: This setting is not saved across reboots. How can I permanently save above dmesg setting? > + > + > +Jumbo Frames > +------------ > +Jumbo Frames support is enabled by changing the Maximum Transmission Uni= t (MTU) > +to a value larger than the default value of 1500. > + > +Use the ip command to increase the MTU size. For example, enter the foll= owing > +where is the interface number: > + > +# ip link set mtu 9000 dev > +# ip link set up dev For command line snippets, use literal code blocks: ---- >8 ---- diff --git a/Documentation/networking/device_drivers/ethernet/intel/idpf.rs= t b/Documentation/networking/device_drivers/ethernet/intel/idpf.rst index 0a2982fb6f0045..30148d8cf34b14 100644 --- a/Documentation/networking/device_drivers/ethernet/intel/idpf.rst +++ b/Documentation/networking/device_drivers/ethernet/intel/idpf.rst @@ -48,9 +48,9 @@ Viewing Link Messages --------------------- Link messages will not be displayed to the console if the distribution is restricting system messages. In order to see network driver link messages = on -your console, set dmesg to eight by entering the following: +your console, set dmesg to eight by entering the following:: =20 -# dmesg -n 8 + # dmesg -n 8 =20 NOTE: This setting is not saved across reboots. =20 @@ -61,10 +61,10 @@ Jumbo Frames support is enabled by changing the Maximum= Transmission Unit (MTU) to a value larger than the default value of 1500. =20 Use the ip command to increase the MTU size. For example, enter the follow= ing -where is the interface number: +where is the interface number:: =20 -# ip link set mtu 9000 dev -# ip link set up dev + # ip link set mtu 9000 dev + # ip link set up dev =20 NOTE: The maximum MTU setting for jumbo frames is 9706. This corresponds t= o the maximum jumbo frame size of 9728 bytes. @@ -92,40 +92,40 @@ is tuned for general workloads. The user can customize = the interrupt rate control for specific workloads, via ethtool, adjusting the number of microseconds between interrupts. =20 -To set the interrupt rate manually, you must disable adaptive mode: +To set the interrupt rate manually, you must disable adaptive mode:: =20 -# ethtool -C adaptive-rx off adaptive-tx off + # ethtool -C adaptive-rx off adaptive-tx off =20 For lower CPU utilization: - Disable adaptive ITR and lower Rx and Tx interrupts. The examples below affect every queue of the specified interface. =20 - Setting rx-usecs and tx-usecs to 80 will limit interrupts to about - 12,500 interrupts per second per queue: + 12,500 interrupts per second per queue:: =20 - # ethtool -C adaptive-rx off adaptive-tx off rx-usecs 80 - tx-usecs 80 + # ethtool -C adaptive-rx off adaptive-tx off rx-usecs 80 + tx-usecs 80 =20 For reduced latency: - Disable adaptive ITR and ITR by setting rx-usecs and tx-usecs to 0 - using ethtool: + using ethtool:: =20 - # ethtool -C adaptive-rx off adaptive-tx off rx-usecs 0 - tx-usecs 0 + # ethtool -C adaptive-rx off adaptive-tx off rx-usecs 0 + tx-usecs 0 =20 Per-queue interrupt rate settings: - The following examples are for queues 1 and 3, but you can adjust other queues. =20 - To disable Rx adaptive ITR and set static Rx ITR to 10 microseconds or - about 100,000 interrupts/second, for queues 1 and 3: + about 100,000 interrupts/second, for queues 1 and 3:: =20 - # ethtool --per-queue queue_mask 0xa --coalesce adaptive-rx off - rx-usecs 10 + # ethtool --per-queue queue_mask 0xa --coalesce adaptive-rx = off + rx-usecs 10 =20 - - To show the current coalesce settings for queues 1 and 3: + - To show the current coalesce settings for queues 1 and 3:: =20 - # ethtool --per-queue queue_mask 0xa --show-coalesce + # ethtool --per-queue queue_mask 0xa --show-coalesce =20 =20 =20 @@ -139,9 +139,9 @@ helpful to optimize performance in VMs. device's local_cpulist: /sys/class/net//device/local_cpulist. =20 - Configure as many Rx/Tx queues in the VM as available. (See the idpf dr= iver - documentation for the number of queues supported.) For example: + documentation for the number of queues supported.) For example:: =20 - # ethtool -L rx tx + # ethtool -L rx tx =20 =20 Support > + > +NOTE: The maximum MTU setting for jumbo frames is 9706. This corresponds= to the > +maximum jumbo frame size of 9728 bytes. > + > +NOTE: This driver will attempt to use multiple page sized buffers to rec= eive > +each jumbo packet. This should help to avoid buffer starvation issues wh= en > +allocating receive packets. > + > +NOTE: Packet loss may have a greater impact on throughput when you use j= umbo > +frames. If you observe a drop in performance after enabling jumbo frames, > +enabling flow control may mitigate the issue. Sphinx has admonition directive facility to style above notes: ---- >8 ---- diff --git a/Documentation/networking/device_drivers/ethernet/intel/idpf.rs= t b/Documentation/networking/device_drivers/ethernet/intel/idpf.rst index 30148d8cf34b14..ae5e6430d0e636 100644 --- a/Documentation/networking/device_drivers/ethernet/intel/idpf.rst +++ b/Documentation/networking/device_drivers/ethernet/intel/idpf.rst @@ -52,7 +52,8 @@ your console, set dmesg to eight by entering the followin= g:: =20 # dmesg -n 8 =20 -NOTE: This setting is not saved across reboots. +.. note:: + This setting is not saved across reboots. =20 =20 Jumbo Frames @@ -66,16 +67,19 @@ where is the interface number:: # ip link set mtu 9000 dev # ip link set up dev =20 -NOTE: The maximum MTU setting for jumbo frames is 9706. This corresponds t= o the -maximum jumbo frame size of 9728 bytes. +.. note:: + The maximum MTU setting for jumbo frames is 9706. This corresponds to t= he + maximum jumbo frame size of 9728 bytes. =20 -NOTE: This driver will attempt to use multiple page sized buffers to recei= ve -each jumbo packet. This should help to avoid buffer starvation issues when -allocating receive packets. +.. note:: + This driver will attempt to use multiple page sized buffers to receive + each jumbo packet. This should help to avoid buffer starvation issues w= hen + allocating receive packets. =20 -NOTE: Packet loss may have a greater impact on throughput when you use jum= bo -frames. If you observe a drop in performance after enabling jumbo frames, -enabling flow control may mitigate the issue. +.. note:: + Packet loss may have a greater impact on throughput when you use jumbo + frames. If you observe a drop in performance after enabling jumbo frame= s, + enabling flow control may mitigate the issue. =20 =20 Performance Optimization Thanks. --=20 An old man doll... just what I always wanted! - Clara --XB1CMNuCitGT0anZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSSYQ6Cy7oyFNCHrUH2uYlJVVFOowUCZFnQCgAKCRD2uYlJVVFO o0eoAQCwcoPTSGgmJhLW0P24FRnk4ErnBTTj0tID9AHLUb/NRgD/Y4yHw1UgO9xe TWkZ258kY2iGsCapKd9PuKqMj/asjwA= =PHLZ -----END PGP SIGNATURE----- --XB1CMNuCitGT0anZ--