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 4EB59A04FD; Wed, 22 Jun 2022 11:28:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 41A154069C; Wed, 22 Jun 2022 11:28:15 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id BA93840689 for ; Wed, 22 Jun 2022 11:28:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655890093; x=1687426093; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=sY6L+7PaOJ4/6Lp4AeZ7FO86yx3hyLMOUDV9DNixolI=; b=DQmPgcb+g9UU9Di/i0Q3S/LNyyHNeV1el1RSV3mR9adqRw/T8uMaJXQe GDkGC+W0fOU0CWTo4qt4oBXFixKtfTcciarxUrknJEE0HSMHpBiGRF2Cb aO6BXnmDVFT7UIr4GruYqXFCQLNfsPhstn6fEyusBDGQZtAt23bcc0/lI iAqLv+mTXod/pOuIkRZ3t4+UXaffPPYoNaMDWI7lXpbmWX8aQOS0S/mXb GYiTlAfhmlA/SvIAhlRBClWv0w6RIzxN77MmpBOSJv/Tb8o21Zis+S5so cVmPVwJpC5UN1bHK99Muo3yjMzpYXNA+omXZj/a1ZHu0eWRu4TO6a5E9o Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10385"; a="344357423" X-IronPort-AV: E=Sophos;i="5.92,212,1650956400"; d="scan'208";a="344357423" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2022 02:28:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,212,1650956400"; d="scan'208";a="562887210" Received: from silpixa00400884.ir.intel.com ([10.243.22.82]) by orsmga006.jf.intel.com with ESMTP; 22 Jun 2022 02:28:10 -0700 From: Radu Nicolau To: Radu Nicolau , Akhil Goyal Cc: dev@dpdk.org, ndabilpuram@marvell.com Subject: [PATCH] examples/ipsec-secgw: fix Tx checksum offload flag Date: Wed, 22 Jun 2022 10:28:08 +0100 Message-Id: <20220622092808.1952992-1-radu.nicolau@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 For the inline crypto path set the Tx checksum offload flag only if the device supports it. Fixes: d24471e5786b ("examples/ipsec-secgw: disable Tx checksum for inline") Cc: ndabilpuram@marvell.com Signed-off-by: Radu Nicolau --- examples/ipsec-secgw/sa.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c index 0b27f11fc0..9b35dfdbef 100644 --- a/examples/ipsec-secgw/sa.c +++ b/examples/ipsec-secgw/sa.c @@ -1841,7 +1841,10 @@ sa_check_offloads(uint16_t port_id, uint64_t *rx_offloads, if (rule->mss) *tx_offloads |= RTE_ETH_TX_OFFLOAD_TCP_TSO; - *tx_offloads |= RTE_ETH_TX_OFFLOAD_IPV4_CKSUM; + if (dev_info.tx_offload_capa & + RTE_ETH_TX_OFFLOAD_IPV4_CKSUM) + *tx_offloads |= + RTE_ETH_TX_OFFLOAD_IPV4_CKSUM; } break; default: -- 2.25.1