RE: Support for Forcing Speed/Duplex/Autoneg on i225 with DPDK igc Driver

2025-08-06 Thread Renata Saiakhova
Hi all, hi Ivan and Stephen,

Thank you for your comments and clarifications.

Indeed, the correct way to set speed and autoneg for a DPDK port is by 
configuring the link_speeds field in the struct rte_eth_conf passed to 
rte_eth_dev_configure().

However, after reviewing the openvswitch (version 3.3.2) code, I found that OVS 
does not currently expose any mechanism to set these Layer 1 attributes (speed, 
autoneg or duplex) via ovs-vsctl or OVSDB. The relevant fields in rte_eth_conf 
are not settable through OVS configuration, and there is no code to parse or 
apply such options from the OVSDB or command line. To support this, OVS would 
need to be extended to parse these options and set the corresponding fields in 
rte_eth_conf before calling rte_eth_dev_configure().

So, at present, there is no way to configure these parameters through OVS 
without adding custom code. However, for our customer we need to add this 
implementation. Do you think that the community would benefit from this 
implementation? 

Kind regards,
Renata Saiakhova

-Original Message-
From: Stephen Hemminger  
Sent: Saturday, 2 August 2025 00:02
To: Ivan Malov 
Cc: Renata Saiakhova ; [email protected]
Subject: Re: Support for Forcing Speed/Duplex/Autoneg on i225 with DPDK igc 
Driver

On Fri, 1 Aug 2025 17:10:44 +0400 (+04)
Ivan Malov  wrote:

> Hi Renata,
> 
> On Fri, 1 Aug 2025, Renata Saiakhova wrote:
> 
> > 
> > Hi all,
> > 
> > I’m trying to configure Layer 1 attributes (speed, duplex, and 
> > autonegotiation) for Intel i225 interfaces in both kernel and DPDK modes, 
> > and I’ve run into some issues.
> > 
> > In kernel driver mode, I normally use: “ethtool -s eth5 speed 100 duplex 
> > half autoneg off”.
> > 
> > However, this results in the kernel message: “igc :04:00.0 eth5: Force 
> > mode currently not supported”.
> > 
> >  
> > 
> > When the interface is bound to DPDK and connected to an OVS bridge, I 
> > configure it like this:
> > 
> > ovs-vsctl set Interface 1.extra2 \
> > 
> >   type=dpdk \
> > 
> >   options:dpdk-devargs=:04:00.0 \
> > 
> >   options:dpdk-speed=100 \
> > 
> >   options:dpdk-autoneg=false \
> > 
> >   options:dpdk-duplex=half
> > 
> > This should pass the speed/autoneg/duplex settings to the igc DPDK driver 
> > via devargs.  
> 
> Should it? Even if these were on the list of supported devargs for the 
> PMD in question, they would belong in comma-separated tokens after 
> ':04:00.0'.
> I don't see these to be parsed in the OvS, neither do I see such in the PMD.
> 
> Or are you looking at some custom OvS version?
> 
> > 
> > However, it appears these options are not applied — the interface 
> > continues to negotiate its settings as usual, and I can’t find any code in 
> > the igc DPDK driver that processes these devargs parameters.
> 
> If these were passed via 'dpdk-devargs', the PMD would've complained perhaps.
> Being passed as OvS's own options, they're likely just ignored by the OvS.
> 
> > 
> > Is support for forced speed/duplex/autoneg available at all for i225 in 
> > DPDK (or even kernel) mode? Or is this a hardware limitation?  
> 
> As per [1], 'forced' mode may not be supported in the DPDK PMD. But 
> the code suggests one can possibly try to pass, say, 
> 'RTE_ETH_LINK_SPEED_100M_HD', without being accompanied by neither 
> 'AUTONEG' nor 'FIXED', but that would still come as 'advertised' mode, not a 
> 'forced' one. I may be wrong, though.
> 
> [1] 
> https://github.com/DPDK/dpdk/blob/1b3bf1128d9bda5595861814792f74b8f571
> 60c8/drivers/net/igc/igc_ethdev.c#L1088
> 
> > 
> > Any insight, documentation pointers, or confirmation of support status 
> > especially in case of DPDK mode would be greatly appreciated.  
> 
> I take it OvS most likely needs to be augmented with extra code to 
> recognise such options and translate those into DPDK link settings. 
> For an example of how a DPDK application can do that, one should refer to 
> 'test-pmd' implementation.
> 
> Thank you.
> 
> > 
> > Best regards,
> > 
> >  
> > 
> >  
> > 
> > Renata Saiakhova
> > SW ARCHITECT
> > [email protected]
> > Tel: +32 16 799 970
> > 
> > [logo_96dpi.gif]
> > 
> > [current.png]
> > 
> >  
> > 
> > 
> >  

Use of driver specific devargs is strongly discouraged.
There is link_speeds in rte_eth_conf passed to rte_eth_dev_configure() which is 
the correct way to set fixed speed. It maybe that the driver doesn't interpret 
it correctly?


Re: Support for Forcing Speed/Duplex/Autoneg on i225 with DPDK igc Driver

2025-08-01 Thread Stephen Hemminger
On Fri, 1 Aug 2025 17:10:44 +0400 (+04)
Ivan Malov  wrote:

> Hi Renata,
> 
> On Fri, 1 Aug 2025, Renata Saiakhova wrote:
> 
> > 
> > Hi all,
> > 
> > I’m trying to configure Layer 1 attributes (speed, duplex, and 
> > autonegotiation) for Intel i225 interfaces in both kernel and DPDK modes, 
> > and I’ve run into some issues.
> > 
> > In kernel driver mode, I normally use: “ethtool -s eth5 speed 100 duplex 
> > half autoneg off”.
> > 
> > However, this results in the kernel message: “igc :04:00.0 eth5: Force 
> > mode currently not supported”.
> > 
> >  
> > 
> > When the interface is bound to DPDK and connected to an OVS bridge, I 
> > configure it like this:
> > 
> > ovs-vsctl set Interface 1.extra2 \
> > 
> >   type=dpdk \
> > 
> >   options:dpdk-devargs=:04:00.0 \
> > 
> >   options:dpdk-speed=100 \
> > 
> >   options:dpdk-autoneg=false \
> > 
> >   options:dpdk-duplex=half
> > 
> > This should pass the speed/autoneg/duplex settings to the igc DPDK driver 
> > via devargs.  
> 
> Should it? Even if these were on the list of supported devargs for the PMD in
> question, they would belong in comma-separated tokens after ':04:00.0'.
> I don't see these to be parsed in the OvS, neither do I see such in the PMD.
> 
> Or are you looking at some custom OvS version?
> 
> > 
> > However, it appears these options are not applied — the interface continues 
> > to negotiate its settings as usual, and I can’t find any code in the igc 
> > DPDK driver that processes these
> > devargs parameters.  
> 
> If these were passed via 'dpdk-devargs', the PMD would've complained perhaps.
> Being passed as OvS's own options, they're likely just ignored by the OvS.
> 
> > 
> > Is support for forced speed/duplex/autoneg available at all for i225 in 
> > DPDK (or even kernel) mode? Or is this a hardware limitation?  
> 
> As per [1], 'forced' mode may not be supported in the DPDK PMD. But the code
> suggests one can possibly try to pass, say, 'RTE_ETH_LINK_SPEED_100M_HD',
> without being accompanied by neither 'AUTONEG' nor 'FIXED', but that would 
> still
> come as 'advertised' mode, not a 'forced' one. I may be wrong, though.
> 
> [1] 
> https://github.com/DPDK/dpdk/blob/1b3bf1128d9bda5595861814792f74b8f57160c8/drivers/net/igc/igc_ethdev.c#L1088
> 
> > 
> > Any insight, documentation pointers, or confirmation of support status 
> > especially in case of DPDK mode would be greatly appreciated.  
> 
> I take it OvS most likely needs to be augmented with extra code to recognise
> such options and translate those into DPDK link settings. For an example of 
> how
> a DPDK application can do that, one should refer to 'test-pmd' implementation.
> 
> Thank you.
> 
> > 
> > Best regards,
> > 
> >  
> > 
> >  
> > 
> > Renata Saiakhova
> > SW ARCHITECT
> > [email protected]
> > Tel: +32 16 799 970
> > 
> > [logo_96dpi.gif]
> > 
> > [current.png]
> > 
> >  
> > 
> > 
> >  

Use of driver specific devargs is strongly discouraged.
There is link_speeds in rte_eth_conf passed to rte_eth_dev_configure()
which is the correct way to set fixed speed. It maybe that the driver
doesn't interpret it correctly?


Re: Support for Forcing Speed/Duplex/Autoneg on i225 with DPDK igc Driver

2025-08-01 Thread Ivan Malov

Hi Renata,

On Fri, 1 Aug 2025, Renata Saiakhova wrote:



Hi all,

I’m trying to configure Layer 1 attributes (speed, duplex, and autonegotiation) 
for Intel i225 interfaces in both kernel and DPDK modes, and I’ve run into some 
issues.

In kernel driver mode, I normally use: “ethtool -s eth5 speed 100 duplex half 
autoneg off”.

However, this results in the kernel message: “igc :04:00.0 eth5: Force mode 
currently not supported”.

 

When the interface is bound to DPDK and connected to an OVS bridge, I configure 
it like this:

ovs-vsctl set Interface 1.extra2 \

  type=dpdk \

  options:dpdk-devargs=:04:00.0 \

  options:dpdk-speed=100 \

  options:dpdk-autoneg=false \

  options:dpdk-duplex=half

This should pass the speed/autoneg/duplex settings to the igc DPDK driver via 
devargs.


Should it? Even if these were on the list of supported devargs for the PMD in
question, they would belong in comma-separated tokens after ':04:00.0'.
I don't see these to be parsed in the OvS, neither do I see such in the PMD.

Or are you looking at some custom OvS version?



However, it appears these options are not applied — the interface continues to 
negotiate its settings as usual, and I can’t find any code in the igc DPDK 
driver that processes these
devargs parameters.


If these were passed via 'dpdk-devargs', the PMD would've complained perhaps.
Being passed as OvS's own options, they're likely just ignored by the OvS.



Is support for forced speed/duplex/autoneg available at all for i225 in DPDK 
(or even kernel) mode? Or is this a hardware limitation?


As per [1], 'forced' mode may not be supported in the DPDK PMD. But the code
suggests one can possibly try to pass, say, 'RTE_ETH_LINK_SPEED_100M_HD',
without being accompanied by neither 'AUTONEG' nor 'FIXED', but that would still
come as 'advertised' mode, not a 'forced' one. I may be wrong, though.

[1] 
https://github.com/DPDK/dpdk/blob/1b3bf1128d9bda5595861814792f74b8f57160c8/drivers/net/igc/igc_ethdev.c#L1088



Any insight, documentation pointers, or confirmation of support status 
especially in case of DPDK mode would be greatly appreciated.


I take it OvS most likely needs to be augmented with extra code to recognise
such options and translate those into DPDK link settings. For an example of how
a DPDK application can do that, one should refer to 'test-pmd' implementation.

Thank you.



Best regards,

 

 

Renata Saiakhova
SW ARCHITECT
[email protected]
Tel: +32 16 799 970

[logo_96dpi.gif]

[current.png]

 




Support for Forcing Speed/Duplex/Autoneg on i225 with DPDK igc Driver

2025-08-01 Thread Renata Saiakhova
Hi all,
I'm trying to configure Layer 1 attributes (speed, duplex, and autonegotiation) 
for Intel i225 interfaces in both kernel and DPDK modes, and I've run into some 
issues.
In kernel driver mode, I normally use: "ethtool -s eth5 speed 100 duplex half 
autoneg off".
However, this results in the kernel message: "igc :04:00.0 eth5: Force mode 
currently not supported".

When the interface is bound to DPDK and connected to an OVS bridge, I configure 
it like this:
ovs-vsctl set Interface 1.extra2 \
  type=dpdk \
  options:dpdk-devargs=:04:00.0 \
  options:dpdk-speed=100 \
  options:dpdk-autoneg=false \
  options:dpdk-duplex=half
This should pass the speed/autoneg/duplex settings to the igc DPDK driver via 
devargs.
However, it appears these options are not applied - the interface continues to 
negotiate its settings as usual, and I can't find any code in the igc DPDK 
driver that processes these devargs parameters.
Is support for forced speed/duplex/autoneg available at all for i225 in DPDK 
(or even kernel) mode? Or is this a hardware limitation?
Any insight, documentation pointers, or confirmation of support status 
especially in case of DPDK mode would be greatly appreciated.
Best regards,


Renata Saiakhova
SW ARCHITECT
[email protected]
Tel: +32 16 799 970
[https://www.ekinops.com/images/public-communication/mail-signature/logo_96dpi.gif]
[https://www.ekinops.com/images/public-communication/mail-signature/current.png]