Thread (24 messages) 24 messages, 4 authors, 2021-09-29

Re: [PATCH net-next v1 4/5] net/mlx5: Register separate reload devlink ops for multiport device

From: Leon Romanovsky <leon@kernel.org>
Date: 2021-09-29 15:24:52
Also in: intel-wired-lan, linux-omap, linux-rdma, linux-staging, lkml

On Wed, Sep 29, 2021 at 07:35:51AM -0700, Jakub Kicinski wrote:
On Wed, 29 Sep 2021 17:31:04 +0300 Leon Romanovsky wrote:
quoted
On Wed, Sep 29, 2021 at 07:26:31AM -0700, Jakub Kicinski wrote:
quoted
On Wed, 29 Sep 2021 17:16:28 +0300 Leon Romanovsky wrote:  
quoted
devlink_ops pointer is not constant at this stage, so why can't I copy
reload_* pointers to the "main" devlink ops?

I wanted to avoid to copy all pointers.  
Hm. I must be missing a key piece here. IIUC you want to have different
ops based on some device property. But there is only one

static struct devlink_ops mlx5_devlink_ops;

so how can two devlink instances in the system use that and have
different ops without a copy?  
No, I have two:
* Base ops - mlx5_devlink_ops
* Extra reload commands - mlx5_devlink_reload
Still those are global for the driver, no?
Ugh, yes
What if you have multiple NICs or whatever.
I missed it and always tested with one device L(.

I'll add copy-all-ops code.

Thanks
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help