[dpdk-dev] [PATCH v6] net/ixgbe: fix macsec setting

Zhao1, Wei wei.zhao1 at intel.com
Mon May 18 04:56:25 CEST 2020


Hi, Guinian

> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Sun GuinanX
> Sent: Thursday, October 31, 2019 7:32 PM
> To: dev at dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu at intel.com>; Yang, Qiming
> <qiming.yang at intel.com>; Sun, GuinanX <guinanx.sun at intel.com>;
> stable at dpdk.org
> Subject: [dpdk-dev] [PATCH v6] net/ixgbe: fix macsec setting
> 
> macsec setting is not valid when port is stopped.
> In order to make it valid, the patch changes the setting to where port is
> started.
> 
> Fixes: 597f9fafe13b ("app/testpmd: convert to new Tx offloads API")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Sun GuinanX <guinanx.sun at intel.com>
> 19 ++++  drivers/net/ixgbe/rte_pmd_ixgbe.c | 125 ++-----------------------
>  3 files changed, 175 insertions(+), 118 deletions(-)
> 
> diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.c
> b/drivers/net/ixgbe/rte_pmd_ixgbe.c
> index 9514f2cf5..073fe1e23 100644
> --- a/drivers/net/ixgbe/rte_pmd_ixgbe.c
> +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.c
> @@ -515,82 +515,19 @@ rte_pmd_ixgbe_set_vf_rate_limit(uint16_t port,
> uint16_t vf,  int  rte_pmd_ixgbe_macsec_enable(uint16_t port, uint8_t en,
> uint8_t rp)  {
> -	struct ixgbe_hw *hw;
>  	struct rte_eth_dev *dev;
> -	uint32_t ctrl;
> +	struct ixgbe_macsec_setting macsec_setting;
> 
>  	RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
> 
>  	dev = &rte_eth_devices[port];
> 
> -	if (!is_ixgbe_supported(dev))
> -		return -ENOTSUP;

This driver type check of is_ixgbe_supported(dev), is very important for PRIVATE API function,
You can not delete it, Please add it back, rte_pmd_ixgbe_macsec_disable() also has this problem.
Although this patch has been merged, please commit fix patch for it, thanks!



> +	macsec_setting.encrypt_en = en;
> +	macsec_setting.replayprotect_en = rp;
> 
> -	hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
> +	ixgbe_dev_macsec_setting_save(dev, &macsec_setting);
> 
> -	/* Stop the data paths */
> -	if (ixgbe_disable_sec_rx_path(hw) != IXGBE_SUCCESS)
> -		return -ENOTSUP;



More information about the dev mailing list