netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v5 00/10] add sriov support for wangxun NICs
@ 2024-08-04 12:48 Mengyuan Lou
  2024-08-05 16:40 ` Simon Horman
  0 siblings, 1 reply; 5+ messages in thread
From: Mengyuan Lou @ 2024-08-04 12:48 UTC (permalink / raw)
  To: netdev; +Cc: Mengyuan Lou

Add sriov_configure for ngbe and txgbe drivers.
Reallocate queue and irq resources when sriov is enabled.
Add wx_msg_task in interrupts handler, which is used to process the
configuration sent by vfs.
Add ping_vf for wx_pf to tell vfs about pf link change.
Make devlink allocation function generic to use it for PF and for VF.
Add PF/VF devlink port creation. It will be used to set/get VFs.

v5:
- Add devlink allocation which will be used to add uAPI.
- Remove unused EXPORT_SYMBOL.
- Unify some functions return styles in patch 1 and patch 4.
- Make the code line less than 80 columns.
v4:
https://lore.kernel.org/netdev/3601E5DE87D2BC4F+20240604155850.51983-1-mengyuanlou@net-swift.com/
- Move wx_ping_vf to patch 6.
- Modify return section format in Kernel docs.
v3:
https://lore.kernel.org/netdev/587FAB7876D85676+20240415110225.75132-1-mengyuanlou@net-swift.com/
- Do not accept any new implementations of the old SR-IOV API.
- So remove ndo_vf_xxx in these patches. Switch mode ops will be added
- in vf driver which will be submitted later.
v2:
https://lore.kernel.org/netdev/EF19E603F7CCA7B9+20240403092714.3027-1-mengyuanlou@net-swift.com/
- Fix some used uninitialised.
- Use poll + yield with delay instead of busy poll of 10 times in
 mbx_lock obtain.
- Split msg_task and flow into separate patches.
v1:
https://lore.kernel.org/netdev/DA3033FE3CCBBB84+20240307095755.7130-1-mengyuanlou@net-swift.com/

Mengyuan Lou (10):
  net: libwx: Add malibox api for wangxun pf drivers
  net: libwx: Add sriov api for wangxun nics
  net: libwx: Redesign flow when sriov is enabled
  net: libwx: Add msg task func
  net: ngbe: add sriov function support
  net: txgbe: add sriov function support
  net: libwx: allocate devlink for devlink port
  net: libwx: add eswitch switch api for devlink ops
  net: txgbe: add devlink and devlink port created
  net: ngbe: add devlink and devlink port created

 drivers/net/ethernet/wangxun/libwx/Makefile   |   3 +-
 .../net/ethernet/wangxun/libwx/wx_devlink.c   | 211 ++++
 .../net/ethernet/wangxun/libwx/wx_devlink.h   |  13 +
 .../net/ethernet/wangxun/libwx/wx_eswitch.c   |  53 +
 .../net/ethernet/wangxun/libwx/wx_eswitch.h   |  13 +
 drivers/net/ethernet/wangxun/libwx/wx_hw.c    | 301 +++++-
 drivers/net/ethernet/wangxun/libwx/wx_hw.h    |   4 +
 drivers/net/ethernet/wangxun/libwx/wx_lib.c   | 128 ++-
 drivers/net/ethernet/wangxun/libwx/wx_mbx.c   | 175 ++++
 drivers/net/ethernet/wangxun/libwx/wx_mbx.h   |  86 ++
 drivers/net/ethernet/wangxun/libwx/wx_sriov.c | 966 ++++++++++++++++++
 drivers/net/ethernet/wangxun/libwx/wx_sriov.h |  15 +
 drivers/net/ethernet/wangxun/libwx/wx_type.h  | 111 +-
 drivers/net/ethernet/wangxun/ngbe/ngbe_main.c |  73 +-
 drivers/net/ethernet/wangxun/ngbe/ngbe_mdio.c |  10 +
 drivers/net/ethernet/wangxun/ngbe/ngbe_type.h |   2 +
 .../net/ethernet/wangxun/txgbe/txgbe_irq.c    |  21 +-
 .../net/ethernet/wangxun/txgbe/txgbe_main.c   |  41 +-
 .../net/ethernet/wangxun/txgbe/txgbe_phy.c    |   8 +
 .../net/ethernet/wangxun/txgbe/txgbe_type.h   |   4 +-
 20 files changed, 2208 insertions(+), 30 deletions(-)
 create mode 100644 drivers/net/ethernet/wangxun/libwx/wx_devlink.c
 create mode 100644 drivers/net/ethernet/wangxun/libwx/wx_devlink.h
 create mode 100644 drivers/net/ethernet/wangxun/libwx/wx_eswitch.c
 create mode 100644 drivers/net/ethernet/wangxun/libwx/wx_eswitch.h
 create mode 100644 drivers/net/ethernet/wangxun/libwx/wx_mbx.c
 create mode 100644 drivers/net/ethernet/wangxun/libwx/wx_mbx.h
 create mode 100644 drivers/net/ethernet/wangxun/libwx/wx_sriov.c
 create mode 100644 drivers/net/ethernet/wangxun/libwx/wx_sriov.h

-- 
2.45.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next v5 00/10] add sriov support for wangxun NICs
  2024-08-04 12:48 [PATCH net-next v5 00/10] add sriov support for wangxun NICs Mengyuan Lou
@ 2024-08-05 16:40 ` Simon Horman
  2024-08-06  9:37   ` mengyuanlou
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Horman @ 2024-08-05 16:40 UTC (permalink / raw)
  To: Mengyuan Lou; +Cc: netdev

On Sun, Aug 04, 2024 at 08:48:31PM +0800, Mengyuan Lou wrote:
> Add sriov_configure for ngbe and txgbe drivers.
> Reallocate queue and irq resources when sriov is enabled.
> Add wx_msg_task in interrupts handler, which is used to process the
> configuration sent by vfs.
> Add ping_vf for wx_pf to tell vfs about pf link change.
> Make devlink allocation function generic to use it for PF and for VF.
> Add PF/VF devlink port creation. It will be used to set/get VFs.

I think it would be good to summarise the overall status of SR-IOV support
with this patch, and what follow-up work is planned. As Jakub mentioned [1]
this does not seem complete as is.

[1] https://lore.kernel.org/netdev/988BFB51-32C8-499C-837D-91CC1C0FFE42@net-swift.com/

I mean, I understand the NDOs were removed from the patchset (see more on
that below) but there needs to be a plan to support users of this device
in a meaningful way.

> 
> v5:
> - Add devlink allocation which will be used to add uAPI.
> - Remove unused EXPORT_SYMBOL.
> - Unify some functions return styles in patch 1 and patch 4.
> - Make the code line less than 80 columns.
> v4:
> https://lore.kernel.org/netdev/3601E5DE87D2BC4F+20240604155850.51983-1-mengyuanlou@net-swift.com/
> - Move wx_ping_vf to patch 6.
> - Modify return section format in Kernel docs.
> v3:
> https://lore.kernel.org/netdev/587FAB7876D85676+20240415110225.75132-1-mengyuanlou@net-swift.com/
> - Do not accept any new implementations of the old SR-IOV API.
> - So remove ndo_vf_xxx in these patches. Switch mode ops will be added
> - in vf driver which will be submitted later.

FYI, this policy was recently significantly relaxed [2]:

[2] https://lore.kernel.org/netdev/20240620002741.1029936-1-kuba@kernel.org/

> v2:
> https://lore.kernel.org/netdev/EF19E603F7CCA7B9+20240403092714.3027-1-mengyuanlou@net-swift.com/
> - Fix some used uninitialised.
> - Use poll + yield with delay instead of busy poll of 10 times in
>  mbx_lock obtain.
> - Split msg_task and flow into separate patches.
> v1:
> https://lore.kernel.org/netdev/DA3033FE3CCBBB84+20240307095755.7130-1-mengyuanlou@net-swift.com/

...

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next v5 00/10] add sriov support for wangxun NICs
  2024-08-05 16:40 ` Simon Horman
@ 2024-08-06  9:37   ` mengyuanlou
  2024-08-06 15:20     ` Simon Horman
  0 siblings, 1 reply; 5+ messages in thread
From: mengyuanlou @ 2024-08-06  9:37 UTC (permalink / raw)
  To: Simon Horman; +Cc: netdev



> 2024年8月6日 00:40,Simon Horman <horms@kernel.org> 写道:
> 
> On Sun, Aug 04, 2024 at 08:48:31PM +0800, Mengyuan Lou wrote:
>> Add sriov_configure for ngbe and txgbe drivers.
>> Reallocate queue and irq resources when sriov is enabled.
>> Add wx_msg_task in interrupts handler, which is used to process the
>> configuration sent by vfs.
>> Add ping_vf for wx_pf to tell vfs about pf link change.
>> Make devlink allocation function generic to use it for PF and for VF.
>> Add PF/VF devlink port creation. It will be used to set/get VFs.
> 
> I think it would be good to summarise the overall status of SR-IOV support
> with this patch, and what follow-up work is planned. As Jakub mentioned [1]
> this does not seem complete as is.
> 

Ok,got it.

> [1] https://lore.kernel.org/netdev/988BFB51-32C8-499C-837D-91CC1C0FFE42@net-swift.com/
> 
> I mean, I understand the NDOs were removed from the patchset (see more on
> that below) but there needs to be a plan to support users of this device
> in a meaningful way.
> 
>> 
>> v5:
>> - Add devlink allocation which will be used to add uAPI.
>> - Remove unused EXPORT_SYMBOL.
>> - Unify some functions return styles in patch 1 and patch 4.
>> - Make the code line less than 80 columns.
>> v4:
>> https://lore.kernel.org/netdev/3601E5DE87D2BC4F+20240604155850.51983-1-mengyuanlou@net-swift.com/
>> - Move wx_ping_vf to patch 6.
>> - Modify return section format in Kernel docs.
>> v3:
>> https://lore.kernel.org/netdev/587FAB7876D85676+20240415110225.75132-1-mengyuanlou@net-swift.com/
>> - Do not accept any new implementations of the old SR-IOV API.
>> - So remove ndo_vf_xxx in these patches. Switch mode ops will be added
>> - in vf driver which will be submitted later.
> 
> FYI, this policy was recently significantly relaxed [2]:
> 
> [2] https://lore.kernel.org/netdev/20240620002741.1029936-1-kuba@kernel.org/
> 
>> v2:
>> https://lore.kernel.org/netdev/EF19E603F7CCA7B9+20240403092714.3027-1-mengyuanlou@net-swift.com/
>> - Fix some used uninitialised.
>> - Use poll + yield with delay instead of busy poll of 10 times in
>> mbx_lock obtain.
>> - Split msg_task and flow into separate patches.
>> v1:
>> https://lore.kernel.org/netdev/DA3033FE3CCBBB84+20240307095755.7130-1-mengyuanlou@net-swift.com/
> 
> ...
> 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next v5 00/10] add sriov support for wangxun NICs
  2024-08-06  9:37   ` mengyuanlou
@ 2024-08-06 15:20     ` Simon Horman
  2024-08-07 10:09       ` mengyuanlou
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Horman @ 2024-08-06 15:20 UTC (permalink / raw)
  To: mengyuanlou@net-swift.com; +Cc: netdev

On Tue, Aug 06, 2024 at 05:37:36PM +0800, mengyuanlou@net-swift.com wrote:
> 
> 
> > 2024年8月6日 00:40,Simon Horman <horms@kernel.org> 写道:
> > 
> > On Sun, Aug 04, 2024 at 08:48:31PM +0800, Mengyuan Lou wrote:
> >> Add sriov_configure for ngbe and txgbe drivers.
> >> Reallocate queue and irq resources when sriov is enabled.
> >> Add wx_msg_task in interrupts handler, which is used to process the
> >> configuration sent by vfs.
> >> Add ping_vf for wx_pf to tell vfs about pf link change.
> >> Make devlink allocation function generic to use it for PF and for VF.
> >> Add PF/VF devlink port creation. It will be used to set/get VFs.
> > 
> > I think it would be good to summarise the overall status of SR-IOV support
> > with this patch, and what follow-up work is planned. As Jakub mentioned [1]
> > this does not seem complete as is.
> > 
> 
> Ok,got it.

Thanks.

Did you get my 2nd point below?
This seems relevant to you:
- https://lore.kernel.org/netdev/20240620002741.1029936-1-kuba@kernel.org/

> 
> > [1] https://lore.kernel.org/netdev/988BFB51-32C8-499C-837D-91CC1C0FFE42@net-swift.com/
> > 
> > I mean, I understand the NDOs were removed from the patchset (see more on
> > that below) but there needs to be a plan to support users of this device
> > in a meaningful way.
> > 
> >> 
> >> v5:
> >> - Add devlink allocation which will be used to add uAPI.
> >> - Remove unused EXPORT_SYMBOL.
> >> - Unify some functions return styles in patch 1 and patch 4.
> >> - Make the code line less than 80 columns.
> >> v4:
> >> https://lore.kernel.org/netdev/3601E5DE87D2BC4F+20240604155850.51983-1-mengyuanlou@net-swift.com/
> >> - Move wx_ping_vf to patch 6.
> >> - Modify return section format in Kernel docs.
> >> v3:
> >> https://lore.kernel.org/netdev/587FAB7876D85676+20240415110225.75132-1-mengyuanlou@net-swift.com/
> >> - Do not accept any new implementations of the old SR-IOV API.
> >> - So remove ndo_vf_xxx in these patches. Switch mode ops will be added
> >> - in vf driver which will be submitted later.
> > 
> > FYI, this policy was recently significantly relaxed [2]:
> > 
> > [2] https://lore.kernel.org/netdev/20240620002741.1029936-1-kuba@kernel.org/
> > 
> >> v2:
> >> https://lore.kernel.org/netdev/EF19E603F7CCA7B9+20240403092714.3027-1-mengyuanlou@net-swift.com/
> >> - Fix some used uninitialised.
> >> - Use poll + yield with delay instead of busy poll of 10 times in
> >> mbx_lock obtain.
> >> - Split msg_task and flow into separate patches.
> >> v1:
> >> https://lore.kernel.org/netdev/DA3033FE3CCBBB84+20240307095755.7130-1-mengyuanlou@net-swift.com/
> > 
> > ...
> > 
> > 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next v5 00/10] add sriov support for wangxun NICs
  2024-08-06 15:20     ` Simon Horman
@ 2024-08-07 10:09       ` mengyuanlou
  0 siblings, 0 replies; 5+ messages in thread
From: mengyuanlou @ 2024-08-07 10:09 UTC (permalink / raw)
  To: Simon Horman; +Cc: netdev



> 2024年8月6日 23:20,Simon Horman <horms@kernel.org> 写道:
> 
> On Tue, Aug 06, 2024 at 05:37:36PM +0800, mengyuanlou@net-swift.com wrote:
>> 
>> 
>>> 2024年8月6日 00:40,Simon Horman <horms@kernel.org> 写道:
>>> 
>>> On Sun, Aug 04, 2024 at 08:48:31PM +0800, Mengyuan Lou wrote:
>>>> Add sriov_configure for ngbe and txgbe drivers.
>>>> Reallocate queue and irq resources when sriov is enabled.
>>>> Add wx_msg_task in interrupts handler, which is used to process the
>>>> configuration sent by vfs.
>>>> Add ping_vf for wx_pf to tell vfs about pf link change.
>>>> Make devlink allocation function generic to use it for PF and for VF.
>>>> Add PF/VF devlink port creation. It will be used to set/get VFs.
>>> 
>>> I think it would be good to summarise the overall status of SR-IOV support
>>> with this patch, and what follow-up work is planned. As Jakub mentioned [1]
>>> this does not seem complete as is.
>>> 
>> 
>> Ok,got it.
> 
> Thanks.
> 
> Did you get my 2nd point below?
> This seems relevant to you:
> - https://lore.kernel.org/netdev/20240620002741.1029936-1-kuba@kernel.org/

Before send v5,I have seen this doc.
So I try to add devlink port apis at v5.  

But looks like it needs to be done in a new way.

> 
>> 
>>> [1] https://lore.kernel.org/netdev/988BFB51-32C8-499C-837D-91CC1C0FFE42@net-swift.com/
>>> 
>>> I mean, I understand the NDOs were removed from the patchset (see more on
>>> that below) but there needs to be a plan to support users of this device
>>> in a meaningful way.
>>> 



>>>> 
>>>> v5:
>>>> - Add devlink allocation which will be used to add uAPI.
>>>> - Remove unused EXPORT_SYMBOL.
>>>> - Unify some functions return styles in patch 1 and patch 4.
>>>> - Make the code line less than 80 columns.
>>>> v4:
>>>> https://lore.kernel.org/netdev/3601E5DE87D2BC4F+20240604155850.51983-1-mengyuanlou@net-swift.com/
>>>> - Move wx_ping_vf to patch 6.
>>>> - Modify return section format in Kernel docs.
>>>> v3:
>>>> https://lore.kernel.org/netdev/587FAB7876D85676+20240415110225.75132-1-mengyuanlou@net-swift.com/
>>>> - Do not accept any new implementations of the old SR-IOV API.
>>>> - So remove ndo_vf_xxx in these patches. Switch mode ops will be added
>>>> - in vf driver which will be submitted later.
>>> 
>>> FYI, this policy was recently significantly relaxed [2]:
>>> 
>>> [2] https://lore.kernel.org/netdev/20240620002741.1029936-1-kuba@kernel.org/
>>> 
>>>> v2:
>>>> https://lore.kernel.org/netdev/EF19E603F7CCA7B9+20240403092714.3027-1-mengyuanlou@net-swift.com/
>>>> - Fix some used uninitialised.
>>>> - Use poll + yield with delay instead of busy poll of 10 times in
>>>> mbx_lock obtain.
>>>> - Split msg_task and flow into separate patches.
>>>> v1:
>>>> https://lore.kernel.org/netdev/DA3033FE3CCBBB84+20240307095755.7130-1-mengyuanlou@net-swift.com/
>>> 
>>> ...
>>> 
>>> 
>> 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-08-07 10:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-04 12:48 [PATCH net-next v5 00/10] add sriov support for wangxun NICs Mengyuan Lou
2024-08-05 16:40 ` Simon Horman
2024-08-06  9:37   ` mengyuanlou
2024-08-06 15:20     ` Simon Horman
2024-08-07 10:09       ` mengyuanlou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).