[Fwd: Re: Clarification on Network Manager - Implementing new configuration for T1S network device]



-------- Forwarded Message --------
From: Thomas Haller <thaller redhat com>
To: Andre Edich microchip com, Parthiban Veerasooran microchip com
Cc: Christian Gromm microchip com, Michael Fabry microchip com
Subject: Re: Clarification on Network Manager - Implementing new
configuration for T1S network device
Date: Tue, 21 Apr 2020 09:53:41 +0200

On Mon, 2020-04-20 at 12:57 +0000, Andre Edich microchip com wrote:
Hi Thomas,

On Mon, 2020-04-20 at 13:26 +0200, Thomas Haller wrote:
On Mon, 2020-04-20 at 10:51 +0000, 
Parthiban Veerasooran microchip com
wrote:

Hi,


Yes this is not a shell script of course and this is a typical
function name and it has to be implemented in the Network Manager
using ioctl. I gave this function format to describe the
configuration/functionality.

ioctl implementation for accessing/configuring phy device already
exists and also we are using successfully. If we want to go with
Network Manager then we need to implement/include those ioctl
calls
inside the Network Manager.

As you mentioned below ioctl can be used to access mii. Herewith
I
have attached the user space application which we use for your
reference. With reference to the attached file the example would
be,

access_reg(CMD_WR, 0x50001, &param1);
access_reg(CMD_WR, 0x50002, &param2);

Summarizing the above points, could you please reply to the below
queries,

To configure particular properties param1 and param2, we use
specific
for our phy register addresses like 0x50001 and 0x50002. How the
access to such registers can be implemented? Hardcoded in the
Network
Manager, implemented in a plugin, etc?"

So basically we want to know, Is it allowed to implement those
ioctl
calls inside Network Manager to access/configure phy device ? if
not
then do you have any other proposal to go for ?

Yes... I wonder, why do you think it would not be?

To access the MDIO register we use MDIO Clause 45 well defined in a
IEEE 802.3 specification.  The Linux kernel supports ioctl's that
provide access to MII, that is used to build up the MDIO
access.  That
all is not a problem.

The point of the question is that we use Vendor/Product specific MDIO
register address (0x50001) for the T1S property mentioned here as
"param1" (just an abstract name).

The mapping of standard T1S properties to MDIO Register Addresses is
not defined by T1S specifications.  Every vendor uses their own
register map for the standard T1S property "param1".

Thus, the code accessing the MDIO Register 0x50001 will configure
standard T1S property "param1" for only T1S PHY of one particular
vendor.

Does Network Manager have any problem with this design?

Hi,

Probably it is a problem.

NetworkManager probably shouldn't allow a user to write arbitrary
ethernet registers. Should it?

Shouldn't this be setup by a udev rule?

But let's please not continue this thread here, but return the the
mailing list networkmanager-list gnome org . For one, I am not familiar
with this, second, the discussion should not be only in my private mail
box. Thank you!

Hi All,

@Thomas Haller: Thank you for your clarifications.

Initially, I started this mail thread with 
networkmanager-list gnome org. After that I got a reply from Thomas
Haller so I just continued discussing with him. As per Thomas Haller's
suggestion, it should not be a private mail. So I am sharing it with
you all. Please have a look in the discussions we made here and give
your opinions/suggestions on this. Let me summarize our requirement
once again here shortly.

We have a plan to use the Network Manager as the network configuration
tool for configuring T1S network device. We have some parameters those
needs to be configured whenever the network device is getting up. Those
parameters should be visible in the user interface applications like
nmcli, nmtui and desktop gui applications for configuring and those
needs to be configured in the phy device in the lower layer. A typical
function would be like below,

access_reg(CMD_WR, 0x50001, &param1);
access_reg(CMD_WR, 0x50002, &param2);

To configure particular properties param1 and param2, we use specific
for our phy register addresses like 0x50001 and 0x50002. How the access
to such registers can be implemented ? Hardcoded in the Network
Manager, implemented in a plugin, etc ?

To access the MDIO registers we use MDIO clause 22/45 well defined in a
IEEE 802.3 specification. The linux kernel supports ioctl's that
provide access to MII, that is used to build up the MDIO access. The
point of the question is that we use Vendor/Product specific MDIO
register address (0x50001) for the T1S property mentioned here as
"param1" (just an abstract name). The mapping of standard T1S
properties to MDIO register addresses is not defined by T1S
specifications. Every vendor uses their own register map for the
standard T1S property "param1". Thus, the code accessing the MDIO
Register 0x50001 will configure the standard T1S property "param1" for
only T1S PHY of one particular vendor. Does Network Manager have any
problem with this design ?

Thanks & Regards,
Parthiban V

best,
Thomas



Regards
Andre.

The only restriciton is that this functionality must be available
on
an
upstream linux kernel. I should be free software and available so
that
a user can use this on a reasonably common Linux distribution.


If you say ok then I can start the implementation in Network
Manager
source using ioctl.

Other ioctl calls are implemented here:


https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/2ad8e6acae7b2c76d40e00a60a85aef0ea625de5/src/platform/nm-platform-utils.c



Btw, let's continue further discussion on the upstream mailing
list,
so
that others might also participate.


best!!
Thomas


-----Original Message-----
From: Thomas Haller <thaller redhat com> 
Sent: Friday, April 17, 2020 4:28 PM
To: Parthiban Veerasooran - I17164 <
Parthiban Veerasooran microchip com>
Cc: Michael Fabry - M21080 <Michael Fabry microchip com>; Andre
Edich
- M21181 <Andre Edich microchip com>
Subject: Re: Clarification on Network Manager - Implementing new
configuration for T1S network device

On Wed, 2020-04-15 at 11:02 +0000, 
Parthiban Veerasooran microchip com
wrote:
Hi,

Thank you for the reply.

A typical script would be like below,

        write_class45_mdio_register(0x50001, param_one);
        write_class45_mdio_register(0x50002, param_two);

Hm... well, this isn't a "shell script". Is
write_class45_mdio_register() supposed to be C?

What does it do? Where is it implemented? Is it some ioctl call? 


param_one and param_two are needed to be configured from user 
interface applications nmcli, nmtui and desktop GUI
applications
of 
Network Manager. 0x50001 and 0x50002 are phy register addresses
for 
those params. Whenever the network device is getting up the
Network 
Manager should do the above settings in the phy device. So
basically 
we would like to know to know the implementation mechanism
between 
user space application and kernel space for setting up the phy
device. 
It would be nice if you could provide an example implementation
for 
doing the above settings.

NetworkManager can use any "implementation mechanism" -- if
implemented. In particular, it already:

  - talk netlink (rtnl, genl for nl80211, nl802154, WireGuard),
  - ioctl (ethtool, mii, wext),
  - sysctl,
  - talk to a unix socket (ovsdb),
  - make D-Bus call,
  - spawn processes (dcbtool),
  - or use a library (libmm, libteamdctl).



Thanks & Regards,
Parthiban V

-----Original Message-----
From: Thomas Haller <thaller redhat com>
Sent: Friday, April 10, 2020 2:52 PM
To: Parthiban Veerasooran - I17164 <
Parthiban Veerasooran microchip com>; 
networkmanager-list gnome org
Cc: Michael Fabry - M21080 <Michael Fabry microchip com>
Subject: Re: Clarification on Network Manager - Implementing
new 
configuration for T1S network device

On Tue, 2020-04-07 at 09:37 +0000, Parthiban.Veerasooran---
via 
networkmanager-list wrote:
Hi Team,
 
Good Day...! This is Parthiban from Microchip Technology.
 
This is regarding T1S network device configuration
implementation
in 
Network Manager.
 
We have a plan to use the Network Manager as the network 
configuration tool for T1S network device. We have some
parameters 
those needs to be configured in the phy device whenever the
network 
device is up.
Those
parameters should be visible in the user interface
applications
like 
nmcli, nmtui and desktop GUI to configure them and those
needs
to
be 
configured in the phy device in the lower level.
 
So could you please reply to the below queries,
 
                1. Is the Network Manager allows this type
of 
configuration ?
               
                2. If yes to the above question then could
you 
please suggest how to do it ? since this configuration is
required 
to access phy layer to configure phy device.
               
                3. Is Network Manager has access to the phy
layer
?
if yes then how to implement it ?
               
Please let me know it you need more information from my side.
If
it 
is required I can even send you a pictorial representation of
the 
requirement.
 

Hi,

what parameters need to be configured?

can you show a shell script that sets up the desired
configuration?


in principle, NetworkManager configures the interface using
kernel
API 
like netlink, sysctl, ioctl (ethtool), etc. So, yes,
NetworkManager 
should be able to set all kinds of parameters, if implemented.


best,
Thomas


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]