From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=193.142.43.55 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== 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== 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 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 ; Tue, 1 Dec 2026 16:17:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AA26E606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de 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 Date: Tue, 1 Dec 2026 17:17:42 +0100 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== 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== From: Sebastian Andrzej Siewior To: netdev-bot+sashiko@kernel.org 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 Subject: Re: [PATCH net-next v13 2/8] hsr: Use skb_clone() while adding the HSR header Message-ID: <20261201161742.2Mm5Lyp6@linutronix.de> References: <20261130-hsr_ptp-v13-2-598326208fc5@linutronix.de> <179611532484.3146.5556869122774544940@kernel.org> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <179611532484.3146.5556869122774544940@kernel.org> 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. >=20 > Critical: 0 =C2=B7 High: 0 =C2=B7 Medium: 1 =C2=B7 Low: 0 >=20 =E2=80=A6 > > @@ -342,33 +341,40 @@ struct sk_buff *hsr_create_tagged_frame(struct hs= r_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 =3D __pskb_copy(frame->skb_std, > > - skb_headroom(frame->skb_std) + HSR_HLEN, GFP_ATOMIC); > > + skb =3D skb_clone(frame->skb_std, GFP_ATOMIC); > > if (!skb) > > return NULL; > > - skb_reset_mac_header(skb); > > > > - if (skb->ip_summed =3D=3D CHECKSUM_PARTIAL) > > - skb->csum_start +=3D 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; >=20 > [Severity: Medium] > Can the HW timestamp requested for these tagged frames ever be delivered? =E2=80=A6 > The timestamp is then dropped. >=20 > 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-requesti= ng > 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. =E2=80=A6 Sebastian