From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1DF0DA0561; Fri, 5 Mar 2021 03:15:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F1CCD22A35C; Fri, 5 Mar 2021 03:15:01 +0100 (CET) Received: from smtpbg506.qq.com (smtpbg506.qq.com [203.205.250.33]) by mails.dpdk.org (Postfix) with ESMTP id 8A1D222A34A for ; Fri, 5 Mar 2021 03:14:59 +0100 (CET) X-QQ-mid: bizesmtp20t1614910491t0xk034a Received: from jiawenwu.trustnetic.com (unknown [183.129.236.74]) by esmtp6.qq.com (ESMTP) with id ; Fri, 05 Mar 2021 10:14:50 +0800 (CST) X-QQ-SSF: 01400000002000C0D000B00A0000000 X-QQ-FEAT: sj2Ih1w5Qj9lCwtNC5n6cSCdvQZZtmAoUkzHLG/vZkpRrwJBoMcl/oPqnFk/f DdYOH8a5A8xgdqr0L4e+owoMvnll7i02zIO808uKCyJdlrvhMN8VSd1zc5hPYDpOqGgrtor SOckcFJhgiXA7QIEgCXxXUcpkoggyKefK5UaoPe+r2Ps4aA3Ny1KEXpc5xYRYNoYJ95ILjY 4cap8LQrW9DEOnbARXacR9n4Yh1O5QxTwX/z7uDNSdy2pqtgeV4GM8wureZdWZTHQQ5FEgf ujAsyosY8C4czO4FkylEag0/Iy7dTjCyX/Eq1NseJOtEP79o9HwGpZ+uwamiJSboXlVkh6D RdNEUpdttU1fBNJXyY991X+nOz1HQ== X-QQ-GoodBg: 2 From: Jiawen Wu To: dev@dpdk.org Cc: Jiawen Wu , stable@dpdk.org Date: Fri, 5 Mar 2021 10:14:38 +0800 Message-Id: <20210305021438.10144-5-jiawenwu@trustnetic.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20210305021438.10144-1-jiawenwu@trustnetic.com> References: <20210305021438.10144-1-jiawenwu@trustnetic.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:trustnetic.com:qybgforeign:qybgforeign5 X-QQ-Bgrelay: 1 Subject: [dpdk-dev] [PATCH v2 4/4] net/txgbe: fix the process of adding crypto SA X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" By register definition, Ipsec Rx IPv4 address should to be written in the reg(0). Fixes: 07cafb2adbc5 ("net/txgbe: add security session create operation") Cc: stable@dpdk.org Signed-off-by: Jiawen Wu --- drivers/net/txgbe/txgbe_ipsec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/txgbe/txgbe_ipsec.c b/drivers/net/txgbe/txgbe_ipsec.c index 9f4eee408..a43b95aa2 100644 --- a/drivers/net/txgbe/txgbe_ipsec.c +++ b/drivers/net/txgbe/txgbe_ipsec.c @@ -145,11 +145,11 @@ txgbe_crypto_add_sa(struct txgbe_crypto_session *ic_session) reg_val = TXGBE_IPSRXIDX_ENA | TXGBE_IPSRXIDX_WRITE | TXGBE_IPSRXIDX_TB_IP | (ip_index << 3); if (priv->rx_ip_tbl[ip_index].ip.type == IPv4) { - wr32(hw, TXGBE_IPSRXADDR(0), 0); + uint32_t ipv4 = priv->rx_ip_tbl[ip_index].ip.ipv4; + wr32(hw, TXGBE_IPSRXADDR(0), rte_cpu_to_be_32(ipv4)); wr32(hw, TXGBE_IPSRXADDR(1), 0); wr32(hw, TXGBE_IPSRXADDR(2), 0); - wr32(hw, TXGBE_IPSRXADDR(3), - priv->rx_ip_tbl[ip_index].ip.ipv4); + wr32(hw, TXGBE_IPSRXADDR(3), 0); } else { wr32(hw, TXGBE_IPSRXADDR(0), priv->rx_ip_tbl[ip_index].ip.ipv6[0]); -- 2.21.0.windows.1