Article View: linux.kernel.netdev
Article #19343Re: [PATCH net-next] aqc111: Correct endianness handling in rx/tx_fixup
From: Andrew Lunn
Date: Thu, 19 Nov 2026 19:41
Date: Thu, 19 Nov 2026 19:41
20 lines
8676 bytes
8676 bytes
> - desc_hdr = le64_to_cpup((u64 *)skb_tail_pointer(skb));
> + desc_hdr = get_unaligned_le64((__le64 *)skb_tail_pointer(skb));
static inline u64 get_unaligned_le64(const void *p)
{
return le64_to_cpu(__get_unaligned_t(__le64, p));
}
You should cast to a void *, not __le64 *. I'm not even sure a cast is
needed:
static inline unsigned char *skb_tail_pointer(const struct sk_buff *skb)
{
return skb->head + skb->tail;
}
The compiler should do an implicit cast.
Andrew
Technical Details
Message-ID:
<29ba76c6-5feb-4f07-90b6-20468b62d602@lunn.ch>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367293-linux-kernel-netdev=dewy.ruReferences:
<20261117-aqc111-v1-1-27a54c4b54ca@birger-koblitz.de>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367293-linux-kernel-netdev=dewy.ru From: andrew@lunn.ch (Andrew Lunn) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next] aqc111: Correct endianness handling in rx/tx_fixup Date: Thu, 19 Nov 2026 20:41:05 +0100 Organization: Usenet Network Message-ID: <29ba76c6-5feb-4f07-90b6-20468b62d602@lunn.ch> References: <20261117-aqc111-v1-1-27a54c4b54ca@birger-koblitz.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="2963572"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:vYSQxyKvkHxXy34WHLqvaMC6CJo= sha256:GayfEtoamUCGHtLi8LRW6tIcXLx74jRGL/Pf0ux9Avs= sha1:FdCa4R1jS1kBHIujZWh4iMkU518= sha256:TbSxPXPlnUIyc/GYSpA/wXL112tjcrTvGYRL1UoNxcw= Content-Disposition: inline List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 1E067115755; Thu, 19 Nov 2026 22:41:37 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.15 X-Spam-Status: No, score=-3.15 tagged_above=-9999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=lunn.ch X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ar24L1mVnC3Q; Thu, 19 Nov 2026 22:41:33 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-367293-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id 846A0115737; Thu, 19 Nov 2026 22:41:23 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id 7252E612F59; Thu, 19 Nov 2026 19:41:22 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795117279; b=GMkFG+Gfy3vKMhIY50O9fZrBvSbIFbHBoJQ0dJkJ1jakZNERlK2x4mw31QB27mwzV6xj +Pg5s1tpCSwyU/wLkPmd1LRw1abJdulYuIGwghGdGg3vK+rQqGTnysQaVJokX7LhYuYNK AyfdaCGpgL7HUJedsLj1z4/0YpYHHKGbMtoiLbmKsQACW6lVbt2CYh82nJw0pnLMUGpU5 fsZKYam68+bG7eLjh24b9Mcl1jhc+R+c7AReavV+qE0uJArfXj38dhSFIqWqAZWspWQ2N +78ZWUHzVn2fGyTL9nUDwgfnbV2GsDHt7eZzxme059kF9z3IqtECKrufdvYz3W8+LkA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795117279; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date: From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=ErhRgV/YsEwprii/iEkN9e5sYE/6u/us4xd93CvjwiU=; b=mlIX1nxkI46uhiUhzTxkr9WzFOGFNH5aAomq/OtdcNrJB+MSvUcHYu4tN0FXrDlOO1TC 9e5YFM9A8kSTgUVoMVAY6+5txXZR92L/6IK5YFcO4XaG8pDAzSdHewDJsNs5MXmf51LPl S6VFdgNNNr/KJWFtEEmHKdigcg45vwswTiqeJ3+HYP/Kwrxulv7tXjVopvLTEQSeAktry 1tuWE9u9YTt9Ri5uRd2JDWxSZ66AixVKXv+K38YM+pHcKRsAu+ZwJVPgtYR+B7DUTII0i sI4JYdTnwXbp9DzjygYMFjGlO4IZecuRk7CwLs29HNmOad4X6650Ep5+8CR3pNXPZHg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=tnjjK6UX; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6CD69606A33A; Thu, 19 Nov 2026 19:41:19 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=tnjjK6UX X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795117278; b=pT0TIir95osNxSs/6yWRBzmtOZQW+9kbppIYH6vkYdFxyUNIRwk0U1OJrqZ8o6w0Aifm l+xbSlSVpugkuAPM1nfR0M/n52hkMzoYgaLsDSN+uqSDuSxKuLtBz5Sq388SCaSF+ZMir iu7U4EPa2HRJJitwrgOiA1eSzoH3kwjPq7CJekNiEGrJ16X03pEGlWT4qbrTv+yZOVaym w5ETPpRJKU+CbyrUj1T1x8oxhHoCEhUWP7shVLTq+uuWgApIy4BHI54/NS++xma3N/50F pqonTWxCLxr09CYVvYL5ASq/bwmPgTwYaLyYtAZXw3IyybM0jwYPc0wNmTklCZiI+iA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795117278; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; bh=ErhRgV/YsEwprii/iEkN9e5sYE/6u/us4xd93CvjwiU=; b=LY6mZjD9GKLAsZr0/HQ/K4sA6ouTD9/ILXjXHpt3n89ssNNw7sA8BixB+GhcjmHqvDIb 1h/FOn+UeV/RspYmMEIOdKN6HxGjFjDVQNim6ddqM2sL52GRhiwBWaDeQ6CbotnV0bmrK fJAso9iAsnYyU3Qmw90DJVDVbQmLejYGVbkXVNm3Ue97hn6jwzBnpmXkOppTEwgmKAFS/ AU7fdtAwHRU2ut9lIc88tAebqJSU/jvfQ/n1zPxnV0xuHMb/KQvBMn2s3EQZhmzfn02zu 5rLcpKVFo6CttaPwA6LyUZ6RKVFD6/Yf2Z6PtswBejYnCy2ZxKliG6Wq2qObBmVAKyg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=tnjjK6UX; arc=none smtp.remote-ip=156.67.10.101 X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 34C80606A325; Thu, 19 Nov 2026 19:41:18 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 34C80606A325 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=ErhRgV/YsEwprii/iEkN9e5sYE/6u/us4xd93CvjwiU=; b=tnjjK6UXsgUsUi9KjhJtLPJtsA 8UvqXWr1Srwwx6JUdWlgpyP/ZAKpRvajI6CFOcVdE41Xqwsg5YM5FBk7uvCeH3yUCuwRbdaNtDgV+ dJECyns/rFFHNw4954+sJ3Wa4Pqj5tfTSG6oV48x1OSFhdEE2N01cQlE5eUMoNgnLzKM=; X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from <andrew@lunn.ch>) id 1xU80H-0006qy-Rr; Thu, 19 Nov 2026 20:41:05 +0100 X-Cc: Andrew Lunn <andrew+netdev@lunn.ch>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, linux-usb@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <20261117-aqc111-v1-1-27a54c4b54ca@birger-koblitz.de>