From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5B024A04F5 for ; Wed, 11 Dec 2019 22:27:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 505911D9E; Wed, 11 Dec 2019 22:27:44 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id D37421D9E for ; Wed, 11 Dec 2019 22:27:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576099662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aD5ndEhLo1IQQND6OqE2LylJHnPiWeiEWJLoKTCuGq4=; b=Rq2fMfHTWgPzdoIuc+xPxEs1vFykHcVd+tRZT1SaiVbo9JgZxp9oJgdrTIZZIxXmmQW8YS fmbPaVzrCxcfO8OFJHZzi1fXO9YyGcOIo0isoOvx/+gjIO3v98cOIWB/MAfH5fAKT3QZrm b0zoLwmJgXnv9Pr46FRyNRMQv4bI8qI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-197-gFBT8nOGPq6J-2VvCVLfHQ-1; Wed, 11 Dec 2019 16:27:38 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AC113DBE5; Wed, 11 Dec 2019 21:27:37 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-64.ams2.redhat.com [10.36.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6E09A10013A1; Wed, 11 Dec 2019 21:27:36 +0000 (UTC) From: Kevin Traynor To: Guinan Sun Cc: Xiaolong Ye , dpdk stable Date: Wed, 11 Dec 2019 21:25:56 +0000 Message-Id: <20191211212702.27851-4-ktraynor@redhat.com> In-Reply-To: <20191211212702.27851-1-ktraynor@redhat.com> References: <20191211212702.27851-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: gFBT8nOGPq6J-2VvCVLfHQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'net/ixgbe: fix MACsec setting' has been queued to LTS release 18.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/17/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasi= ng (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/7137dc35798febc3ab= 6738921eab092ca5c4ac0e Thanks. Kevin. --- >From 7137dc35798febc3ab6738921eab092ca5c4ac0e Mon Sep 17 00:00:00 2001 From: Guinan Sun Date: Thu, 31 Oct 2019 11:31:52 +0000 Subject: [PATCH] net/ixgbe: fix MACsec setting [ upstream commit 50556c88104cbc0096e90f454dc137258be2099f ] 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") Signed-off-by: Guinan Sun Reviewed-by: Xiaolong Ye --- drivers/net/ixgbe/ixgbe_ethdev.c | 149 ++++++++++++++++++++++++++++++ drivers/net/ixgbe/ixgbe_ethdev.h | 19 ++++ drivers/net/ixgbe/rte_pmd_ixgbe.c | 125 ++----------------------- 3 files changed, 175 insertions(+), 118 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_eth= dev.c index 74de2ff4e..1336236ba 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -2591,4 +2591,6 @@ ixgbe_dev_start(struct rte_eth_dev *dev) =09struct ixgbe_tm_conf *tm_conf =3D =09=09IXGBE_DEV_PRIVATE_TO_TM_CONF(dev->data->dev_private); +=09struct ixgbe_macsec_setting *macsec_ctrl =3D +=09=09IXGBE_DEV_PRIVATE_TO_MACSEC_SETTING(dev->data->dev_private); =20 =09PMD_INIT_FUNC_TRACE(); @@ -2831,4 +2833,7 @@ skip_link_setup: =09ixgbe_dev_link_update(dev, 0); =20 +=09/* setup the macsec ctrl register */ +=09ixgbe_dev_macsec_register_enable(dev, macsec_ctrl); + =09return 0; =20 @@ -2859,4 +2864,7 @@ ixgbe_dev_stop(struct rte_eth_dev *dev) =09PMD_INIT_FUNC_TRACE(); =20 +=09/* disable mecsec register */ +=09ixgbe_dev_macsec_register_disable(dev); + =09rte_eal_alarm_cancel(ixgbe_dev_setup_link_alarm_handler, dev); =20 @@ -8679,4 +8687,145 @@ ixgbe_clear_all_l2_tn_filter(struct rte_eth_dev *de= v) } =20 +void +ixgbe_dev_macsec_setting_save(struct rte_eth_dev *dev, +=09=09=09=09struct ixgbe_macsec_setting *macsec_setting) +{ +=09struct ixgbe_macsec_setting *macsec =3D +=09=09IXGBE_DEV_PRIVATE_TO_MACSEC_SETTING(dev->data->dev_private); + +=09macsec->encrypt_en =3D macsec_setting->encrypt_en; +=09macsec->replayprotect_en =3D macsec_setting->replayprotect_en; +} + +void +ixgbe_dev_macsec_setting_reset(struct rte_eth_dev *dev) +{ +=09struct ixgbe_macsec_setting *macsec =3D +=09=09IXGBE_DEV_PRIVATE_TO_MACSEC_SETTING(dev->data->dev_private); + +=09macsec->encrypt_en =3D 0; +=09macsec->replayprotect_en =3D 0; +} + +void +ixgbe_dev_macsec_register_enable(struct rte_eth_dev *dev, +=09=09=09=09struct ixgbe_macsec_setting *macsec_setting) +{ +=09struct ixgbe_hw *hw =3D IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private)= ; +=09uint32_t ctrl; +=09uint8_t en =3D macsec_setting->encrypt_en; +=09uint8_t rp =3D macsec_setting->replayprotect_en; + +=09/** +=09 * Workaround: +=09 * As no ixgbe_disable_sec_rx_path equivalent is +=09 * implemented for tx in the base code, and we are +=09 * not allowed to modify the base code in DPDK, so +=09 * just call the hand-written one directly for now. +=09 * The hardware support has been checked by +=09 * ixgbe_disable_sec_rx_path(). +=09 */ +=09ixgbe_disable_sec_tx_path_generic(hw); + +=09/* Enable Ethernet CRC (required by MACsec offload) */ +=09ctrl =3D IXGBE_READ_REG(hw, IXGBE_HLREG0); +=09ctrl |=3D IXGBE_HLREG0_TXCRCEN | IXGBE_HLREG0_RXCRCSTRP; +=09IXGBE_WRITE_REG(hw, IXGBE_HLREG0, ctrl); + +=09/* Enable the TX and RX crypto engines */ +=09ctrl =3D IXGBE_READ_REG(hw, IXGBE_SECTXCTRL); +=09ctrl &=3D ~IXGBE_SECTXCTRL_SECTX_DIS; +=09IXGBE_WRITE_REG(hw, IXGBE_SECTXCTRL, ctrl); + +=09ctrl =3D IXGBE_READ_REG(hw, IXGBE_SECRXCTRL); +=09ctrl &=3D ~IXGBE_SECRXCTRL_SECRX_DIS; +=09IXGBE_WRITE_REG(hw, IXGBE_SECRXCTRL, ctrl); + +=09ctrl =3D IXGBE_READ_REG(hw, IXGBE_SECTXMINIFG); +=09ctrl &=3D ~IXGBE_SECTX_MINSECIFG_MASK; +=09ctrl |=3D 0x3; +=09IXGBE_WRITE_REG(hw, IXGBE_SECTXMINIFG, ctrl); + +=09/* Enable SA lookup */ +=09ctrl =3D IXGBE_READ_REG(hw, IXGBE_LSECTXCTRL); +=09ctrl &=3D ~IXGBE_LSECTXCTRL_EN_MASK; +=09ctrl |=3D en ? IXGBE_LSECTXCTRL_AUTH_ENCRYPT : +=09=09 IXGBE_LSECTXCTRL_AUTH; +=09ctrl |=3D IXGBE_LSECTXCTRL_AISCI; +=09ctrl &=3D ~IXGBE_LSECTXCTRL_PNTHRSH_MASK; +=09ctrl |=3D IXGBE_MACSEC_PNTHRSH & IXGBE_LSECTXCTRL_PNTHRSH_MASK; +=09IXGBE_WRITE_REG(hw, IXGBE_LSECTXCTRL, ctrl); + +=09ctrl =3D IXGBE_READ_REG(hw, IXGBE_LSECRXCTRL); +=09ctrl &=3D ~IXGBE_LSECRXCTRL_EN_MASK; +=09ctrl |=3D IXGBE_LSECRXCTRL_STRICT << IXGBE_LSECRXCTRL_EN_SHIFT; +=09ctrl &=3D ~IXGBE_LSECRXCTRL_PLSH; +=09if (rp) +=09=09ctrl |=3D IXGBE_LSECRXCTRL_RP; +=09else +=09=09ctrl &=3D ~IXGBE_LSECRXCTRL_RP; +=09IXGBE_WRITE_REG(hw, IXGBE_LSECRXCTRL, ctrl); + +=09/* Start the data paths */ +=09ixgbe_enable_sec_rx_path(hw); +=09/** +=09 * Workaround: +=09 * As no ixgbe_enable_sec_rx_path equivalent is +=09 * implemented for tx in the base code, and we are +=09 * not allowed to modify the base code in DPDK, so +=09 * just call the hand-written one directly for now. +=09 */ +=09ixgbe_enable_sec_tx_path_generic(hw); +} + +void +ixgbe_dev_macsec_register_disable(struct rte_eth_dev *dev) +{ +=09struct ixgbe_hw *hw =3D IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private)= ; +=09uint32_t ctrl; + +=09/** +=09 * Workaround: +=09 * As no ixgbe_disable_sec_rx_path equivalent is +=09 * implemented for tx in the base code, and we are +=09 * not allowed to modify the base code in DPDK, so +=09 * just call the hand-written one directly for now. +=09 * The hardware support has been checked by +=09 * ixgbe_disable_sec_rx_path(). +=09 */ +=09ixgbe_disable_sec_tx_path_generic(hw); + +=09/* Disable the TX and RX crypto engines */ +=09ctrl =3D IXGBE_READ_REG(hw, IXGBE_SECTXCTRL); +=09ctrl |=3D IXGBE_SECTXCTRL_SECTX_DIS; +=09IXGBE_WRITE_REG(hw, IXGBE_SECTXCTRL, ctrl); + +=09ctrl =3D IXGBE_READ_REG(hw, IXGBE_SECRXCTRL); +=09ctrl |=3D IXGBE_SECRXCTRL_SECRX_DIS; +=09IXGBE_WRITE_REG(hw, IXGBE_SECRXCTRL, ctrl); + +=09/* Disable SA lookup */ +=09ctrl =3D IXGBE_READ_REG(hw, IXGBE_LSECTXCTRL); +=09ctrl &=3D ~IXGBE_LSECTXCTRL_EN_MASK; +=09ctrl |=3D IXGBE_LSECTXCTRL_DISABLE; +=09IXGBE_WRITE_REG(hw, IXGBE_LSECTXCTRL, ctrl); + +=09ctrl =3D IXGBE_READ_REG(hw, IXGBE_LSECRXCTRL); +=09ctrl &=3D ~IXGBE_LSECRXCTRL_EN_MASK; +=09ctrl |=3D IXGBE_LSECRXCTRL_DISABLE << IXGBE_LSECRXCTRL_EN_SHIFT; +=09IXGBE_WRITE_REG(hw, IXGBE_LSECRXCTRL, ctrl); + +=09/* Start the data paths */ +=09ixgbe_enable_sec_rx_path(hw); +=09/** +=09 * Workaround: +=09 * As no ixgbe_enable_sec_rx_path equivalent is +=09 * implemented for tx in the base code, and we are +=09 * not allowed to modify the base code in DPDK, so +=09 * just call the hand-written one directly for now. +=09 */ +=09ixgbe_enable_sec_tx_path_generic(hw); +} + RTE_PMD_REGISTER_PCI(net_ixgbe, rte_ixgbe_pmd); RTE_PMD_REGISTER_PCI_TABLE(net_ixgbe, pci_id_ixgbe_map); diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_eth= dev.h index 5023fa13f..418adfa3d 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.h +++ b/drivers/net/ixgbe/ixgbe_ethdev.h @@ -361,4 +361,9 @@ struct rte_flow { }; =20 +struct ixgbe_macsec_setting { +=09uint8_t encrypt_en; +=09uint8_t replayprotect_en; +}; + /* * Statistics counters collected by the MACsec @@ -467,4 +472,5 @@ struct ixgbe_adapter { =09struct ixgbe_hw_stats stats; =09struct ixgbe_macsec_stats macsec_stats; +=09struct ixgbe_macsec_setting=09macsec_setting; =09struct ixgbe_hw_fdir_info fdir; =09struct ixgbe_interrupt intr; @@ -519,4 +525,7 @@ int ixgbe_vf_representor_uninit(struct rte_eth_dev *eth= dev); =09(&((struct ixgbe_adapter *)adapter)->macsec_stats) =20 +#define IXGBE_DEV_PRIVATE_TO_MACSEC_SETTING(adapter) \ +=09(&((struct ixgbe_adapter *)adapter)->macsec_setting) + #define IXGBE_DEV_PRIVATE_TO_INTR(adapter) \ =09(&((struct ixgbe_adapter *)adapter)->intr) @@ -737,4 +746,14 @@ int ixgbe_config_rss_filter(struct rte_eth_dev *dev, =09=09struct ixgbe_rte_flow_rss_conf *conf, bool add); =20 +void ixgbe_dev_macsec_register_enable(struct rte_eth_dev *dev, +=09=09struct ixgbe_macsec_setting *macsec_setting); + +void ixgbe_dev_macsec_register_disable(struct rte_eth_dev *dev); + +void ixgbe_dev_macsec_setting_save(struct rte_eth_dev *dev, +=09=09struct ixgbe_macsec_setting *macsec_setting); + +void ixgbe_dev_macsec_setting_reset(struct rte_eth_dev *dev); + static inline int ixgbe_ethertype_filter_lookup(struct ixgbe_filter_info *filter_info, diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.c b/drivers/net/ixgbe/rte_pmd_= ixgbe.c index 3a874f9a9..49d538ef1 100644 --- a/drivers/net/ixgbe/rte_pmd_ixgbe.c +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.c @@ -515,7 +515,6 @@ int rte_pmd_ixgbe_macsec_enable(uint16_t port, uint8_t en, uint8_t rp) { -=09struct ixgbe_hw *hw; =09struct rte_eth_dev *dev; -=09uint32_t ctrl; +=09struct ixgbe_macsec_setting macsec_setting; =20 =09RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV); @@ -523,72 +522,10 @@ rte_pmd_ixgbe_macsec_enable(uint16_t port, uint8_t en= , uint8_t rp) =09dev =3D &rte_eth_devices[port]; =20 -=09if (!is_ixgbe_supported(dev)) -=09=09return -ENOTSUP; +=09macsec_setting.encrypt_en =3D en; +=09macsec_setting.replayprotect_en =3D rp; =20 -=09hw =3D IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); +=09ixgbe_dev_macsec_setting_save(dev, &macsec_setting); =20 -=09/* Stop the data paths */ -=09if (ixgbe_disable_sec_rx_path(hw) !=3D IXGBE_SUCCESS) -=09=09return -ENOTSUP; -=09/** -=09 * Workaround: -=09 * As no ixgbe_disable_sec_rx_path equivalent is -=09 * implemented for tx in the base code, and we are -=09 * not allowed to modify the base code in DPDK, so -=09 * just call the hand-written one directly for now. -=09 * The hardware support has been checked by -=09 * ixgbe_disable_sec_rx_path(). -=09 */ -=09ixgbe_disable_sec_tx_path_generic(hw); - -=09/* Enable Ethernet CRC (required by MACsec offload) */ -=09ctrl =3D IXGBE_READ_REG(hw, IXGBE_HLREG0); -=09ctrl |=3D IXGBE_HLREG0_TXCRCEN | IXGBE_HLREG0_RXCRCSTRP; -=09IXGBE_WRITE_REG(hw, IXGBE_HLREG0, ctrl); - -=09/* Enable the TX and RX crypto engines */ -=09ctrl =3D IXGBE_READ_REG(hw, IXGBE_SECTXCTRL); -=09ctrl &=3D ~IXGBE_SECTXCTRL_SECTX_DIS; -=09IXGBE_WRITE_REG(hw, IXGBE_SECTXCTRL, ctrl); - -=09ctrl =3D IXGBE_READ_REG(hw, IXGBE_SECRXCTRL); -=09ctrl &=3D ~IXGBE_SECRXCTRL_SECRX_DIS; -=09IXGBE_WRITE_REG(hw, IXGBE_SECRXCTRL, ctrl); - -=09ctrl =3D IXGBE_READ_REG(hw, IXGBE_SECTXMINIFG); -=09ctrl &=3D ~IXGBE_SECTX_MINSECIFG_MASK; -=09ctrl |=3D 0x3; -=09IXGBE_WRITE_REG(hw, IXGBE_SECTXMINIFG, ctrl); - -=09/* Enable SA lookup */ -=09ctrl =3D IXGBE_READ_REG(hw, IXGBE_LSECTXCTRL); -=09ctrl &=3D ~IXGBE_LSECTXCTRL_EN_MASK; -=09ctrl |=3D en ? IXGBE_LSECTXCTRL_AUTH_ENCRYPT : -=09=09 IXGBE_LSECTXCTRL_AUTH; -=09ctrl |=3D IXGBE_LSECTXCTRL_AISCI; -=09ctrl &=3D ~IXGBE_LSECTXCTRL_PNTHRSH_MASK; -=09ctrl |=3D IXGBE_MACSEC_PNTHRSH & IXGBE_LSECTXCTRL_PNTHRSH_MASK; -=09IXGBE_WRITE_REG(hw, IXGBE_LSECTXCTRL, ctrl); - -=09ctrl =3D IXGBE_READ_REG(hw, IXGBE_LSECRXCTRL); -=09ctrl &=3D ~IXGBE_LSECRXCTRL_EN_MASK; -=09ctrl |=3D IXGBE_LSECRXCTRL_STRICT << IXGBE_LSECRXCTRL_EN_SHIFT; -=09ctrl &=3D ~IXGBE_LSECRXCTRL_PLSH; -=09if (rp) -=09=09ctrl |=3D IXGBE_LSECRXCTRL_RP; -=09else -=09=09ctrl &=3D ~IXGBE_LSECRXCTRL_RP; -=09IXGBE_WRITE_REG(hw, IXGBE_LSECRXCTRL, ctrl); - -=09/* Start the data paths */ -=09ixgbe_enable_sec_rx_path(hw); -=09/** -=09 * Workaround: -=09 * As no ixgbe_enable_sec_rx_path equivalent is -=09 * implemented for tx in the base code, and we are -=09 * not allowed to modify the base code in DPDK, so -=09 * just call the hand-written one directly for now. -=09 */ -=09ixgbe_enable_sec_tx_path_generic(hw); +=09ixgbe_dev_macsec_register_enable(dev, &macsec_setting); =20 =09return 0; @@ -598,7 +535,5 @@ int rte_pmd_ixgbe_macsec_disable(uint16_t port) { -=09struct ixgbe_hw *hw; =09struct rte_eth_dev *dev; -=09uint32_t ctrl; =20 =09RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV); @@ -606,53 +541,7 @@ rte_pmd_ixgbe_macsec_disable(uint16_t port) =09dev =3D &rte_eth_devices[port]; =20 -=09if (!is_ixgbe_supported(dev)) -=09=09return -ENOTSUP; +=09ixgbe_dev_macsec_setting_reset(dev); =20 -=09hw =3D IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); - -=09/* Stop the data paths */ -=09if (ixgbe_disable_sec_rx_path(hw) !=3D IXGBE_SUCCESS) -=09=09return -ENOTSUP; -=09/** -=09 * Workaround: -=09 * As no ixgbe_disable_sec_rx_path equivalent is -=09 * implemented for tx in the base code, and we are -=09 * not allowed to modify the base code in DPDK, so -=09 * just call the hand-written one directly for now. -=09 * The hardware support has been checked by -=09 * ixgbe_disable_sec_rx_path(). -=09 */ -=09ixgbe_disable_sec_tx_path_generic(hw); - -=09/* Disable the TX and RX crypto engines */ -=09ctrl =3D IXGBE_READ_REG(hw, IXGBE_SECTXCTRL); -=09ctrl |=3D IXGBE_SECTXCTRL_SECTX_DIS; -=09IXGBE_WRITE_REG(hw, IXGBE_SECTXCTRL, ctrl); - -=09ctrl =3D IXGBE_READ_REG(hw, IXGBE_SECRXCTRL); -=09ctrl |=3D IXGBE_SECRXCTRL_SECRX_DIS; -=09IXGBE_WRITE_REG(hw, IXGBE_SECRXCTRL, ctrl); - -=09/* Disable SA lookup */ -=09ctrl =3D IXGBE_READ_REG(hw, IXGBE_LSECTXCTRL); -=09ctrl &=3D ~IXGBE_LSECTXCTRL_EN_MASK; -=09ctrl |=3D IXGBE_LSECTXCTRL_DISABLE; -=09IXGBE_WRITE_REG(hw, IXGBE_LSECTXCTRL, ctrl); - -=09ctrl =3D IXGBE_READ_REG(hw, IXGBE_LSECRXCTRL); -=09ctrl &=3D ~IXGBE_LSECRXCTRL_EN_MASK; -=09ctrl |=3D IXGBE_LSECRXCTRL_DISABLE << IXGBE_LSECRXCTRL_EN_SHIFT; -=09IXGBE_WRITE_REG(hw, IXGBE_LSECRXCTRL, ctrl); - -=09/* Start the data paths */ -=09ixgbe_enable_sec_rx_path(hw); -=09/** -=09 * Workaround: -=09 * As no ixgbe_enable_sec_rx_path equivalent is -=09 * implemented for tx in the base code, and we are -=09 * not allowed to modify the base code in DPDK, so -=09 * just call the hand-written one directly for now. -=09 */ -=09ixgbe_enable_sec_tx_path_generic(hw); +=09ixgbe_dev_macsec_register_disable(dev); =20 =09return 0; --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-11 21:24:13.077637869 +0000 +++ 0004-net-ixgbe-fix-MACsec-setting.patch=092019-12-11 21:24:12.552653594= +0000 @@ -1 +1 @@ -From 50556c88104cbc0096e90f454dc137258be2099f Mon Sep 17 00:00:00 2001 +From 7137dc35798febc3ab6738921eab092ca5c4ac0e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 50556c88104cbc0096e90f454dc137258be2099f ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index 3c7624f3a..06414d110 100644 +index 74de2ff4e..1336236ba 100644 @@ -25 +26 @@ -@@ -2543,4 +2543,6 @@ ixgbe_dev_start(struct rte_eth_dev *dev) +@@ -2591,4 +2591,6 @@ ixgbe_dev_start(struct rte_eth_dev *dev) @@ -32 +33 @@ -@@ -2795,4 +2797,7 @@ skip_link_setup: +@@ -2831,4 +2833,7 @@ skip_link_setup: @@ -40 +41 @@ -@@ -2826,4 +2831,7 @@ ixgbe_dev_stop(struct rte_eth_dev *dev) +@@ -2859,4 +2864,7 @@ ixgbe_dev_stop(struct rte_eth_dev *dev) @@ -48 +49 @@ -@@ -8817,4 +8825,145 @@ ixgbe_clear_all_l2_tn_filter(struct rte_eth_dev *d= ev) +@@ -8679,4 +8687,145 @@ ixgbe_clear_all_l2_tn_filter(struct rte_eth_dev *d= ev) @@ -195 +196 @@ -index 6e9ed2e10..5da6923a1 100644 +index 5023fa13f..418adfa3d 100644 @@ -198 +199 @@ -@@ -366,4 +366,9 @@ struct rte_flow { +@@ -361,4 +361,9 @@ struct rte_flow { @@ -208 +209 @@ -@@ -472,4 +477,5 @@ struct ixgbe_adapter { +@@ -467,4 +472,5 @@ struct ixgbe_adapter { @@ -214 +215 @@ -@@ -524,4 +530,7 @@ int ixgbe_vf_representor_uninit(struct rte_eth_dev *et= hdev); +@@ -519,4 +525,7 @@ int ixgbe_vf_representor_uninit(struct rte_eth_dev *et= hdev); @@ -222 +223 @@ -@@ -742,4 +751,14 @@ int ixgbe_config_rss_filter(struct rte_eth_dev *dev, +@@ -737,4 +746,14 @@ int ixgbe_config_rss_filter(struct rte_eth_dev *dev, @@ -238 +239 @@ -index 9514f2cf5..073fe1e23 100644 +index 3a874f9a9..49d538ef1 100644 @@ -241 +242 @@ -@@ -516,7 +516,6 @@ int +@@ -515,7 +515,6 @@ int @@ -250 +251 @@ -@@ -524,72 +523,10 @@ rte_pmd_ixgbe_macsec_enable(uint16_t port, uint8_t e= n, uint8_t rp) +@@ -523,72 +522,10 @@ rte_pmd_ixgbe_macsec_enable(uint16_t port, uint8_t e= n, uint8_t rp) @@ -327 +328 @@ -@@ -599,7 +536,5 @@ int +@@ -598,7 +535,5 @@ int @@ -335 +336 @@ -@@ -607,53 +542,7 @@ rte_pmd_ixgbe_macsec_disable(uint16_t port) +@@ -606,53 +541,7 @@ rte_pmd_ixgbe_macsec_disable(uint16_t port)