diff mbox series

[net,v4] docs: fix info about representor identification

Message ID 20231012123144.15768-1-mateusz.polchlopek@intel.com (mailing list archive)
State Accepted
Commit a258c804aa8742763dce694b5e992d7ccf4294f2
Delegated to: Netdev Maintainers
Headers show
Series [net,v4] docs: fix info about representor identification | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 9 this patch: 9
netdev/cc_maintainers warning 2 maintainers not CCed: linux-doc@vger.kernel.org corbet@lwn.net
netdev/build_clang success Errors and warnings before: 9 this patch: 9
netdev/verify_signedoff fail author Signed-off-by missing
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 9 this patch: 9
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 14 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Mateusz Polchlopek Oct. 12, 2023, 12:31 p.m. UTC
Update the "How are representors identified?" documentation
subchapter. For newer kernels driver should use
SET_NETDEV_DEVLINK_PORT instead of ndo_get_devlink_port()
callback.

---
v4:
- changed the docs description

v3:
- fixed the lack of hyphen in changelog
https://lore.kernel.org/netdev/20231010120845.151531-1-mateusz.polchlopek@intel.com/

v2:
- targeting -net, without IWL
https://lore.kernel.org/netdev/20231009111544.143609-1-mateusz.polchlopek@intel.com/

v1:
https://lore.kernel.org/netdev/20231006091412.92156-1-mateusz.polchlopek@intel.com/
---

Fixes: 7712b3e966ea ("Merge branch 'net-fix-netdev-to-devlink_port-linkage-and-expose-to-user'")
Signed-off-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
---
 Documentation/networking/representors.rst | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Edward Cree Oct. 12, 2023, 5:32 p.m. UTC | #1
On 12/10/2023 13:31, Mateusz Polchlopek wrote:
> Update the "How are representors identified?" documentation
> subchapter. For newer kernels driver should use
> SET_NETDEV_DEVLINK_PORT instead of ndo_get_devlink_port()
> callback.
> 
> ---

These --- lines in the middle of the commit message will cut off
 the tag block for 'git am'.

Other than that,
Reviewed-by: Edward Cree <ecree.xilinx@gmail.com>

> v4:
> - changed the docs description
> 
> v3:
> - fixed the lack of hyphen in changelog
> https://lore.kernel.org/netdev/20231010120845.151531-1-mateusz.polchlopek@intel.com/
> 
> v2:
> - targeting -net, without IWL
> https://lore.kernel.org/netdev/20231009111544.143609-1-mateusz.polchlopek@intel.com/
> 
> v1:
> https://lore.kernel.org/netdev/20231006091412.92156-1-mateusz.polchlopek@intel.com/
> ---
> 
> Fixes: 7712b3e966ea ("Merge branch 'net-fix-netdev-to-devlink_port-linkage-and-expose-to-user'")
> Signed-off-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>> ---
>  Documentation/networking/representors.rst | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/networking/representors.rst b/Documentation/networking/representors.rst
> index ee1f5cd54496..decb39c19b9e 100644
> --- a/Documentation/networking/representors.rst
> +++ b/Documentation/networking/representors.rst
> @@ -162,9 +162,11 @@ How are representors identified?
>  The representor netdevice should *not* directly refer to a PCIe device (e.g.
>  through ``net_dev->dev.parent`` / ``SET_NETDEV_DEV()``), either of the
>  representee or of the switchdev function.
> -Instead, it should implement the ``ndo_get_devlink_port()`` netdevice op, which
> -the kernel uses to provide the ``phys_switch_id`` and ``phys_port_name`` sysfs
> -nodes.  (Some legacy drivers implement ``ndo_get_port_parent_id()`` and
> +Instead, the driver should use the ``SET_NETDEV_DEVLINK_PORT`` macro to
> +assign a devlink port instance to the netdevice before registering the
> +netdevice; the kernel uses the devlink port to provide the ``phys_switch_id``
> +and ``phys_port_name`` sysfs nodes.
> +(Some legacy drivers implement ``ndo_get_port_parent_id()`` and
>  ``ndo_get_phys_port_name()`` directly, but this is deprecated.)  See
>  :ref:`Documentation/networking/devlink/devlink-port.rst <devlink_port>` for the
>  details of this API.
>
patchwork-bot+netdevbpf@kernel.org Oct. 14, 2023, 12:40 a.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 12 Oct 2023 08:31:44 -0400 you wrote:
> Update the "How are representors identified?" documentation
> subchapter. For newer kernels driver should use
> SET_NETDEV_DEVLINK_PORT instead of ndo_get_devlink_port()
> callback.
> 
> ---
> v4:
> - changed the docs description
> 
> [...]

Here is the summary with links:
  - [net,v4] docs: fix info about representor identification
    https://git.kernel.org/netdev/net/c/a258c804aa87

You are awesome, thank you!
diff mbox series

Patch

diff --git a/Documentation/networking/representors.rst b/Documentation/networking/representors.rst
index ee1f5cd54496..decb39c19b9e 100644
--- a/Documentation/networking/representors.rst
+++ b/Documentation/networking/representors.rst
@@ -162,9 +162,11 @@  How are representors identified?
 The representor netdevice should *not* directly refer to a PCIe device (e.g.
 through ``net_dev->dev.parent`` / ``SET_NETDEV_DEV()``), either of the
 representee or of the switchdev function.
-Instead, it should implement the ``ndo_get_devlink_port()`` netdevice op, which
-the kernel uses to provide the ``phys_switch_id`` and ``phys_port_name`` sysfs
-nodes.  (Some legacy drivers implement ``ndo_get_port_parent_id()`` and
+Instead, the driver should use the ``SET_NETDEV_DEVLINK_PORT`` macro to
+assign a devlink port instance to the netdevice before registering the
+netdevice; the kernel uses the devlink port to provide the ``phys_switch_id``
+and ``phys_port_name`` sysfs nodes.
+(Some legacy drivers implement ``ndo_get_port_parent_id()`` and
 ``ndo_get_phys_port_name()`` directly, but this is deprecated.)  See
 :ref:`Documentation/networking/devlink/devlink-port.rst <devlink_port>` for the
 details of this API.