Article View: linux.kernel.netdev
Article #25359Re: [PATCH net-next v13 2/8] hsr: Use skb_clone() while adding the HSR header
From: Sebastian Andrzej Siewior
Date: Tue, 01 Dec 2026 16:17
Date: Tue, 01 Dec 2026 16:17
52 lines
11545 bytes
11545 bytes
On 2026-12-01 08:55:24 [+0000], netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue(s) to consider.
>
> Critical: 0 · High: 0 · Medium: 1 · Low: 0
>
…
> > @@ -342,33 +341,40 @@ struct sk_buff *hsr_create_tagged_frame(struct hsr_frame_info *frame,
> > /* set the lane id properly */
> > hsr_set_path_id(frame, hsr_ethhdr, port);
> > return skb_clone(frame->skb_hsr, GFP_ATOMIC);
> > - } else if (port->dev->features & NETIF_F_HW_HSR_TAG_INS) {
> > - return skb_clone(frame->skb_std, GFP_ATOMIC);
> > }
> >
> > - /* Create the new skb with enough headroom to fit the HSR tag */
> > - skb = __pskb_copy(frame->skb_std,
> > - skb_headroom(frame->skb_std) + HSR_HLEN, GFP_ATOMIC);
> > + skb = skb_clone(frame->skb_std, GFP_ATOMIC);
> > if (!skb)
> > return NULL;
> > - skb_reset_mac_header(skb);
> >
> > - if (skb->ip_summed == CHECKSUM_PARTIAL)
> > - skb->csum_start += HSR_HLEN;
> > + if (port->dev->features & NETIF_F_HW_HSR_TAG_INS)
> > + return skb;
> > +
> > + /* Ensure the cloned skb has enough headroom to fit the HSR tag */
> > + if (skb_cow_head(skb, skb_metadata_len(skb) + HSR_HLEN))
> > + goto err;
>
> [Severity: Medium]
> Can the HW timestamp requested for these tagged frames ever be delivered?
…
> The timestamp is then dropped.
>
> The path is hsr_dev_xmit() -> hsr_forward_skb() -> hsr_forward_do() ->
> hsr_create_tagged_frame() -> hsr_xmit() -> dev_queue_xmit(). If HW TX
> timestamping is enabled on the slave NICs, could every timestamp-requesting
> frame sent through hsr0 use the TX timestamp resource on both ports for
> nothing? On drivers with a single outstanding TX timestamp slot, could
> this cause real PTP frames on that port to lose their timestamps?
The socket is attached later in the series. It is possible to forward
the timestamp properly within this series.
…
Sebastian
Technical Details
Message-ID:
<20261201161742.2Mm5Lyp6@linutronix.de>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375208-linux-kernel-netdev=dewy.ruReferences:
<20261130-hsr_ptp-v13-2-598326208fc5@linutronix.de> <179611532484.3146.5556869122774544940@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375208-linux-kernel-netdev=dewy.ru From: bigeasy@linutronix.de (Sebastian Andrzej Siewior) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v13 2/8] hsr: Use skb_clone() while adding the HSR header Date: Tue, 1 Dec 2026 17:17:42 +0100 Organization: Usenet Network Message-ID: <20261201161742.2Mm5Lyp6@linutronix.de> References: <20261130-hsr_ptp-v13-2-598326208fc5@linutronix.de> <179611532484.3146.5556869122774544940@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: usenet.network; logging-data="1762174"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:qKTYVMdYT/DNFEQ/vob72ElfhgI= sha256:EbBsB+w2qV2H8S3aGl2uvXWY39/iVgw+54xtqrVASBc= sha1:ugAJauZnw/nf2VkyW9LU2uY65c4= sha256:yU++b+IvgON8bsSuYUuPp+gBd5uIEQa9OKs+VMv/O48= 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 9BA19117410; Tue, 1 Dec 2026 19:18:11 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.05 X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, 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 (2048-bit key) header.d=linutronix.de header.b=h6T8TkD6; dkim=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=linutronix.de header.b=nG8P2SGs 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 uTEu3BNKo0yA; Tue, 1 Dec 2026 19:18:04 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-375208-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linutronix.de X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id DC11811740E; Tue, 1 Dec 2026 19:17:49 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 380FC283EB; Tue, 1 Dec 2026 16:17:48 +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=1796141868; b=UrLJdzxxtsGZ/qc01+ajHEGU+7mcWRNDFQfJvk1+uesY5zgkB5v5F00YT2hnntKiHdcC lSdVCyl6K5SsqcnjIKx8p+L5s5WuNHJnI5Mt8EfZK/KAPVzHLkjEvQipyyr6H0qukhPPE 6CU2h3940cPKyepuIL2xJEfkqHIsOF0f/GlcVKZuWXa1+zlkdOuNSwBDxocAyk0bTDc2B MLCrwQil6TsJ/L9SSHUPrEiUktgZYfKYDmgOtC7W/wA7ahZOrRlVjxTW8ryvmHl7x3IXl SrecEhNZjnccCNG4Rt2fUusL8idz1bwhcsudh9aq2SuXuGKxoPYtcNJb/pO1B8KQE4A== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796141868; h=X-Original-To:Received:DMARC-Filter:Date:DKIM-Signature: DKIM-Signature: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:Content-Transfer-Encoding:In-Reply-To; bh=rAkPc8wX8wwfga+cIdTomzEkO3vLwNV3JphX8uJvjDc=; b=rphK0pbOxPhV5nxqwfJqCLhwPu6c0dW9DnLOOVyqLk8/EwrnXhAMJP37eAFKiNhv2bH3 QKBFjOmBBHo546GORSEb8OpB4SLXhl4cgDaGg4T8w+n0iMrjUAAAcAH7izwSafTQddYsB x3C74tybSXMlj+9/6XWEhbGenVbs9KNI+okbTRmFMOD/gG3U+G//QeZxb39sgDC3fqi41 2LjLxLyZBivQZ73xdn6QG5viVAZj/FZtVZavayNSvYe27mCGMaR4tv3oqeQDF3+PVXw71 RGUJ+6iQAlVl5kDebYcSjUIE9NrI2ZCmD4nBF6B6v+fNzz02lY03BOlUVgakbhKg1rg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=h6T8TkD6; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=nG8P2SGs; dmarc=pass header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; 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 0970C606A32A; Tue, 1 Dec 2026 16:17:48 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=h6T8TkD6; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=nG8P2SGs X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=193.142.43.55 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796141867; b=fbLygUY8q4r77XWwLdCdYIDgkZOU+2EhS85KwoQMdjO2+KEaSvhspJXCQaIOYkaq1Vxm 1DuPegi/drVe2owejiNTNQ+5jlczvuam3pPy087O2LmA5QPCWRRglpo3lN10p2Fo3v/9a 6fPaOyZy5XarDhEf2qu95jg5W/Jf8yYHi8NUwB99ReR2MF/f9u6NZm2lP01mz1egB1fYA W3Su3/146NrHbLHGGZTlITaxw6h1ARIOZ8RS1ip90k7KoTJDvgF3qFSCLBu99JcWiVpWR VKjIaXte8CX6QenjGDInGH/hndC+8rJDwKdD91hblCG/fnbRREckxy8y03/OBHBrJWw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796141867; h=DMARC-Filter:Date:DKIM-Signature:DKIM-Signature:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=rAkPc8wX8wwfga+cIdTomzEkO3vLwNV3JphX8uJvjDc=; b=ICjXXPYFlEHW30AdYgwB6hxIvrh+UY0WHup7yJpps33X+khE0KWKyWVZGkcZLifgDR3K jRmPLrtorqYGdKLCGISxlo3oqhczvQF3l6mSN0RkjjtxyTsl0ajxv2QVG4kPeeDKWzXJm 2Tll3YXKFs74PNkNNpvjWFagd4VW/W8yic8NPeTjhPuvj+WAaecdYETEJ6vmZFh9epiPn MmusI1YNvP5lQj7LnY+KYhI9bp/msxWfR7uexf6nfj3SUq6GyFpdmoJ3KaSbKzfkx6u7D eXLlKg7oksfH4r9W5Sx9J4bh9wIC1jAW8Bs3yK801pAnvBQgO/Sk88hv5nwYE0sZ9SA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=h6T8TkD6; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=nG8P2SGs; arc=none smtp.remote-ip=193.142.43.55 X-Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA26E606A31A for <netdev@vger.kernel.org>; Tue, 1 Dec 2026 16:17:46 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AA26E606A31A X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1796141864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rAkPc8wX8wwfga+cIdTomzEkO3vLwNV3JphX8uJvjDc=; b=h6T8TkD6knVDwxa8oaSFHo8PRc0nv6VW6zGU6a9SWhkysaCZEx708UZngN6jLQOkDPe+SM HTgJAP05rhVL8OJCra540HDff4a/6fV3DT1Dtd7bwQesKTWXDA2Wn3hmOEHLAmJXMWszAT jLboiX45kVlwv6eadvAQnHICj54WxEc+4PhdfZp7pP1C87YRk07jZI+N9Ymp65RLk15yQg wfn2jdrJgoSWxo35L50jVXInu00Qliv3nPzp/m8jsZBSiVu9gp/BmfoMRsTvCSSGMq635L GJp8Zd9d4wo9jY9tIbJ/kGQrE6IWcjTHbZIn6YNrWRNQpsVG30gWZl/w4d1oLQ== X-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1796141864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rAkPc8wX8wwfga+cIdTomzEkO3vLwNV3JphX8uJvjDc=; b=nG8P2SGsrYe0un7fynb0UkbrahQGr1Y588f6RRsGXX8v3poMKasVfAPxBf91PfVgki2VyD WVYAuW8Au/GhdLAQ== X-Cc: netdev@vger.kernel.org, j-rameshbabu@ti.com, andrew+netdev@lunn.ch, danishanwar@ti.com, d-qiu@ti.com, davem@davemloft.net, fmaurer@redhat.com, kuba@kernel.org, neelima@ti.com, pabeni@redhat.com, praneeth@ti.com, pratheesh@ti.com, richardcochran@gmail.com, horms@kernel.org, vigneshr@ti.com, willemdebruijn.kernel@gmail.com, daniel.machon@microchip.com, edumazet@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: <179611532484.3146.5556869122774544940@kernel.org>