Netdev List
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, richardcochran@gmail.com,
	viro@zeniv.linux.org.uk, quentin.schulz@bootlin.com,
	atenart@kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] phy: mscc: Fix timestamping for vsc8584
Date: Mon, 4 Aug 2025 13:24:32 +0300	[thread overview]
Message-ID: <20250804102432.lv7pfistwfbql64q@skbuf> (raw)
In-Reply-To: <20250804073940.4wgpstdm53atrbbq@DEN-DL-M31836.microchip.com>

On Mon, Aug 04, 2025 at 09:39:40AM +0200, Horatiu Vultur wrote:
> I think it is a great idea. I can map struct vsc8531_skb directly on
> skb->cb and then drop the allocation.

Ok.

Another set of suggestions on the patch, all regarding list processing:

1 - shouldn't you use list_add_tail() rather than list_add() towards
    &vsc8531->rx_skbs_list? I am concerned that with multiple RX
    timestampable skbs in flight, you would be processing them in
    "stack" rather than "queue" order, effectively reordering them.

2 - you can use list_move_tail() to move an item from a list to another,
    or you can just call list_splice_tail_init() to move the entire
    contents of &priv->rx_skbs_list onto a separate on-stack list from
    which you later dequeue, and at the same time reinitialize
    &priv->rx_skbs_list to an empty queue. If you do that, you can
    shorten the atomic section with &priv->rx_skbs_lock, to just around
    the list_splice_tail_init() call.

3 - the following:

	struct list_head skbs;

	INIT_LIST_HEAD(&skbs);

can be simplified to:

	LIST_HEAD(skbs);

which combines initialization and declaration.

  reply	other threads:[~2025-08-04 10:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-31 12:19 [PATCH net] phy: mscc: Fix timestamping for vsc8584 Horatiu Vultur
2025-08-01 11:26 ` Vladimir Oltean
2025-08-04  7:39   ` Horatiu Vultur
2025-08-04 10:24     ` Vladimir Oltean [this message]
2025-08-04 10:30       ` Vladimir Oltean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250804102432.lv7pfistwfbql64q@skbuf \
    --to=olteanv@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=atenart@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=quentin.schulz@bootlin.com \
    --cc=richardcochran@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox