Thread (20 messages) flat view 20 messages, 4 authors, 2024-06-28

Re: [PATCH v6 net-next 3/9] net: ethtool: record custom RSS contexts in the XArray

From: Edward Cree <ecree.xilinx@gmail.com>
Date: 2024-06-27 14:25:01

On 26/06/2024 10:05, Przemek Kitszel wrote:
On 6/25/24 15:39, Edward Cree wrote:
quoted
On 20/06/2024 07:32, Przemek Kitszel wrote:
quoted
why no error code set?
Because at this point the driver *has* created the context, it's
  in the hardware.  If we wanted to return failure we'd have to
  call the driver again to delete it, and that would still leave
  an ugly case where that call fails.
driver is creating both HW context and ID at the same time, after
you call it from ethtool, eh :(

then my only concern is why do we want to keep old context instead of
update? (my only and last concern for this series by now)
say dumb driver always says "ctx=1" because it does not now better,
but wants to update the context
Tbh I'm not sure there's a clear case either way, if driver is
 screwing up we don't know why or how.  The old context could
 still be present too for all we know.  So my preference is to
 say "we don't know what happened, let's just not touch the
 xarray at all".
In any case the WARN_ON should hopefully quickly catch any
 drivers that are hitting this, and going forward new drivers
 using this API shouldn't get added.

If you still feel strongly this should be changed, please
 elaborate further on the reasoning.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help