From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D842423EA8A for ; Fri, 20 Feb 2026 15:45:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771602343; cv=none; b=FUUu0pWq+9B1WLifD0Fm+fqidg9h6bjO7/phrS6xyaMvmt0u+GeL/2g0TQhlN+/mLZLUuIdhas4n/f+uWzisKnjarsPTQ9Be0WrpKaD3OBfwkUZSdgwjsySFmexeY8ODiyj/3r4Fnf9mCnDznHTVu5wSNz62ocIkh2C0lsPGoL0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771602343; c=relaxed/simple; bh=iEaB2BYxr5VrVKzcPcGHtBvWRVFPeRc8QGQ8pjXNTSk=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=mCT8T+qVAJ44AO1OHUumNntrXzqcB86+oOCi3PsLueVFT6Ff5wg2UH4A+v28vQ/bnPBiSLVWJZeJK/2rEITqpHYVsYPiSOW7a+IO/lrROksiR58tfOuQfHIUOcvAJGVVJxgaoYFVOZsqxD8UuTTugotK1T7vQJ3nS5KFNDY04zo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=pKW6eCbc; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="pKW6eCbc" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id E5878C16540; Fri, 20 Feb 2026 15:45:51 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id DB7035FA8F; Fri, 20 Feb 2026 15:45:38 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 6C84310368D3F; Fri, 20 Feb 2026 16:45:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1771602338; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=abi9yTKt/lNy8gDC78zkCbAwrbxZIVdBIOqfAJRHwiM=; b=pKW6eCbctldTsEnBNJEER5XRRTk708VER/oIvIabwdaM8bKexv3h+v30Rr528dIxLqo48a 1018bqxzfT1N9SO35iJBAPhidjNrewpVkZ3Wy2LwvFrv1Qr54QLJya/4zGTdOdtL9Ms+Cm 22FDUNiWkfDxX/q+CUa0+cnZzIKNhi3BZf0VVc3qJy01xbi+nLWSWE2zthQrwruuef/hLa I91Z5ytmYwfKrBBTaW9eNMxyB5hi+s2U44pjK7ts5Lyb8J5XqqrmjQ8PgfHeCUm672P3Bo 6lZCmjjh/5LcK8RmYLSLu/EZqUfbSp8CMDUvLEoumJRArjoVx48fh5c+sx6eqA== Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 20 Feb 2026 16:45:33 +0100 Message-Id: Subject: Re: [PATCH net-next 3/8] cadence: macb: Add page pool support handle multi-descriptor frame rx Cc: "Nicolas Ferre" , "Claudiu Beznea" , "Andrew Lunn" , "David S. Miller" , "Eric Dumazet" , "Jakub Kicinski" , "Paolo Abeni" , "Lorenzo Bianconi" , =?utf-8?q?Th=C3=A9o_Lebrun?= , =?utf-8?q?Gr=C3=A9gory_Clement?= , "Thomas Petazzoni" To: "Paolo Valerio" , From: =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: aerc 0.21.0-0-g5549850facc2 References: <20260115222531.313002-1-pvalerio@redhat.com> <20260115222531.313002-4-pvalerio@redhat.com> In-Reply-To: <20260115222531.313002-4-pvalerio@redhat.com> X-Last-TLS-Session-Version: TLSv1.3 On Thu Jan 15, 2026 at 11:25 PM CET, Paolo Valerio wrote: > @@ -1382,58 +1381,117 @@ static int gem_rx(struct macb_queue *queue, stru= ct napi_struct *napi, > #if defined(DEBUG) && defined(VERBOSE_DEBUG) > - netdev_vdbg(bp->dev, "received skb of length %u, csum: %08x\n", > - skb->len, skb->csum); > - print_hex_dump(KERN_DEBUG, " mac: ", DUMP_PREFIX_ADDRESS, 16, 1, > - skb_mac_header(skb), 16, true); > - print_hex_dump(KERN_DEBUG, "data: ", DUMP_PREFIX_ADDRESS, 16, 1, > - skb->data, 32, true); > + netdev_vdbg(bp->dev, "received skb of length %u, csum: %08x\n", > + queue->skb->len, queue->skb->csum); > + print_hex_dump_debug(" mac: ", DUMP_PREFIX_ADDRESS, 16, 1, > + skb_mac_header(queue->skb), 16, true); > + print_hex_dump_debug("buff_head: ", DUMP_PREFIX_ADDRESS, 16, 1, > + buff_head, 32, true); > #endif I think the print_hex_*() calls need some updating. The first call prints the MAC header (which is sensible) but the second one prints the first 32 bytes of buff_head, which points to the headroom. I have been using those calls today to debug something on a new platform, and I replaced it by: #if defined(DEBUG) && defined(VERBOSE_DEBUG) BUG_ON(!first_frame); netdev_vdbg(bp->dev, "received skb of length %u (len %d), csum: %0= 8x\n", queue->skb->len, data_len, queue->skb->csum); print_hex_dump_debug("buffer: ", DUMP_PREFIX_ADDRESS, 16, 1, buff_head + bp->rx_headroom, data_len, true); #endif So I replaced it by a single call that prints the full buffer. - It prints packets in their entirety, in a single call. Being a single call is important because then with scripting it can be imported into wireshark. Yes this is ugly but tcpdump is too late for my debugging needs. - This does not work if an SKB spans >1 frame, which is why I put the BUG_ON() call. It is fine for my usecase but upstream might need something more resistant. Here is one proposal for upstream: - We move the printk from last_frame to first_frame. That way the debugging code avoids dealing with fragmentation. - We print `buff_head + bp->rx_headroom` with a size of `min(=C2=B164, data_len)`, to avoid printing full packets. I can deal with it if you want. If I do, you should probably drop the print_hex_dump_debug() calls in your series because they are broken as-is. Or you do it, as you want! Thanks, -- Th=C3=A9o Lebrun, Bootlin Embedded Linux and Kernel engineering https://bootlin.com