Thread (49 messages) 49 messages, 3 authors, 2021-07-16

RE: [PATCH v10 14/20] dlb: add start domain ioctl

flat view

From: Chen, Mike Ximing <hidden>
Date: 2021-03-10 20:27:38

-----Original Message-----
From: Greg KH <gregkh@linuxfoundation.org>

On Wed, Mar 10, 2021 at 02:45:10AM +0000, Chen, Mike Ximing wrote:
quoted
quoted
-----Original Message-----
From: Greg KH <gregkh@linuxfoundation.org>
On Wed, Feb 10, 2021 at 11:54:17AM -0600, Mike Ximing Chen wrote:
quoted
 {
@@ -232,6 +240,7 @@ struct dlb_device_ops dlb_pf_ops = {
 	.create_dir_queue = dlb_pf_create_dir_queue,
 	.create_ldb_port = dlb_pf_create_ldb_port,
 	.create_dir_port = dlb_pf_create_dir_port,
+	.start_domain = dlb_pf_start_domain,
Why do you have a "callback" when you only ever call one function?  Why
is that needed at all?
In our next submission, we are going to add virtual function (VF) support. The
callbacks for VFs are different from those for PF which is what we support in this
submission. We can defer the introduction of  the callback structure to when we
add the VF support. But since we have many callback functions, that approach
will generate many changes in then "existing" code. We thought that putting
the callback structure in place now would make the job of adding VF support easier.
Is it OK?
No, do not add additional complexity when it is not needed.  It causes
much more review work and I and no one else have any idea that
"something might be coming in the future", so please do not make our
lives harder.

Make it simple, and work, now.  You can always add additional changes
later, if it is ever needed.
Sure. We will remove the callback structure from this patch set.

Thanks for reviewing

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