Re: [PATCH net-next v7 10/10] net: ethtool: Introduce ethtool command to list ports
From: Jakub Kicinski
Date: Thu Mar 19 2026 - 10:53:56 EST
On Thu, 19 Mar 2026 10:27:11 +0100 Maxime Chevallier wrote:
> > GENL_REQ_ATTR_CHECK ?
> > I guess you'll have to move it to prepare cause we don't get info
> > here :(
>
> Sorry for my comments coming apart on your review, I'm getting this new
> iteration done in-between other tasks :(
>
> I can't move that check to the prepare_data() step, as we need the
> request->port_id field to be populated at that stage for the DUMP
> op (for each port, we set request->port_id, then we call prepare_data
> and so on).
Not sure I get what you're saying - that it doesn't work or that it
leads to "duplicated" work? Alternative is to add info to parse_request
args which I suspect is useful long term anyway.