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 1E394A2E1B for ; Tue, 3 Sep 2019 10:37:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3CD2B1D161; Tue, 3 Sep 2019 10:37:06 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id D0A291D15E for ; Tue, 3 Sep 2019 10:37:04 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Sep 2019 01:37:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,462,1559545200"; d="scan'208";a="382047164" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.5]) by fmsmga005.fm.intel.com with ESMTP; 03 Sep 2019 01:37:02 -0700 Date: Tue, 3 Sep 2019 16:35:11 +0800 From: Ye Xiaolong To: "Pei, Andy" Cc: "dev@dpdk.org" , "Zhang, Qi Z" , "Yigit, Ferruh" , "Xu, Rosen" Message-ID: <20190903083511.GA15462@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5941F446C088714A85408FA3132CFCBB0106C5E1@SHSMSX105.ccr.corp.intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) 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" 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 similar 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 ; Xu, Rosen >Subject: Re: [PATCH v3] net/ipn3ke: setup MTU when HW init > >On 09/03, Pei, Andy wrote: >[snip] >> tmp = RTE_MAX(tmp, RTE_ETHER_MIN_MTU); >> >>>+ if (tmp > IPN3KE_MAC_FRAME_SIZE_MAX - IPN3KE_ETH_OVERHEAD) >>>+ tmp = IPN3KE_MAC_FRAME_SIZE_MAX - IPN3KE_ETH_OVERHEAD; >> >> tmp = RTE_MIN(tmp, IPN3KE_MAC_FRAME_SIZE_MAX - IPN3KE_ETH_OVERHEAD); >> >>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