mbox series

[v2,00/17] Add advanced features for Huawei hinic pmd

Message ID cover.1569421286.git.cloud.wangxiaoyun@huawei.com (mailing list archive)
Headers
Series Add advanced features for Huawei hinic pmd |

Message

Wangxiaoyun (Cloud) Sept. 25, 2019, 2:26 p.m. UTC
  This patch set adds advanced features for Huawei hinic pmd,
such as VLAN filter and VLAN offload, SR-IOV, FW version get,
set link down and up, Flow director for LACP, VRRP, BGP and so on.

Xiaoyun wang (17):
  net/hinic/base: add mbox command channel for SRIOV
  net/hinic/base: add HW interfaces for SRIOV
  net/hinic: add VF PMD operation interfaces
  net/hinic: add VLAN filter and offload
  net/hinic: add allmulticast mode and MTU set
  net/hinic: add unicast and multicast MAC set
  net/hinic: add fdir config interface
  net/hinic: add fdir validate flow operations
  net/hinic: create and destroy ntuple filter
  net/hinic: create and destroy fdir filter
  net/hinic: flush fdir filter
  net/hinic: set link down and up
  net/hinic: support inner L3 checksum offload
  net/hinic: support LRO offload
  net/hinic: add hinic PMD doc files
  net/hinic/base: optimize aeq interfaces
  net/hinic: optimize tx&rx performance

 doc/guides/nics/features/hinic.ini         |   12 +-
 doc/guides/nics/hinic.rst                  |    6 +
 doc/guides/rel_notes/release_19_11.rst     |   45 +-
 drivers/net/hinic/Makefile                 |    2 +
 drivers/net/hinic/base/hinic_compat.h      |   62 +-
 drivers/net/hinic/base/hinic_csr.h         |   29 +-
 drivers/net/hinic/base/hinic_pmd_api_cmd.c |   60 +-
 drivers/net/hinic/base/hinic_pmd_cfg.c     |   35 +
 drivers/net/hinic/base/hinic_pmd_cmd.h     |   26 +-
 drivers/net/hinic/base/hinic_pmd_eqs.c     |  245 +--
 drivers/net/hinic/base/hinic_pmd_eqs.h     |    5 +-
 drivers/net/hinic/base/hinic_pmd_hwdev.c   |  198 ++-
 drivers/net/hinic/base/hinic_pmd_hwdev.h   |    9 +-
 drivers/net/hinic/base/hinic_pmd_hwif.c    |   85 +-
 drivers/net/hinic/base/hinic_pmd_hwif.h    |   15 +-
 drivers/net/hinic/base/hinic_pmd_mbox.c    |  938 +++++++++++
 drivers/net/hinic/base/hinic_pmd_mbox.h    |   93 ++
 drivers/net/hinic/base/hinic_pmd_mgmt.c    |   83 +-
 drivers/net/hinic/base/hinic_pmd_mgmt.h    |    2 +-
 drivers/net/hinic/base/hinic_pmd_niccfg.c  |  777 ++++++++-
 drivers/net/hinic/base/hinic_pmd_niccfg.h  |  203 +++
 drivers/net/hinic/base/hinic_pmd_nicio.c   |   15 +-
 drivers/net/hinic/base/hinic_pmd_nicio.h   |    3 +-
 drivers/net/hinic/base/meson.build         |    1 +
 drivers/net/hinic/hinic_pmd_ethdev.c       |  992 ++++++++++--
 drivers/net/hinic/hinic_pmd_ethdev.h       |  139 +-
 drivers/net/hinic/hinic_pmd_flow.c         | 2385 ++++++++++++++++++++++++++++
 drivers/net/hinic/hinic_pmd_rx.c           |   27 +-
 drivers/net/hinic/hinic_pmd_rx.h           |   11 +
 drivers/net/hinic/hinic_pmd_tx.c           |  190 ++-
 drivers/net/hinic/meson.build              |    1 +
 31 files changed, 6029 insertions(+), 665 deletions(-)
 create mode 100644 drivers/net/hinic/base/hinic_pmd_mbox.c
 create mode 100644 drivers/net/hinic/base/hinic_pmd_mbox.h
 create mode 100644 drivers/net/hinic/hinic_pmd_flow.c
  

Comments

Ferruh Yigit Sept. 26, 2019, 6:51 p.m. UTC | #1
On 9/25/2019 3:30 PM, Xiaoyun wang wrote:
> Add doc files about new features and modification.
> 
> Signed-off-by: Xiaoyun wang <cloud.wangxiaoyun@huawei.com>
> ---
>  doc/guides/nics/features/hinic.ini     | 12 ++++++++-
>  doc/guides/nics/hinic.rst              |  6 +++++
>  doc/guides/rel_notes/release_19_11.rst | 45 ++++++----------------------------
>  3 files changed, 25 insertions(+), 38 deletions(-)
> 
> diff --git a/doc/guides/nics/features/hinic.ini b/doc/guides/nics/features/hinic.ini
> index fe063d6..dc02b4b 100644
> --- a/doc/guides/nics/features/hinic.ini
> +++ b/doc/guides/nics/features/hinic.ini
> @@ -9,16 +9,22 @@ Link status          = Y
>  Link status event    = Y
>  Free Tx mbuf on demand = Y
>  Queue start/stop     = Y
> -Jumbo frame          = N
> +MTU update           = Y
> +Jumbo frame          = Y
>  Scattered Rx         = Y
>  TSO                  = Y
> +LRO                  = Y
>  Promiscuous mode     = Y
> +Allmulticast mode    = Y
>  Unicast MAC filter   = Y
>  Multicast MAC filter = Y
>  RSS hash             = Y
>  RSS key update       = Y
>  RSS reta update      = Y
>  Inner RSS            = Y
> +SR-IOV               = Y
> +VLAN filter          = Y
> +VLAN offload         = Y
>  CRC offload          = Y
>  L3 checksum offload  = Y
>  L4 checksum offload  = Y
> @@ -27,6 +33,10 @@ Inner L4 checksum    = Y
>  Basic stats          = Y
>  Extended stats       = Y
>  Stats per queue      = Y
> +Flow director        = Y
> +Flow control         = Y
> +FW version           = Y
> +Multiprocess aware   = Y
>  Linux UIO            = Y
>  Linux VFIO           = Y
>  BSD nic_uio          = N
> diff --git a/doc/guides/nics/hinic.rst b/doc/guides/nics/hinic.rst
> index c9329bc..f036fc5 100644
> --- a/doc/guides/nics/hinic.rst
> +++ b/doc/guides/nics/hinic.rst
> @@ -24,6 +24,12 @@ Features
>  - Link state information
>  - Link flow control
>  - Scattered and gather for TX and RX
> +- SR�CIOV - Partially supported at this point, VFIO only

Can you fix the char is SR-IOV?

> +- Allmulticast mode
> +- Unicast MAC filter
> +- Multicast MAC filter
> +- FW version
> +- Flow director
>  
>  Prerequisites
>  -------------
> diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
> index 65361c4..6c6f27f 100644
> --- a/doc/guides/rel_notes/release_19_11.rst
> +++ b/doc/guides/rel_notes/release_19_11.rst
> @@ -56,11 +56,15 @@ New Features
>       Also, make sure to start the actual text at the margin.
>       =========================================================
>  
> -* **Updated the Intel ice driver.**
> +* **Updated the Huawei hinic driver.**
>  
> -  Updated the Intel ice driver with new features and improvements, including:
> +  Updated the Huawei hinic driver with new features and improvements, including:
>  
> -  * Added support for device-specific DDP package loading.
> +  * Enabled SR-IOV - Partially supported at this point, VFIO only.
> +  * Supported VLAN filter and VLAN offload.
> +  * Supported Unicast MAC filter and Multicast MAC filter.
> +  * Supported FW version get.
> +  * Supported Flow director for LACP, VRRP, BGP and so on.


Can you please distribute the doc patches in to the related patches that
introduces the feature, for all three document, it helps by documenting what has
been added in the patch.

>  
>  Removed Items
>  -------------
> @@ -99,30 +103,6 @@ API Changes
>     Also, make sure to start the actual text at the margin.
>     =========================================================
>  
> -* ethdev: changed ``rte_eth_dev_infos_get`` return value from ``void`` to
> -  ``int`` to provide a way to report various error conditions.
> -
> -* ethdev: changed ``rte_eth_promiscuous_enable`` and
> -  ``rte_eth_promiscuous_disable`` return value from ``void`` to ``int`` to
> -  provide a way to report various error conditions.
> -
> -* ethdev: changed ``rte_eth_allmulticast_enable`` and
> -  ``rte_eth_allmulticast_disable`` return value from ``void`` to ``int`` to
> -  provide a way to report various error conditions.
> -
> -* ethdev: changed ``rte_eth_dev_xstats_reset`` return value from ``void`` to
> -  ``int`` to provide a way to report various error conditions.
> -
> -* ethdev: changed ``rte_eth_link_get`` and ``rte_eth_link_get_nowait``
> -  return value from ``void`` to ``int`` to provide a way to report various
> -  error conditions.
> -
> -* ethdev: changed ``rte_eth_macaddr_get`` return value from ``void`` to
> -  ``int`` to provide a way to report various error conditions.
> -
> -* ethdev: changed ``rte_eth_dev_owner_delete`` return value from ``void`` to
> -  ``int`` to provide a way to report various error conditions.
> -
>  
>  ABI Changes
>  -----------
> @@ -174,7 +154,7 @@ The libraries prepended with a plus sign were incremented in this version.
>       librte_distributor.so.1
>       librte_eal.so.11
>       librte_efd.so.1
> -   + librte_ethdev.so.13
> +     librte_ethdev.so.12
>       librte_eventdev.so.7
>       librte_flow_classify.so.1
>       librte_gro.so.1
> @@ -252,12 +232,3 @@ Tested Platforms
>     Also, make sure to start the actual text at the margin.
>     =========================================================
>  
> -* **Updated Mellanox mlx5 driver.**
> -
> -  Updated Mellanox mlx5 driver with new features and improvements, including:
> -
> -  * Added support for VLAN pop flow offload command.
> -  * Added support for VLAN push flow offload command.
> -  * Added support for VLAN set PCP offload command.
> -  * Added support for VLAN set VID offload command.
> -
> 

I guess above changes are git mistake, please check in next version.
  
Ferruh Yigit Sept. 26, 2019, 6:51 p.m. UTC | #2
On 9/25/2019 3:30 PM, Xiaoyun wang wrote:
> This patch set adds advanced features for Huawei hinic pmd,
> such as VLAN filter and VLAN offload, SR-IOV, FW version get,
> set link down and up, Flow director for LACP, VRRP, BGP and so on.
> 
> Xiaoyun wang (17):
>   net/hinic/base: add mbox command channel for SRIOV
>   net/hinic/base: add HW interfaces for SRIOV
>   net/hinic: add VF PMD operation interfaces
>   net/hinic: add VLAN filter and offload
>   net/hinic: add allmulticast mode and MTU set
>   net/hinic: add unicast and multicast MAC set
>   net/hinic: add fdir config interface
>   net/hinic: add fdir validate flow operations
>   net/hinic: create and destroy ntuple filter
>   net/hinic: create and destroy fdir filter
>   net/hinic: flush fdir filter
>   net/hinic: set link down and up
>   net/hinic: support inner L3 checksum offload
>   net/hinic: support LRO offload
>   net/hinic: add hinic PMD doc files
>   net/hinic/base: optimize aeq interfaces
>   net/hinic: optimize tx&rx performance

Hi Xiaoyun,

Overall patchset lgtm, only there are a few minor comments, also can you please
send a new version on top of latest next-net because of the ethdev API updates?

Thanks,
ferruh
  
Wangxiaoyun (Cloud) Sept. 30, 2019, 2:15 p.m. UTC | #3
Hi Ferruh,
     Thanks for your comments. I send to you a new patch V3 with the following review comments fixed.
     1) I have fixed SR-IOV with unix style;
     2) I splited the hinic.ini and hinic.rst into releated feature patches;
     3) I have updated the release_19_11.rst with next version.

Best regards
Xiaoyun Wang

在 2019/9/27 2:51, Ferruh Yigit 写道:
> On 9/25/2019 3:30 PM, Xiaoyun wang wrote:
>> Add doc files about new features and modification.
>>
>> Signed-off-by: Xiaoyun wang <cloud.wangxiaoyun@huawei.com>
>> ---
>>   doc/guides/nics/features/hinic.ini     | 12 ++++++++-
>>   doc/guides/nics/hinic.rst              |  6 +++++
>>   doc/guides/rel_notes/release_19_11.rst | 45 ++++++----------------------------
>>   3 files changed, 25 insertions(+), 38 deletions(-)
>>
>> diff --git a/doc/guides/nics/features/hinic.ini b/doc/guides/nics/features/hinic.ini
>> index fe063d6..dc02b4b 100644
>> --- a/doc/guides/nics/features/hinic.ini
>> +++ b/doc/guides/nics/features/hinic.ini
>> @@ -9,16 +9,22 @@ Link status          = Y
>>   Link status event    = Y
>>   Free Tx mbuf on demand = Y
>>   Queue start/stop     = Y
>> -Jumbo frame          = N
>> +MTU update           = Y
>> +Jumbo frame          = Y
>>   Scattered Rx         = Y
>>   TSO                  = Y
>> +LRO                  = Y
>>   Promiscuous mode     = Y
>> +Allmulticast mode    = Y
>>   Unicast MAC filter   = Y
>>   Multicast MAC filter = Y
>>   RSS hash             = Y
>>   RSS key update       = Y
>>   RSS reta update      = Y
>>   Inner RSS            = Y
>> +SR-IOV               = Y
>> +VLAN filter          = Y
>> +VLAN offload         = Y
>>   CRC offload          = Y
>>   L3 checksum offload  = Y
>>   L4 checksum offload  = Y
>> @@ -27,6 +33,10 @@ Inner L4 checksum    = Y
>>   Basic stats          = Y
>>   Extended stats       = Y
>>   Stats per queue      = Y
>> +Flow director        = Y
>> +Flow control         = Y
>> +FW version           = Y
>> +Multiprocess aware   = Y
>>   Linux UIO            = Y
>>   Linux VFIO           = Y
>>   BSD nic_uio          = N
>> diff --git a/doc/guides/nics/hinic.rst b/doc/guides/nics/hinic.rst
>> index c9329bc..f036fc5 100644
>> --- a/doc/guides/nics/hinic.rst
>> +++ b/doc/guides/nics/hinic.rst
>> @@ -24,6 +24,12 @@ Features
>>   - Link state information
>>   - Link flow control
>>   - Scattered and gather for TX and RX
>> +- SR�CIOV - Partially supported at this point, VFIO only
> Can you fix the char is SR-IOV?
>
>> +- Allmulticast mode
>> +- Unicast MAC filter
>> +- Multicast MAC filter
>> +- FW version
>> +- Flow director
>>   
>>   Prerequisites
>>   -------------
>> diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
>> index 65361c4..6c6f27f 100644
>> --- a/doc/guides/rel_notes/release_19_11.rst
>> +++ b/doc/guides/rel_notes/release_19_11.rst
>> @@ -56,11 +56,15 @@ New Features
>>        Also, make sure to start the actual text at the margin.
>>        =========================================================
>>   
>> -* **Updated the Intel ice driver.**
>> +* **Updated the Huawei hinic driver.**
>>   
>> -  Updated the Intel ice driver with new features and improvements, including:
>> +  Updated the Huawei hinic driver with new features and improvements, including:
>>   
>> -  * Added support for device-specific DDP package loading.
>> +  * Enabled SR-IOV - Partially supported at this point, VFIO only.
>> +  * Supported VLAN filter and VLAN offload.
>> +  * Supported Unicast MAC filter and Multicast MAC filter.
>> +  * Supported FW version get.
>> +  * Supported Flow director for LACP, VRRP, BGP and so on.
>
> Can you please distribute the doc patches in to the related patches that
> introduces the feature, for all three document, it helps by documenting what has
> been added in the patch.
>
>>   
>>   Removed Items
>>   -------------
>> @@ -99,30 +103,6 @@ API Changes
>>      Also, make sure to start the actual text at the margin.
>>      =========================================================
>>   
>> -* ethdev: changed ``rte_eth_dev_infos_get`` return value from ``void`` to
>> -  ``int`` to provide a way to report various error conditions.
>> -
>> -* ethdev: changed ``rte_eth_promiscuous_enable`` and
>> -  ``rte_eth_promiscuous_disable`` return value from ``void`` to ``int`` to
>> -  provide a way to report various error conditions.
>> -
>> -* ethdev: changed ``rte_eth_allmulticast_enable`` and
>> -  ``rte_eth_allmulticast_disable`` return value from ``void`` to ``int`` to
>> -  provide a way to report various error conditions.
>> -
>> -* ethdev: changed ``rte_eth_dev_xstats_reset`` return value from ``void`` to
>> -  ``int`` to provide a way to report various error conditions.
>> -
>> -* ethdev: changed ``rte_eth_link_get`` and ``rte_eth_link_get_nowait``
>> -  return value from ``void`` to ``int`` to provide a way to report various
>> -  error conditions.
>> -
>> -* ethdev: changed ``rte_eth_macaddr_get`` return value from ``void`` to
>> -  ``int`` to provide a way to report various error conditions.
>> -
>> -* ethdev: changed ``rte_eth_dev_owner_delete`` return value from ``void`` to
>> -  ``int`` to provide a way to report various error conditions.
>> -
>>   
>>   ABI Changes
>>   -----------
>> @@ -174,7 +154,7 @@ The libraries prepended with a plus sign were incremented in this version.
>>        librte_distributor.so.1
>>        librte_eal.so.11
>>        librte_efd.so.1
>> -   + librte_ethdev.so.13
>> +     librte_ethdev.so.12
>>        librte_eventdev.so.7
>>        librte_flow_classify.so.1
>>        librte_gro.so.1
>> @@ -252,12 +232,3 @@ Tested Platforms
>>      Also, make sure to start the actual text at the margin.
>>      =========================================================
>>   
>> -* **Updated Mellanox mlx5 driver.**
>> -
>> -  Updated Mellanox mlx5 driver with new features and improvements, including:
>> -
>> -  * Added support for VLAN pop flow offload command.
>> -  * Added support for VLAN push flow offload command.
>> -  * Added support for VLAN set PCP offload command.
>> -  * Added support for VLAN set VID offload command.
>> -
>>
> I guess above changes are git mistake, please check in next version.
>
> .
  
Wangxiaoyun (Cloud) Sept. 30, 2019, 2:19 p.m. UTC | #4
Hi Ferruh,
     Thanks for your comments, I have sent a new patch V3 with new API changes, and add comments
for every patch version, which is show in cover-letter patch, please check it.

Best regards
Xiaoyun Wang

在 2019/9/27 2:51, Ferruh Yigit 写道:
> On 9/25/2019 3:30 PM, Xiaoyun wang wrote:
>> This patch set adds advanced features for Huawei hinic pmd,
>> such as VLAN filter and VLAN offload, SR-IOV, FW version get,
>> set link down and up, Flow director for LACP, VRRP, BGP and so on.
>>
>> Xiaoyun wang (17):
>>    net/hinic/base: add mbox command channel for SRIOV
>>    net/hinic/base: add HW interfaces for SRIOV
>>    net/hinic: add VF PMD operation interfaces
>>    net/hinic: add VLAN filter and offload
>>    net/hinic: add allmulticast mode and MTU set
>>    net/hinic: add unicast and multicast MAC set
>>    net/hinic: add fdir config interface
>>    net/hinic: add fdir validate flow operations
>>    net/hinic: create and destroy ntuple filter
>>    net/hinic: create and destroy fdir filter
>>    net/hinic: flush fdir filter
>>    net/hinic: set link down and up
>>    net/hinic: support inner L3 checksum offload
>>    net/hinic: support LRO offload
>>    net/hinic: add hinic PMD doc files
>>    net/hinic/base: optimize aeq interfaces
>>    net/hinic: optimize tx&rx performance
> Hi Xiaoyun,
>
> Overall patchset lgtm, only there are a few minor comments, also can you please
> send a new version on top of latest next-net because of the ethdev API updates?
>
> Thanks,
> ferruh
>