-
-
usr/src/uts/common/io/i40e/i40e_main.c (Diff revision 1) We should call i40e_check_acc_handle here to make sure that we didn't end up with an invalid PCI read and get a bogus number of interrupts that we request. While we generally check this at the end of various processes, it's worthwhile to do it here before we attempt to request something ridiculous from the OS.
-
usr/src/uts/common/io/i40e/i40e_main.c (Diff revision 1) Is there any particular reason that you decided to limit this to the number of allocated interrupts as opposed to ixgbe which round robins the rings across multiple interrupts? I don't think there's anything we need to change at this phase, just curious to understand why.
-
usr/src/uts/common/io/i40e/i40e_main.c (Diff revision 1) There's nothing that guarantees that this value is a power of 2. Shouldn't we be rounding this up to the nearest power of 2 before we try and find the largest set bit. For example, if we have 17 queues, ddi_fls() will only return 16, which would be an incorrect number. If we have to enable traffic classes, then this also suggests that we need to actually put a cap on the number of interrupts or transmit queue pairs that we end up using to make sure that we are within the power of two and don't exceed 64 (the maximum value that can be put in this register).
-
usr/src/uts/common/io/i40e/i40e_main.c (Diff revision 1) I really don't want to follow the model of the other drivers and have an ifdef for this support. This is also the only occurrence of this. Either we know this will work for the 722 and we shouldn't ifdef it or we should remove it all. Since we're going to have to do other work for the 722, I think we should remove this for now and add a comment that the 722 hardware needs to be set up differently.
-
usr/src/uts/common/io/i40e/i40e_main.c (Diff revision 1) Why should we use the existing value in the register here to determine what the hashing is? Given that it's initialized to zero, if for some reason it was non-zero, what would have caused that and why would we want to use that?
-
usr/src/uts/common/io/i40e/i40e_main.c (Diff revision 1) Please do not use a blocking allocation here, please use KM_NOSLEEP and handle failure. This is happening in the context of the GLDv3 mc_start(9E) entry point, which can be at an arbitrary point in the kernel's lifetime. The surrounding callers all use KM_NOSLEEP.
-
-
One thing I'm worried about is the departure from the FreeBSD source of the core files this incurs. On a purely technical level, I'm not bothered by the changes to files under
i40e/core
, but the one thing I am worried about is these external-to-FreeBSD changes getting lost or mangled in the future when any updates pulled in from FreeBSD.Maybe leave a breadcrumb of some sort, or create something akin to a
#ifdef ILLUMOS
and wrap these changes in it? Is this even something worth worrying about?
-
-
usr/src/uts/common/io/i40e/i40e_main.c (Diff revision 2) There is a typo here. It should say 2^^6 = 64