mbox series

[00/19] MLX5 FreeBSD support

Message ID 20210927133450.10653-1-srikanth.k@oneconvergence.com (mailing list archive)
Headers show
Series MLX5 FreeBSD support | expand

Message

Srikanth Kaka Sept. 27, 2021, 1:34 p.m. UTC
This patch series adds support for MLX5 PMD on FreeBSD

Srikanth Kaka (19):
  common/mlx5: FreeBSD stub
  net/mlx5: FreeBSD stub
  common/mlx5: FreeBSD disabling auxiliary bus support
  net/mlx5: FreeBSD disabling auxiliary bus support
  net/mlx5: Modified PCI probe to work on FreeBSD
  common/mlx5: Define PF_INET socket
  net/mlx5: Use the newly defined INET socket
  common/mlx5: derive PCI addr in FreeBSD
  common/mlx5: get interface name
  net/mlx5: fix socket MAC request
  net/mlx5: removing port representator support
  net/mlx5: Added procedure to detect link state
  net/mlx5: Added placeholder for VLAN vmwa
  net/mlx5: Added stats support
  net/mlx5: making flow control DPDK callback invalid
  net/mlx5: making module DPDK callbacks invalid
  common/mlx5: fixed missing dependency in mlx5_glue.h
  net/mlx5: fixed compilation warnings
  mlx5: Added meson support for FreeBSD

 drivers/common/mlx5/freebsd/meson.build       |  189 ++
 drivers/common/mlx5/freebsd/mlx5_common_os.c  |  387 +++
 drivers/common/mlx5/freebsd/mlx5_common_os.h  |  304 ++
 .../common/mlx5/freebsd/mlx5_common_verbs.c   |   90 +
 drivers/common/mlx5/freebsd/mlx5_glue.c       | 1505 ++++++++++
 drivers/common/mlx5/freebsd/mlx5_glue.h       |  374 +++
 drivers/common/mlx5/freebsd/mlx5_inet.c       |  306 ++
 drivers/common/mlx5/freebsd/mlx5_inet.h       |   75 +
 drivers/common/mlx5/meson.build               |   12 +-
 drivers/net/mlx5/freebsd/meson.build          |   14 +
 drivers/net/mlx5/freebsd/mlx5_ethdev_os.c     | 1187 ++++++++
 drivers/net/mlx5/freebsd/mlx5_flow_os.c       |   38 +
 drivers/net/mlx5/freebsd/mlx5_flow_os.h       |  484 +++
 drivers/net/mlx5/freebsd/mlx5_mp_os.c         |  305 ++
 drivers/net/mlx5/freebsd/mlx5_os.c            | 2600 +++++++++++++++++
 drivers/net/mlx5/freebsd/mlx5_os.h            |   22 +
 drivers/net/mlx5/freebsd/mlx5_socket.c        |  249 ++
 drivers/net/mlx5/freebsd/mlx5_verbs.c         | 1208 ++++++++
 drivers/net/mlx5/freebsd/mlx5_verbs.h         |   18 +
 drivers/net/mlx5/freebsd/mlx5_vlan_os.c       |   84 +
 drivers/net/mlx5/meson.build                  |   14 +-
 21 files changed, 9458 insertions(+), 7 deletions(-)
 create mode 100644 drivers/common/mlx5/freebsd/meson.build
 create mode 100644 drivers/common/mlx5/freebsd/mlx5_common_os.c
 create mode 100644 drivers/common/mlx5/freebsd/mlx5_common_os.h
 create mode 100644 drivers/common/mlx5/freebsd/mlx5_common_verbs.c
 create mode 100644 drivers/common/mlx5/freebsd/mlx5_glue.c
 create mode 100644 drivers/common/mlx5/freebsd/mlx5_glue.h
 create mode 100644 drivers/common/mlx5/freebsd/mlx5_inet.c
 create mode 100644 drivers/common/mlx5/freebsd/mlx5_inet.h
 create mode 100644 drivers/net/mlx5/freebsd/meson.build
 create mode 100644 drivers/net/mlx5/freebsd/mlx5_ethdev_os.c
 create mode 100644 drivers/net/mlx5/freebsd/mlx5_flow_os.c
 create mode 100644 drivers/net/mlx5/freebsd/mlx5_flow_os.h
 create mode 100644 drivers/net/mlx5/freebsd/mlx5_mp_os.c
 create mode 100644 drivers/net/mlx5/freebsd/mlx5_os.c
 create mode 100644 drivers/net/mlx5/freebsd/mlx5_os.h
 create mode 100644 drivers/net/mlx5/freebsd/mlx5_socket.c
 create mode 100644 drivers/net/mlx5/freebsd/mlx5_verbs.c
 create mode 100644 drivers/net/mlx5/freebsd/mlx5_verbs.h
 create mode 100644 drivers/net/mlx5/freebsd/mlx5_vlan_os.c

Comments

Thomas Monjalon Sept. 29, 2021, 12:20 p.m. UTC | #1
27/09/2021 15:34, Srikanth Kaka:
> This patch series adds support for MLX5 PMD on FreeBSD
> 
>  drivers/common/mlx5/freebsd/meson.build       |  189 ++
>  drivers/common/mlx5/freebsd/mlx5_common_os.c  |  387 +++
>  drivers/common/mlx5/freebsd/mlx5_common_os.h  |  304 ++
>  .../common/mlx5/freebsd/mlx5_common_verbs.c   |   90 +
>  drivers/common/mlx5/freebsd/mlx5_glue.c       | 1505 ++++++++++
>  drivers/common/mlx5/freebsd/mlx5_glue.h       |  374 +++
>  drivers/common/mlx5/freebsd/mlx5_inet.c       |  306 ++
>  drivers/common/mlx5/freebsd/mlx5_inet.h       |   75 +
>  drivers/common/mlx5/meson.build               |   12 +-
>  drivers/net/mlx5/freebsd/meson.build          |   14 +
>  drivers/net/mlx5/freebsd/mlx5_ethdev_os.c     | 1187 ++++++++
>  drivers/net/mlx5/freebsd/mlx5_flow_os.c       |   38 +
>  drivers/net/mlx5/freebsd/mlx5_flow_os.h       |  484 +++
>  drivers/net/mlx5/freebsd/mlx5_mp_os.c         |  305 ++
>  drivers/net/mlx5/freebsd/mlx5_os.c            | 2600 +++++++++++++++++
>  drivers/net/mlx5/freebsd/mlx5_os.h            |   22 +
>  drivers/net/mlx5/freebsd/mlx5_socket.c        |  249 ++
>  drivers/net/mlx5/freebsd/mlx5_verbs.c         | 1208 ++++++++
>  drivers/net/mlx5/freebsd/mlx5_verbs.h         |   18 +
>  drivers/net/mlx5/freebsd/mlx5_vlan_os.c       |   84 +
>  drivers/net/mlx5/meson.build                  |   14 +-
>  21 files changed, 9458 insertions(+), 7 deletions(-)
>  create mode 100644 drivers/common/mlx5/freebsd/meson.build
>  create mode 100644 drivers/common/mlx5/freebsd/mlx5_common_os.c
>  create mode 100644 drivers/common/mlx5/freebsd/mlx5_common_os.h
>  create mode 100644 drivers/common/mlx5/freebsd/mlx5_common_verbs.c
>  create mode 100644 drivers/common/mlx5/freebsd/mlx5_glue.c
>  create mode 100644 drivers/common/mlx5/freebsd/mlx5_glue.h
>  create mode 100644 drivers/common/mlx5/freebsd/mlx5_inet.c
>  create mode 100644 drivers/common/mlx5/freebsd/mlx5_inet.h
>  create mode 100644 drivers/net/mlx5/freebsd/meson.build
>  create mode 100644 drivers/net/mlx5/freebsd/mlx5_ethdev_os.c
>  create mode 100644 drivers/net/mlx5/freebsd/mlx5_flow_os.c
>  create mode 100644 drivers/net/mlx5/freebsd/mlx5_flow_os.h
>  create mode 100644 drivers/net/mlx5/freebsd/mlx5_mp_os.c
>  create mode 100644 drivers/net/mlx5/freebsd/mlx5_os.c
>  create mode 100644 drivers/net/mlx5/freebsd/mlx5_os.h
>  create mode 100644 drivers/net/mlx5/freebsd/mlx5_socket.c
>  create mode 100644 drivers/net/mlx5/freebsd/mlx5_verbs.c
>  create mode 100644 drivers/net/mlx5/freebsd/mlx5_verbs.h
>  create mode 100644 drivers/net/mlx5/freebsd/mlx5_vlan_os.c

That's a lot of new code, thanks for the effort.
Please could you summarize which features are supported,
what are the dependencies, and how is it tested?
Srikanth Kaka Sept. 29, 2021, 3:56 p.m. UTC | #2
Hi Thomas,

PFA the test report. It covers all the features that were tested across
various platforms.

The features mentioned in the test report depend on a modified FreeBSD
OFED. There is an ongoing review of these changes by the FreeBSD community.
https://reviews.freebsd.org/p/vag.singh_oneconvergence.com/

Regards,
Srikanth


On Wed, Sep 29, 2021 at 5:50 PM Thomas Monjalon <thomas@monjalon.net> wrote:

> 27/09/2021 15:34, Srikanth Kaka:
> > This patch series adds support for MLX5 PMD on FreeBSD
> >
> >  drivers/common/mlx5/freebsd/meson.build       |  189 ++
> >  drivers/common/mlx5/freebsd/mlx5_common_os.c  |  387 +++
> >  drivers/common/mlx5/freebsd/mlx5_common_os.h  |  304 ++
> >  .../common/mlx5/freebsd/mlx5_common_verbs.c   |   90 +
> >  drivers/common/mlx5/freebsd/mlx5_glue.c       | 1505 ++++++++++
> >  drivers/common/mlx5/freebsd/mlx5_glue.h       |  374 +++
> >  drivers/common/mlx5/freebsd/mlx5_inet.c       |  306 ++
> >  drivers/common/mlx5/freebsd/mlx5_inet.h       |   75 +
> >  drivers/common/mlx5/meson.build               |   12 +-
> >  drivers/net/mlx5/freebsd/meson.build          |   14 +
> >  drivers/net/mlx5/freebsd/mlx5_ethdev_os.c     | 1187 ++++++++
> >  drivers/net/mlx5/freebsd/mlx5_flow_os.c       |   38 +
> >  drivers/net/mlx5/freebsd/mlx5_flow_os.h       |  484 +++
> >  drivers/net/mlx5/freebsd/mlx5_mp_os.c         |  305 ++
> >  drivers/net/mlx5/freebsd/mlx5_os.c            | 2600 +++++++++++++++++
> >  drivers/net/mlx5/freebsd/mlx5_os.h            |   22 +
> >  drivers/net/mlx5/freebsd/mlx5_socket.c        |  249 ++
> >  drivers/net/mlx5/freebsd/mlx5_verbs.c         | 1208 ++++++++
> >  drivers/net/mlx5/freebsd/mlx5_verbs.h         |   18 +
> >  drivers/net/mlx5/freebsd/mlx5_vlan_os.c       |   84 +
> >  drivers/net/mlx5/meson.build                  |   14 +-
> >  21 files changed, 9458 insertions(+), 7 deletions(-)
> >  create mode 100644 drivers/common/mlx5/freebsd/meson.build
> >  create mode 100644 drivers/common/mlx5/freebsd/mlx5_common_os.c
> >  create mode 100644 drivers/common/mlx5/freebsd/mlx5_common_os.h
> >  create mode 100644 drivers/common/mlx5/freebsd/mlx5_common_verbs.c
> >  create mode 100644 drivers/common/mlx5/freebsd/mlx5_glue.c
> >  create mode 100644 drivers/common/mlx5/freebsd/mlx5_glue.h
> >  create mode 100644 drivers/common/mlx5/freebsd/mlx5_inet.c
> >  create mode 100644 drivers/common/mlx5/freebsd/mlx5_inet.h
> >  create mode 100644 drivers/net/mlx5/freebsd/meson.build
> >  create mode 100644 drivers/net/mlx5/freebsd/mlx5_ethdev_os.c
> >  create mode 100644 drivers/net/mlx5/freebsd/mlx5_flow_os.c
> >  create mode 100644 drivers/net/mlx5/freebsd/mlx5_flow_os.h
> >  create mode 100644 drivers/net/mlx5/freebsd/mlx5_mp_os.c
> >  create mode 100644 drivers/net/mlx5/freebsd/mlx5_os.c
> >  create mode 100644 drivers/net/mlx5/freebsd/mlx5_os.h
> >  create mode 100644 drivers/net/mlx5/freebsd/mlx5_socket.c
> >  create mode 100644 drivers/net/mlx5/freebsd/mlx5_verbs.c
> >  create mode 100644 drivers/net/mlx5/freebsd/mlx5_verbs.h
> >  create mode 100644 drivers/net/mlx5/freebsd/mlx5_vlan_os.c
>
> That's a lot of new code, thanks for the effort.
> Please could you summarize which features are supported,
> what are the dependencies, and how is it tested?
>
>
>
Thomas Monjalon Sept. 29, 2021, 4:20 p.m. UTC | #3
29/09/2021 17:56, Srikanth K:
> Hi Thomas,
> 
> PFA the test report. It covers all the features that were tested across
> various platforms.
> 
> The features mentioned in the test report depend on a modified FreeBSD
> OFED. There is an ongoing review of these changes by the FreeBSD community.
> https://reviews.freebsd.org/p/vag.singh_oneconvergence.com/

OK, this dependency is very important to notify in this patchset.
For next version, please add it in the cover letter.

The supported features (MTU, MAC, VLAN, RSS, fragments, jumbo, stats
and trust mode) should be listed in the cover letter as well as
in the mlx5 documentation. Please follow what was done for Windows.

About the patches organization, please do not fix or remove something
which was added in a previous patch. You need to have logical steps
done in each patch without going backward.
Please start with enabling compilation in first patch,
so each step can be tested.

Thanks
Srikanth Kaka Sept. 30, 2021, 4:27 p.m. UTC | #4
Sure, I will follow the Windows support approach.

Regarding the patches organization, they were arranged logically to the
best of my knowledge.
The approach followed is to take Linux PMD code and replace the Linux
dependent part with the
FreeBSD compatible code. All the removals are of this Linux dependent code.
For the same reason,
FreeBSD meson support is added in the last patch or otherwise Linux code
would break compilation
in FreeBSD.

The patches status is still "New" on the DPDK site, please let me know when
I can submit the next version.

Regards,
Srikanth


On Wed, Sep 29, 2021 at 9:50 PM Thomas Monjalon <thomas@monjalon.net> wrote:

> 29/09/2021 17:56, Srikanth K:
> > Hi Thomas,
> >
> > PFA the test report. It covers all the features that were tested across
> > various platforms.
> >
> > The features mentioned in the test report depend on a modified FreeBSD
> > OFED. There is an ongoing review of these changes by the FreeBSD
> community.
> > https://reviews.freebsd.org/p/vag.singh_oneconvergence.com/
>
> OK, this dependency is very important to notify in this patchset.
> For next version, please add it in the cover letter.
>
> The supported features (MTU, MAC, VLAN, RSS, fragments, jumbo, stats
> and trust mode) should be listed in the cover letter as well as
> in the mlx5 documentation. Please follow what was done for Windows.
>
> About the patches organization, please do not fix or remove something
> which was added in a previous patch. You need to have logical steps
> done in each patch without going backward.
> Please start with enabling compilation in first patch,
> so each step can be tested.
>
> Thanks
>
>
>
Thomas Monjalon Sept. 30, 2021, 4:55 p.m. UTC | #5
30/09/2021 18:27, Srikanth K:
> Sure, I will follow the Windows support approach.
> 
> Regarding the patches organization, they were arranged logically to the
> best of my knowledge.

It is not.

> The approach followed is to take Linux PMD code and replace the Linux
> dependent part with the
> FreeBSD compatible code. All the removals are of this Linux dependent code.

The removals are in the directory drivers/net/mlx5/freebsd/
That's simple: don't add code that you remove later.

> For the same reason,
> FreeBSD meson support is added in the last patch or otherwise Linux code
> would break compilation
> in FreeBSD.

Simple: add only code which compiles.

> The patches status is still "New" on the DPDK site, please let me know when
> I can submit the next version.

You can submit new versions and mark old ones as superseded.
The full process is described in the contributing guide,
please read it carefully.


> On Wed, Sep 29, 2021 at 9:50 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> 
> > 29/09/2021 17:56, Srikanth K:
> > > Hi Thomas,
> > >
> > > PFA the test report. It covers all the features that were tested across
> > > various platforms.
> > >
> > > The features mentioned in the test report depend on a modified FreeBSD
> > > OFED. There is an ongoing review of these changes by the FreeBSD
> > community.
> > > https://reviews.freebsd.org/p/vag.singh_oneconvergence.com/
> >
> > OK, this dependency is very important to notify in this patchset.
> > For next version, please add it in the cover letter.
> >
> > The supported features (MTU, MAC, VLAN, RSS, fragments, jumbo, stats
> > and trust mode) should be listed in the cover letter as well as
> > in the mlx5 documentation. Please follow what was done for Windows.
> >
> > About the patches organization, please do not fix or remove something
> > which was added in a previous patch. You need to have logical steps
> > done in each patch without going backward.
> > Please start with enabling compilation in first patch,
> > so each step can be tested.
> >
> > Thanks
> >
> >
> >
>
Srikanth Kaka Oct. 1, 2021, 11:35 a.m. UTC | #6
Got it, thanks for the clarification.

Regards,
Srikanth


On Thu, Sep 30, 2021 at 10:25 PM Thomas Monjalon <thomas@monjalon.net>
wrote:

> 30/09/2021 18:27, Srikanth K:
> > Sure, I will follow the Windows support approach.
> >
> > Regarding the patches organization, they were arranged logically to the
> > best of my knowledge.
>
> It is not.
>
> > The approach followed is to take Linux PMD code and replace the Linux
> > dependent part with the
> > FreeBSD compatible code. All the removals are of this Linux dependent
> code.
>
> The removals are in the directory drivers/net/mlx5/freebsd/
> That's simple: don't add code that you remove later.
>
> > For the same reason,
> > FreeBSD meson support is added in the last patch or otherwise Linux code
> > would break compilation
> > in FreeBSD.
>
> Simple: add only code which compiles.
>
> > The patches status is still "New" on the DPDK site, please let me know
> when
> > I can submit the next version.
>
> You can submit new versions and mark old ones as superseded.
> The full process is described in the contributing guide,
> please read it carefully.
>
>
> > On Wed, Sep 29, 2021 at 9:50 PM Thomas Monjalon <thomas@monjalon.net>
> wrote:
> >
> > > 29/09/2021 17:56, Srikanth K:
> > > > Hi Thomas,
> > > >
> > > > PFA the test report. It covers all the features that were tested
> across
> > > > various platforms.
> > > >
> > > > The features mentioned in the test report depend on a modified
> FreeBSD
> > > > OFED. There is an ongoing review of these changes by the FreeBSD
> > > community.
> > > > https://reviews.freebsd.org/p/vag.singh_oneconvergence.com/
> > >
> > > OK, this dependency is very important to notify in this patchset.
> > > For next version, please add it in the cover letter.
> > >
> > > The supported features (MTU, MAC, VLAN, RSS, fragments, jumbo, stats
> > > and trust mode) should be listed in the cover letter as well as
> > > in the mlx5 documentation. Please follow what was done for Windows.
> > >
> > > About the patches organization, please do not fix or remove something
> > > which was added in a previous patch. You need to have logical steps
> > > done in each patch without going backward.
> > > Please start with enabling compilation in first patch,
> > > so each step can be tested.
> > >
> > > Thanks
> > >
> > >
> > >
> >
>
>
>
>
>
>