> -----Original Message-----
> From: David Marchand <[email protected]>
> Sent: Wednesday, December 15, 2021 3:55 PM
> To: Ilya Maximets <[email protected]>
> Cc: Van Haaren, Harry <[email protected]>; [email protected];
> Stokes, Ian <[email protected]>; Amber, Kumar <[email protected]>
> Subject: Re: [PATCH v3] dpif-netdev: Call cpuid for x86 isa availability.
>
> On Tue, Dec 7, 2021 at 12:30 AM Ilya Maximets <[email protected]> wrote:
> > > 3) Lack of constructor functions eases portability (DPDK & Windows has
> > > issues
> with constructors IIUC)
> > OVS uses constructors for coverage counters, logs, and for
> > some sockets. The last one is actually exclusively on
> > Windows. And that never was a problem, AFAIK.
>
> +1
>
>
> I'll keep the current implementation, but respin with an ovs_assert()
> where needed as agreed previously.
> More high level logs might be added in dpif in the future.
Hi Ilya & David,
Sorry, I'm not following what we are trying to achieve here. My understanding
as follows;
- David sends patch to change the CPU detection to be in OVS, using CPUID impl
(~ like DPDK)
- I raised concerns, suggesting an alternative implementation still using CPUID
but better logging
- Ilya raises concerns around using CPUID "as a whole", and notes that
constructors on Windows are OK
- [About a week goes by, I was waiting for technical input/response from David]
- David suggests "OK, will keep current implementation" (with minor
modifications for assert)
What about the outstanding reviews & community input?
I took the time to review, propose an alternative impl, write the pseudo-code
to assist, and listed
benefits of that implementation. Why is this technical input not being taken
into account?
(pasted again below the line for reference)
Equally, we should decide on what to do about using /proc/cpuinfo, as per
Ilya's suggestion.
Personally, I think it a different approach, with perhaps other caveats that I
don't know. I like
tried-and-tested solutions, so am comfortable with moving in "small steps" and
changing from DPDK
based implementation to OVS-with-CPUID implementation. Changing to totally
different approach
would require more effort, and I don't have much time for that at the moment.
Regards, -Harry
________________________
Previously proposed solution, which has not been reviewed/discussed in detail:
static int cpuid_check_done;
void do_cpuid_check() {
/* execute cpuid, run through all OVS-known ISA, VLOG() and store results.
*/
cpuid_check_done = 1;
}
int check_isa( isa_type ) {
if (OVS_UNLIKELY( ! cpuid_check_done )) {
do_cpuid_check()
}
return isa_available[isa_type];
}
Benefits;
1) When user executes command to use ISA, ISA checks are executed, VLOG
executes too
2) OVS-appctl (etc) which do not call "check_isa()" will not run CPUID, and not
VLOG either.
3) Lack of constructor functions eases portability (DPDK & Windows has issues
with constructors IIUC)
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev