Hi Xiaojun,

Best Regards,
Xiao

> -----Original Message-----
> From: Xiaojun Liu <[email protected]>
> Sent: Friday, February 28, 2020 4:38 PM
> To: Wang, Xiao W <[email protected]>; Zhang, Qi Z
> <[email protected]>; Kwan, Ngai-mint <[email protected]>; Keller,
> Jacob E <[email protected]>
> Cc: [email protected]; Xiaojun Liu <[email protected]>
> Subject: [PATCH v1 5/5] net/fm10k: add switch management support
> 
> Split dev init to 2 parts.
> First only register the port in switch
> management; second init hook will be
> called after all the pf are registered
> and switch initialization. It will finish
> dev init. Also add switch interrupt support.
> Add fm10k_mirror_rule_set/fm10k_mirror_rule_reset
> to support mirror operation. Add fm10k_dev_filter_ctrl
> to support flow operation.
> Add dpdk port and pf mapping, so
> the dpdk port can map to a specific pf
> and 1 dpdk port can map to 2 pf to get
> total 100G throughput.
> 
> To enable the switch management, you need add
> CONFIG_RTE_FM10K_MANAGEMENT=y in
> config/common_linux when building.
> 
> Signed-off-by: Xiaojun Liu <[email protected]>
> ---
>  drivers/net/fm10k/base/fm10k_type.h     |   1 +
>  drivers/net/fm10k/fm10k_ethdev.c        | 562
> +++++++++++++++++++++++++++++---
>  drivers/net/fm10k/switch/fm10k_switch.c |  20 +-
>  drivers/net/fm10k/switch/fm10k_switch.h |   1 +
>  4 files changed, 541 insertions(+), 43 deletions(-)
> 
> diff --git a/drivers/net/fm10k/base/fm10k_type.h
> b/drivers/net/fm10k/base/fm10k_type.h
> index 84781ba..810e5ee 100644
> --- a/drivers/net/fm10k/base/fm10k_type.h
> +++ b/drivers/net/fm10k/base/fm10k_type.h
> @@ -717,6 +717,7 @@ struct fm10k_hw {
>       u16 subsystem_vendor_id;
>       u8 revision_id;
>       u32 flags;
> +     bool switch_ready;
>  #define FM10K_HW_FLAG_CLOCK_OWNER    BIT(0)
>  };
> 
> diff --git a/drivers/net/fm10k/fm10k_ethdev.c
> b/drivers/net/fm10k/fm10k_ethdev.c
> index 581c690..f11fa53 100644
> --- a/drivers/net/fm10k/fm10k_ethdev.c
> +++ b/drivers/net/fm10k/fm10k_ethdev.c
> @@ -13,6 +13,10 @@
> 
>  #include "fm10k.h"
>  #include "base/fm10k_api.h"
> +#ifdef RTE_FM10K_MANAGEMENT
> +#include "switch/fm10k_regs.h"
> +#include "switch/fm10k_switch.h"
> +#endif
> 
>  /* Default delay to acquire mailbox lock */
>  #define FM10K_MBXLOCK_DELAY_US 20
> @@ -461,9 +465,6 @@ struct fm10k_xstats_name_off {
> 
>       PMD_INIT_FUNC_TRACE();
> 
> -     if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
> -             dev->data->dev_conf.rxmode.offloads |=
> DEV_RX_OFFLOAD_RSS_HASH;
> -

Why delete this? Will it break the existing usage?

>       /* multipe queue mode checking */
>       ret  = fm10k_check_mq_mode(dev);
>       if (ret != 0) {
[...]

Reply via email to