From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id DB7FF239; Mon, 5 Nov 2018 03:09:21 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Nov 2018 18:09:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,466,1534834800"; d="scan'208";a="83341537" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.110.207]) by fmsmga007.fm.intel.com with ESMTP; 04 Nov 2018 18:09:19 -0800 Date: Mon, 5 Nov 2018 16:56:36 +0800 From: Ye Xiaolong To: Ferruh Yigit Cc: Qi Zhang , Beilei Xing , dev@dpdk.org, stable@dpdk.org, Shahaf Shuler , Jerin Jacob , Andrew Rybchenko Message-ID: <20181105085636.GC40842@intel.com> References: <20181027104032.10251-1-xiaolong.ye@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH 0/8] Correct XXX_TX_OFFLOAD_NOTSUP_MASK 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: , X-List-Received-Date: Mon, 05 Nov 2018 02:09:22 -0000 Hi, Ferruh On 11/02, Ferruh Yigit wrote: >On 10/27/2018 11:40 AM, Xiaolong Ye wrote: >> Hi, >> >> This patch series is to correct the wrong setting of >> XXX_TX_OFFLOAD_MASK in multiple PMDs. >> >> Just as the name XXX_TX_OFFLOAD_NOTSUP_MASK indicates, it should be the >> mask of unsupported features (either not in PKT_TX_OFFLOAD_MASK or in >> XXX_TX_OFFLOAD_MASK), however, xor will not get desired result here, >> assume bit 0 of PKT_TX_OFFLOAD_MASK and XXX_TX_OFFLOAD_MAKS are 0 which >> means corresponding feature is not supported in both sides, then we get >> value of bit 0 of XXX_TX_OFFLOAD_NOTSUP_MASK which is 0 via xor, it >> implies that it is supported which doesn't meet our expectation. > >Hi Xiaolong, > >I am not sure if this is a problem. > >PKT_TX_OFFLOAD_MASK should be all TX bits set, from bit 40 to 60 in latest code. >And XXX_TX_OFFLOAD_MASK can be subset of those bits set. > >So your sample doesn't apply here since PKT_TX_OFFLOAD_MASK, TX related bits, >can't be 0. And (A ^ B) should be same with ~(A & B) for this case. > If this is the case, I think current code is fine. ~(A & B) is just more correct than (A ^ B) from the logic perspective. > >Am I missing something, do you have a failing usecase/testcase with real values? No real failing issue has been found, I just happened to read the code and thought it might be a problem. :) Thanks, Xiaolong > >> >> Correct it by a NOT-AND operation. >> >> Xiaolong Ye (8): >> net/ixgbe: correct offload not supported mask >> net/avf: correct offload not supported mask >> net/ena: correct offload not supported mask >> net/atlantic: correct offload not supported mask >> net/fm10k: correct offload not supported mask >> net/qede: correct offload not supported mask >> net/vmxnet3: correct offload not supported mask >> net/e1000: correct offload not supported mask >> >> drivers/net/atlantic/atl_rxtx.c | 2 +- >> drivers/net/avf/avf_rxtx.h | 2 +- >> drivers/net/e1000/em_rxtx.c | 2 +- >> drivers/net/e1000/igb_rxtx.c | 2 +- >> drivers/net/ena/ena_ethdev.c | 2 +- >> drivers/net/fm10k/fm10k_rxtx.c | 2 +- >> drivers/net/ixgbe/ixgbe_rxtx.c | 2 +- >> drivers/net/qede/qede_rxtx.h | 2 +- >> drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +- >> 9 files changed, 9 insertions(+), 9 deletions(-) >> >