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 81E8DA2E1B for ; Tue, 3 Sep 2019 10:46:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A3C231BEAA; Tue, 3 Sep 2019 10:46:08 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 924741BEA4 for ; Tue, 3 Sep 2019 10:46:06 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Sep 2019 01:46:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,462,1559545200"; d="scan'208";a="189749102" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by FMSMGA003.fm.intel.com with ESMTP; 03 Sep 2019 01:46:05 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 3 Sep 2019 01:46:05 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 3 Sep 2019 01:46:05 -0700 Received: from shsmsx105.ccr.corp.intel.com ([169.254.11.23]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.92]) with mapi id 14.03.0439.000; Tue, 3 Sep 2019 16:46:03 +0800 From: "Pei, Andy" To: "Ye, Xiaolong" CC: "dev@dpdk.org" , "Zhang, Qi Z" , "Yigit, Ferruh" , "Xu, Rosen" Thread-Topic: [PATCH v3] net/ipn3ke: setup MTU when HW init Thread-Index: AQHVYXBfdnbAWHH9C0G9v0Hw5FV8CKcZPDrw//+64QCAAIcwIP//nbeAgACJCNA= Date: Tue, 3 Sep 2019 08:46:03 +0000 Message-ID: <5941F446C088714A85408FA3132CFCBB0106C713@SHSMSX105.ccr.corp.intel.com> References: <1565280090-344032-1-git-send-email-andy.pei@intel.com> <1567392847-445709-1-git-send-email-andy.pei@intel.com> <20190902092341.GD1665@intel.com> <5941F446C088714A85408FA3132CFCBB0106BF60@SHSMSX105.ccr.corp.intel.com> <20190903062306.GF4325@intel.com> <5941F446C088714A85408FA3132CFCBB0106C5E1@SHSMSX105.ccr.corp.intel.com> <20190903083511.GA15462@intel.com> In-Reply-To: <20190903083511.GA15462@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3] net/ipn3ke: setup MTU when HW init X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Oh, I misuse () when casting. Now it works. -----Original Message----- From: Ye, Xiaolong=20 Sent: Tuesday, September 3, 2019 4:35 PM To: Pei, Andy Cc: dev@dpdk.org; Zhang, Qi Z ; Yigit, Ferruh ; Xu, Rosen Subject: Re: [PATCH v3] net/ipn3ke: setup MTU when HW init On 09/03, Pei, Andy wrote: >Hi Xiaolong, > >I tried, but compile issue exist. Er, what's the exact compiling issue after the type cast? We can see the si= milar usage in function like replay_num_bucket @lib/librte_ipsec/sa.c. Thanks, Xiaolong > >-----Original Message----- >From: Ye, Xiaolong >Sent: Tuesday, September 3, 2019 2:23 PM >To: Pei, Andy >Cc: dev@dpdk.org; Zhang, Qi Z ; Yigit, Ferruh=20 >; Xu, Rosen >Subject: Re: [PATCH v3] net/ipn3ke: setup MTU when HW init > >On 09/03, Pei, Andy wrote: >[snip] >> tmp =3D RTE_MAX(tmp, RTE_ETHER_MIN_MTU); >> >>>+ if (tmp > IPN3KE_MAC_FRAME_SIZE_MAX - IPN3KE_ETH_OVERHEAD) >>>+ tmp =3D IPN3KE_MAC_FRAME_SIZE_MAX - IPN3KE_ETH_OVERHEAD; >> >> tmp =3D RTE_MIN(tmp, IPN3KE_MAC_FRAME_SIZE_MAX - IPN3KE_ETH_OVERHEAD); >>=09 >>in the definition of TRE_MIN and TRE_MAX, typeof() is used. >>RTE_ETHER_MIN_MTU is MACRO, your expression cause complie issue. >> > >How about RTE_MAX(tmp, (uint32_t)RTE_ETHER_MIN_MTU) > >Thanks, >Xiaolong