From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B8338C0219E for ; Mon, 17 Feb 2025 11:31:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 5EA3A819D1; Mon, 17 Feb 2025 11:31:26 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 6OnCNNV1FzYd; Mon, 17 Feb 2025 11:31:25 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 9C20A81F08 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1739791885; bh=rXZoNdUIJJnZShIOY1SKEQ9C5imd0JT3HSgWwpXyows=; h=Date:From:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=EzUlrSSHShJXpXlk4f21RY52e0EFY79Bl6kR7s1q7xIjD1EQNolSViDvAO4QqV0pw g0cS/5krAgkXx584s/ABfZkfCO+DpcQwb4P1d/Wgc/vzv3PYUCXMdI38vbUp812wEc CUcDlF5eQJG3GW1FWVG4ATowYCvjOC1+R7k0S3xZxYns7AJE2W770332SoeeTUeX8e xmDYK52xqqTKf//uKxCn0wjF1LPB8I6YI5W5JlDDVVkjdAvh11uXM6My+AnvLUHmA0 VAjexZd6l95DWNirDBKYSsj/DcCUgPFVMqnpqjtjh/JUEumSWl/RbVn3YZAGumZV12 dF+OIGvqQnzOw== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id 9C20A81F08; Mon, 17 Feb 2025 11:31:25 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists1.osuosl.org (Postfix) with ESMTP id 9AD3CDE for ; Mon, 17 Feb 2025 11:31:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 87FBF81F08 for ; Mon, 17 Feb 2025 11:31:24 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id SBrCyosycmg9 for ; Mon, 17 Feb 2025 11:31:24 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=139.178.84.217; helo=dfw.source.kernel.org; envelope-from=horms@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org CAF70819D1 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org CAF70819D1 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by smtp1.osuosl.org (Postfix) with ESMTPS id CAF70819D1 for ; Mon, 17 Feb 2025 11:31:23 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 3043A5C51A7; Mon, 17 Feb 2025 11:30:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 322ECC4CED1; Mon, 17 Feb 2025 11:31:16 +0000 (UTC) Date: Mon, 17 Feb 2025 11:31:13 +0000 From: Simon Horman To: Faizal Rahim Cc: Tony Nguyen , Przemek Kitszel , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexandre Torgue , Russell King , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Furong Xu <0x1207@gmail.com>, Russell King , Vladimir Oltean , Serge Semin , Xiaolei Wang , Suraj Jaiswal , Kory Maincent , Gal Pressman , Jesper Nilsson , Andrew Halaney , Choong Yong Liang , Kunihiko Hayashi , Vinicius Costa Gomes , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, bpf@vger.kernel.org Message-ID: <20250217113113.GK1615191@kernel.org> References: <20250210070207.2615418-1-faizal.abdul.rahim@linux.intel.com> <20250210070207.2615418-6-faizal.abdul.rahim@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250210070207.2615418-6-faizal.abdul.rahim@linux.intel.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739791882; bh=x59L7IqL94IFM2zao/QYrrn1Ck873l+zRRObe6nR3ZY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FntKGJ2gEe8KQtXAM1A7/RQn+PfYq8H5dWKYZn5oss5qZBf9JJncJE+R18hFL8Lm9 PFPpYqcpS5EoPKMf2J66Tc0mJGlB837NAOJlOR8NTAl4z0mfHEvAkYdhwMS9wYhdKJ HEiZuuptHx2U2UuENVvlZPPOD8mlcYbVLdg9xYKBvzRLVk1cxv7vKgZUb9VcRqL5Lp nZcpJgysIZTcUAwuJCuFc5CgPBBFycmNx72h4mVdtw8TrXX0x7EKS9IV1CpLtU44w5 2lFAIvwLk9KmxV7+5Q6jltQEsCH16ycLhTcgGiskBxqc2hX/gfn1u19wzSWtFwHK40 qURVopF4ZbD4g== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=FntKGJ2g Subject: Re: [Intel-wired-lan] [PATCH iwl-next v4 5/9] igc: Add support for frame preemption verification X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Mon, Feb 10, 2025 at 02:02:03AM -0500, Faizal Rahim wrote: ... > diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.c b/drivers/net/ethernet/intel/igc/igc_tsn.c ... > +bool igc_fpe_transmitted_smd_v(union igc_adv_tx_desc *tx_desc) > +{ > + u8 smd = FIELD_GET(IGC_TXD_POPTS_SMD_MASK, tx_desc->read.olinfo_status); olininfo_status is little-endian, so I think it needs to be converted to host byte order when used as an argument to FIELD_GET(). Flagged by Sparse. > + > + return smd == SMD_V; > +} ... > diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.h b/drivers/net/ethernet/intel/igc/igc_tsn.h ... > +static inline void igc_fpe_lp_event_status(union igc_adv_rx_desc *rx_desc, > + struct ethtool_mmsv *mmsv) > +{ > + __le32 status_error = le32_to_cpu(rx_desc->wb.upper.status_error); It looks like the type of status_error should be a host byte order integer, such as u32. Also flagged by Sparse. > + int smd; > + > + smd = FIELD_GET(IGC_RXDADV_STAT_SMD_TYPE_MASK, status_error); > + > + if (smd == IGC_RXD_STAT_SMD_TYPE_V) > + ethtool_mmsv_event_handle(mmsv, ETHTOOL_MMSV_LP_SENT_VERIFY_MPACKET); > + else if (smd == IGC_RXD_STAT_SMD_TYPE_R) > + ethtool_mmsv_event_handle(mmsv, ETHTOOL_MMSV_LP_SENT_RESPONSE_MPACKET); > +} > + > +static inline bool igc_fpe_is_verify_or_response(union igc_adv_rx_desc *rx_desc, > + unsigned int size) > +{ > + __le32 status_error = le32_to_cpu(rx_desc->wb.upper.status_error); Ditto. > + int smd; > + > + smd = FIELD_GET(IGC_RXDADV_STAT_SMD_TYPE_MASK, status_error); > + > + return ((smd == IGC_RXD_STAT_SMD_TYPE_V || smd == IGC_RXD_STAT_SMD_TYPE_R) && > + size == SMD_FRAME_SIZE); > +} > + > #endif /* _IGC_BASE_H */ > -- > 2.34.1 >