fix issues with using AVX-512 drivers on 32-bit
cover fix issues with using AVX-512 drivers on 32-bit
The AVX-512 copy code in multiple drivers was incorrect for 32-bit as it assumed that each pointer was always 8B in size.
Bruce Richardson (4):
net/i40e: fix AVX-512 pointer copy on 32-bit
net/ice: fix AVX-512 pointer copy on 32-bit
net/iavf: fix AVX-512 pointer copy on 32-bit
common/idpf: fix AVX-512 pointer copy on 32-bit
drivers/common/idpf/idpf_common_rxtx_avx512.c | 7 +++++++ drivers/net/i40e/i40e_rxtx_vec_avx512.c | 7 +++++++ drivers/net/iavf/iavf_rxtx_vec_avx512.c | 7 +++++++ drivers/net/ice/ice_rxtx_vec_avx512.c | 7 +++++++ 4 files changed, 28 insertions(+)
--
2.43.0
PATCH 1/4 net/i40e: fix AVX-512 pointer copy on 32-bit
The size of a pointer on 32-bit is only 4 rather than 8 bytes, so copying 32 pointers only requires half the number of AVX-512 load store operations.
--- drivers/net/i40e/i40e_rxtx_vec_avx512.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/net/i40e/i40e_rxtx_vec_avx512.c +7 -0
@@ -799,6 +799,7 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)uint32_t copied =0 ;/* n is multiple of 32 */ while (copied < n) { +#ifdef RTE_ARCH_64 const __m512i a =_mm512_load_si512 (&txep[copied]);const __m512i b =_mm512_load_si512 (&txep[copied +8 ]);const __m512i c =_mm512_load_si512 (&txep[copied +16 ]);
@@ -808,6 +809,12 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)_mm512_storeu_si512 (&cache_objs[copied +8 ], b);_mm512_storeu_si512 (&cache_objs[copied +16 ], c);_mm512_storeu_si512 (&cache_objs[copied +24 ], d); +#else +const __m512i a =_mm512_load_si512 (&txep[copied]); +const __m512i b =_mm512_load_si512 (&txep[copied +16 ]); +_mm512_storeu_si512 (&cache_objs[copied], a); +_mm512_storeu_si512 (&cache_objs[copied +16 ], b); +#endif copied +=32 ; } cache->len += n;
Signature · 1 line
2.43.0
RE: [PATCH 1/4] net/i40e: fix AVX-512 pointer copy on 32-bit
Quoted 40 lines
The size of a pointer on 32-bit is only 4 rather than 8 bytes, so copying 32 pointers only requires half the number of AVX-512 load store operations.
Fixes 5171b4ee6b6b ("net/i40e: optimize Tx by using AVX512")Signed-off-by Bruce Richardson <[email protected]>--- drivers/net/i40e/i40e_rxtx_vec_avx512.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/net/i40e/i40e_rxtx_vec_avx512.c +1
-0@@ -799,6 +799,7 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)uint32_t copied =0 ;/* n is multiple of 32 */ while (copied < n) { +#ifdef RTE_ARCH_64 const __m512i a =_mm512_load_si512 (&txep[copied]);const __m512i b =_mm512_load_si512 (&txep[copied +8 ]);const
__m512ic = _mm512_load_si512(&txep[copied +
16]);drivers/net/i40e/i40e_rxtx_vec_avx512.c +6
-0@@ -808,6 +809,12 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)_mm512_storeu_si512 (&cache_objs[copied +8 ], b);_mm512_storeu_si512 (&cache_objs[copied +16 ], c);_mm512_storeu_si512 (&cache_objs[copied +24 ], d); +#else +const __m512i a =_mm512_load_si512 (&txep[copied]); +const __m512i b =_mm512_load_si512 (&txep[copied +16 ]); +_mm512_storeu_si512 (&cache_objs[copied], a); +_mm512_storeu_si512 (&cache_objs[copied +16 ], b); +#endif copied +=32 ; }
Quoted 3 lines
cache->len+= n;
--
2.43.0
Looks good to me, ACKED.
Thanks
Ian
PATCH 2/4 net/ice: fix AVX-512 pointer copy on 32-bit
In reply to Bruce RichardsonThe size of a pointer on 32-bit is only 4 rather than 8 bytes, so copying 32 pointers only requires half the number of AVX-512 load store operations.
--- drivers/net/ice/ice_rxtx_vec_avx512.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/net/ice/ice_rxtx_vec_avx512.c +7 -0
@@ -907,6 +907,7 @@ ice_tx_free_bufs_avx512(struct ice_tx_queue *txq)uint32_t copied =0 ;/* n is multiple of 32 */ while (copied < n) { +#ifdef RTE_ARCH_64 const __m512i a =_mm512_loadu_si512 (&txep[copied]);const __m512i b =_mm512_loadu_si512 (&txep[copied +8 ]);const __m512i c =_mm512_loadu_si512 (&txep[copied +16 ]);
@@ -916,6 +917,12 @@ ice_tx_free_bufs_avx512(struct ice_tx_queue *txq)_mm512_storeu_si512 (&cache_objs[copied +8 ], b);_mm512_storeu_si512 (&cache_objs[copied +16 ], c);_mm512_storeu_si512 (&cache_objs[copied +24 ], d); +#else +const __m512i a =_mm512_loadu_si512 (&txep[copied]); +const __m512i b =_mm512_loadu_si512 (&txep[copied +16 ]); +_mm512_storeu_si512 (&cache_objs[copied], a); +_mm512_storeu_si512 (&cache_objs[copied +16 ], b); +#endif copied +=32 ; } cache->len += n;
Signature · 1 line
2.43.0
RE: [PATCH 2/4] net/ice: fix AVX-512 pointer copy on 32-bit
Quoted 34 lines
The size of a pointer on 32-bit is only 4 rather than 8 bytes, so copying 32 pointers only requires half the number of AVX-512 load store operations.
Fixes a4e480de268e ("net/ice: optimize Tx by using AVX512")Signed-off-by Bruce Richardson <[email protected]>--- drivers/net/ice/ice_rxtx_vec_avx512.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/net/ice/ice_rxtx_vec_avx512.c +2
-0@@ -907,6 +907,7 @@ ice_tx_free_bufs_avx512(struct ice_tx_queue *txq) uint32_t copied = 0; /* n is multiple of 32 */ while (copied < n) { +#ifdef RTE_ARCH_64 const __m512i a = _mm512_loadu_si512(&txep[copied]); const __m512i b = _mm512_loadu_si512(&txep[copied + 8]); const __m512i c = _mm512_loadu_si512(&txep[copied +16]);
drivers/net/ice/ice_rxtx_vec_avx512.c +2
-0@@ -916,6 +917,12 @@ ice_tx_free_bufs_avx512(struct ice_tx_queue *txq)_mm512_storeu_si512 (&cache_objs[copied +8 ], b);_mm512_storeu_si512 (&cache_objs[copied +16 ], c);_mm512_storeu_si512 (&cache_objs[copied +24 ], d); +#else + const __m512i a =
drivers/net/ice/ice_rxtx_vec_avx512.c ice_tx_free_bufs_avx512(struct ice_tx_queue *txq)
Quoted 10 lines
drivers/net/ice/ice_rxtx_vec_avx512.c +5
-1_mm512_loadu_si512 (&txep[copied]); +const __m512i b =_mm512_loadu_si512 (&txep[copied + 16]); +_mm512_storeu_si512 (&cache_objs[copied], a); +_mm512_storeu_si512 (&cache_objs[copied +16 ], b); +#endif copied +=32 ; } cache->len += n; --
LGTM, Acked.
Thanks
Ian
PATCH 3/4 net/iavf: fix AVX-512 pointer copy on 32-bit
In reply to Bruce RichardsonThe size of a pointer on 32-bit is only 4 rather than 8 bytes, so copying 32 pointers only requires half the number of AVX-512 load store operations.
--- drivers/net/iavf/iavf_rxtx_vec_avx512.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/net/iavf/iavf_rxtx_vec_avx512.c +7 -0
@@ -1892,6 +1892,7 @@ iavf_tx_free_bufs_avx512(struct iavf_tx_queue *txq)uint32_t copied =0 ;/* n is multiple of 32 */ while (copied < n) { +#ifdef RTE_ARCH_64 const __m512i a =_mm512_loadu_si512 (&txep[copied]);const __m512i b =_mm512_loadu_si512 (&txep[copied +8 ]);const __m512i c =_mm512_loadu_si512 (&txep[copied +16 ]);
@@ -1901,6 +1902,12 @@ iavf_tx_free_bufs_avx512(struct iavf_tx_queue *txq)_mm512_storeu_si512 (&cache_objs[copied +8 ], b);_mm512_storeu_si512 (&cache_objs[copied +16 ], c);_mm512_storeu_si512 (&cache_objs[copied +24 ], d); +#else +const __m512i a =_mm512_loadu_si512 (&txep[copied]); +const __m512i b =_mm512_loadu_si512 (&txep[copied +16 ]); +_mm512_storeu_si512 (&cache_objs[copied], a); +_mm512_storeu_si512 (&cache_objs[copied +16 ], b); +#endif copied +=32 ; } cache->len += n;
Signature · 1 line
2.43.0
PATCH 4/4 common/idpf: fix AVX-512 pointer copy on 32-bit
In reply to Bruce RichardsonThe size of a pointer on 32-bit is only 4 rather than 8 bytes, so copying 32 pointers only requires half the number of AVX-512 load store operations.
--- drivers/common/idpf/idpf_common_rxtx_avx512.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/common/idpf/idpf_common_rxtx_avx512.c +7 -0
@@ -1043,6 +1043,7 @@ idpf_tx_singleq_free_bufs_avx512(struct idpf_tx_queue *txq)uint32_t copied =0 ;/* n is multiple of 32 */ while (copied < n) { +#ifdef RTE_ARCH_64 const __m512i a =_mm512_loadu_si512 (&txep[copied]);const __m512i b =_mm512_loadu_si512 (&txep[copied +8 ]);const __m512i c =_mm512_loadu_si512 (&txep[copied +16 ]);
@@ -1052,6 +1053,12 @@ idpf_tx_singleq_free_bufs_avx512(struct idpf_tx_queue *txq)_mm512_storeu_si512 (&cache_objs[copied +8 ], b);_mm512_storeu_si512 (&cache_objs[copied +16 ], c);_mm512_storeu_si512 (&cache_objs[copied +24 ], d); +#else +const __m512i a =_mm512_loadu_si512 (&txep[copied]); +const __m512i b =_mm512_loadu_si512 (&txep[copied +16 ]); +_mm512_storeu_si512 (&cache_objs[copied], a); +_mm512_storeu_si512 (&cache_objs[copied +16 ], b); +#endif copied +=32 ; } cache->len += n;
Signature · 1 line
2.43.0
Quoted 9 lines
The AVX-512 copy code in multiple drivers was incorrect for 32-bit as it assumed that each pointer was always 8B in size.
Bruce Richardson (4):
net/i40e: fix AVX-512 pointer copy on 32-bit
net/ice: fix AVX-512 pointer copy on 32-bit
net/iavf: fix AVX-512 pointer copy on 32-bit
common/idpf: fix AVX-512 pointer copy on 32-bit
Quoted 4 lines
drivers/common/idpf/idpf_common_rxtx_avx512.c | 7 +++++++ drivers/net/i40e/i40e_rxtx_vec_avx512.c | 7 +++++++ drivers/net/iavf/iavf_rxtx_vec_avx512.c | 7 +++++++ drivers/net/ice/ice_rxtx_vec_avx512.c | 7 +++++++
Series looks good to me.
Bruce Richardson
AppliedQuoted 9 lines · Ian
Quoted 9 lines
The AVX-512 copy code in multiple drivers was incorrect for 32-bit as it assumed that each pointer was always 8B in size.
Bruce Richardson (4):
net/i40e: fix AVX-512 pointer copy on 32-bit
net/ice: fix AVX-512 pointer copy on 32-bit
net/iavf: fix AVX-512 pointer copy on 32-bit
common/idpf: fix AVX-512 pointer copy on 32-bit
Quoted 9 lines
Quoted 4 lines
drivers/common/idpf/idpf_common_rxtx_avx512.c | 7 +++++++ drivers/net/i40e/i40e_rxtx_vec_avx512.c | 7 +++++++ drivers/net/iavf/iavf_rxtx_vec_avx512.c | 7 +++++++ drivers/net/ice/ice_rxtx_vec_avx512.c | 7 +++++++Series looks good to me.
Series-acked-by Ian Stokes <[email protected]>
Applied to dpdk-next-net-intel.
/Bruce
Quoted 10 lines · Bruce Richardson
The AVX-512 copy code in multiple drivers was incorrect for 32-bit as it assumed that each pointer was always 8B in size.
Bruce Richardson (4):
net/i40e: fix AVX-512 pointer copy on 32-bit
net/ice: fix AVX-512 pointer copy on 32-bit
net/iavf: fix AVX-512 pointer copy on 32-bit
common/idpf: fix AVX-512 pointer copy on 32-bit
Quoted 5 lines
drivers/common/idpf/idpf_common_rxtx_avx512.c | 7 +++++++ drivers/net/i40e/i40e_rxtx_vec_avx512.c | 7 +++++++ drivers/net/iavf/iavf_rxtx_vec_avx512.c | 7 +++++++ drivers/net/ice/ice_rxtx_vec_avx512.c | 7 +++++++ 4 files changed, 28 insertions(+)
Sorry, not directly related to this series, but as I was checking some AVX512 patch, I suspect some drivers are missing runtime checks for availability of some AVX512 instructions:
$ for meson in $(git grep -l __AVX512[^_]*__
'drivers/**/meson.build'); do dir=$(dirname $meson); for flag in $(git
grep -ho __AVX512[^_]*__ $dir | sort -u); do flag=${flag%%__};
flag=${flag##__}; git grep -ql
rte_cpu_get_flag_enabled.RTE_CPUFLAG_$flag $dir || echo
RTE_CPUFLAG_$flag check missing in $dir; done; doneRTE_CPUFLAG_AVX512BW check missing in drivers/common/idpf RTE_CPUFLAG_AVX512DQ check missing in drivers/common/idpf RTE_CPUFLAG_AVX512F check missing in drivers/common/idpf RTE_CPUFLAG_AVX512VL check missing in drivers/net/i40e RTE_CPUFLAG_AVX512VL check missing in drivers/net/ice
Maybe some flags are implictly available... worth a confirmation from Intel in any case from my pov.
Thanks.
Signature · 1 line
David Marchand
Quoted 29 lines · David Marchand
Quoted 10 lines · Bruce Richardson
The AVX-512 copy code in multiple drivers was incorrect for 32-bit as it assumed that each pointer was always 8B in size.
Bruce Richardson (4):
net/i40e: fix AVX-512 pointer copy on 32-bit
net/ice: fix AVX-512 pointer copy on 32-bit
net/iavf: fix AVX-512 pointer copy on 32-bit
common/idpf: fix AVX-512 pointer copy on 32-bitQuoted 5 lines
drivers/common/idpf/idpf_common_rxtx_avx512.c | 7 +++++++ drivers/net/i40e/i40e_rxtx_vec_avx512.c | 7 +++++++ drivers/net/iavf/iavf_rxtx_vec_avx512.c | 7 +++++++ drivers/net/ice/ice_rxtx_vec_avx512.c | 7 +++++++ 4 files changed, 28 insertions(+)Sorry, not directly related to this series, but as I was checking some AVX512 patch, I suspect some drivers are missing runtime checks for availability of some AVX512 instructions:
$ for meson in $(git grep -l __AVX512[^_]*__ 'drivers/**/meson.build'); do dir=$(dirname $meson); for flag in $(git grep -ho __AVX512[^_]*__ $dir | sort -u); do flag=${flag%%__}; flag=${flag##__}; git grep -ql rte_cpu_get_flag_enabled.RTE_CPUFLAG_$flag $dir || echo RTE_CPUFLAG_$flag check missing in $dir; done; done
Quoted 9 lines
RTE_CPUFLAG_AVX512BWcheck missing indrivers/common/idpfRTE_CPUFLAG_AVX512DQcheck missing indrivers/common/idpfRTE_CPUFLAG_AVX512Fcheck missing indrivers/common/idpfRTE_CPUFLAG_AVX512VLcheck missing indrivers/net/i40eRTE_CPUFLAG_AVX512VLcheck missing indrivers/net/iceMaybe some flags are implictly available... worth a confirmation from Intel in any case from my pov.
I think it would be good practice to explicitly check for all the AVX-512 extensions actually used. Ideally, as a cleanup, we should probably check for those listed (f, bw, dq and vl) once early in the config and reuse that value throughout the build, rather than having each and every PMD continually check them.
/Bruce
Quoted 40 lines · Bruce Richardson
Quoted 29 lines · David Marchand
Quoted 10 lines · Bruce Richardson
The AVX-512 copy code in multiple drivers was incorrect for 32-bit as it assumed that each pointer was always 8B in size.
Bruce Richardson (4):
net/i40e: fix AVX-512 pointer copy on 32-bit
net/ice: fix AVX-512 pointer copy on 32-bit
net/iavf: fix AVX-512 pointer copy on 32-bit
common/idpf: fix AVX-512 pointer copy on 32-bitQuoted 5 lines
drivers/common/idpf/idpf_common_rxtx_avx512.c | 7 +++++++ drivers/net/i40e/i40e_rxtx_vec_avx512.c | 7 +++++++ drivers/net/iavf/iavf_rxtx_vec_avx512.c | 7 +++++++ drivers/net/ice/ice_rxtx_vec_avx512.c | 7 +++++++ 4 files changed, 28 insertions(+)Sorry, not directly related to this series, but as I was checking some AVX512 patch, I suspect some drivers are missing runtime checks for availability of some AVX512 instructions:
$ for meson in $(git grep -l __AVX512[^_]*__ 'drivers/**/meson.build'); do dir=$(dirname $meson); for flag in $(git grep -ho __AVX512[^_]*__ $dir | sort -u); do flag=${flag%%__}; flag=${flag##__}; git grep -ql rte_cpu_get_flag_enabled.RTE_CPUFLAG_$flag $dir || echo RTE_CPUFLAG_$flag check missing in $dir; done; doneQuoted 9 lines
RTE_CPUFLAG_AVX512BWcheck missing indrivers/common/idpfRTE_CPUFLAG_AVX512DQcheck missing indrivers/common/idpfRTE_CPUFLAG_AVX512Fcheck missing indrivers/common/idpfRTE_CPUFLAG_AVX512VLcheck missing indrivers/net/i40eRTE_CPUFLAG_AVX512VLcheck missing indrivers/net/iceMaybe some flags are implictly available... worth a confirmation from Intel in any case from my pov.
Quoted 6 lines
I think it would be good practice to explicitly check for all the AVX-512 extensions actually used. Ideally, as a cleanup, we should probably check for those listed (f, bw, dq and vl) once early in the config and reuse that value throughout the build, rather than having each and every PMD continually check them.
Draft patchset for this now submitted to dev list [1]. Reviews and feedback welcome, as always!
/Bruce
[1] https://patches.dpdk.org/project/dpdk/list/?series=33188
Quoted 41 lines · Bruce Richardson
Quoted 29 lines · David Marchand
Quoted 10 lines · Bruce Richardson
The AVX-512 copy code in multiple drivers was incorrect for 32-bit as it assumed that each pointer was always 8B in size.
Bruce Richardson (4):
net/i40e: fix AVX-512 pointer copy on 32-bit
net/ice: fix AVX-512 pointer copy on 32-bit
net/iavf: fix AVX-512 pointer copy on 32-bit
common/idpf: fix AVX-512 pointer copy on 32-bitQuoted 5 lines
drivers/common/idpf/idpf_common_rxtx_avx512.c | 7 +++++++ drivers/net/i40e/i40e_rxtx_vec_avx512.c | 7 +++++++ drivers/net/iavf/iavf_rxtx_vec_avx512.c | 7 +++++++ drivers/net/ice/ice_rxtx_vec_avx512.c | 7 +++++++ 4 files changed, 28 insertions(+)Sorry, not directly related to this series, but as I was checking some AVX512 patch, I suspect some drivers are missing runtime checks for availability of some AVX512 instructions:
$ for meson in $(git grep -l __AVX512[^_]*__ 'drivers/**/meson.build'); do dir=$(dirname $meson); for flag in $(git grep -ho __AVX512[^_]*__ $dir | sort -u); do flag=${flag%%__}; flag=${flag##__}; git grep -ql rte_cpu_get_flag_enabled.RTE_CPUFLAG_$flag $dir || echo RTE_CPUFLAG_$flag check missing in $dir; done; doneQuoted 9 lines
RTE_CPUFLAG_AVX512BWcheck missing indrivers/common/idpfRTE_CPUFLAG_AVX512DQcheck missing indrivers/common/idpfRTE_CPUFLAG_AVX512Fcheck missing indrivers/common/idpfRTE_CPUFLAG_AVX512VLcheck missing indrivers/net/i40eRTE_CPUFLAG_AVX512VLcheck missing indrivers/net/iceMaybe some flags are implictly available... worth a confirmation from Intel in any case from my pov.
Quoted 5 lines
I think it would be good practice to explicitly check for all the AVX-512 extensions actually used. Ideally, as a cleanup, we should probably check for those listed (f, bw, dq and vl) once early in the config and reuse that value throughout the build, rather than having each and every PMD continually check them.
This simplification on the build side looks good.
On the other hand, vectorized handlers in libraries and drivers are selected based on some AVX512 instructions availability at runtime. Don't we need to validate *runtime* availability of each of those instructions in each library/driver?
Signature · 1 line
David Marchand
Quoted 49 lines · David Marchand
Quoted 41 lines · Bruce Richardson
Quoted 29 lines · David Marchand
Quoted 10 lines · Bruce Richardson
The AVX-512 copy code in multiple drivers was incorrect for 32-bit as it assumed that each pointer was always 8B in size.
Bruce Richardson (4):
net/i40e: fix AVX-512 pointer copy on 32-bit
net/ice: fix AVX-512 pointer copy on 32-bit
net/iavf: fix AVX-512 pointer copy on 32-bit
common/idpf: fix AVX-512 pointer copy on 32-bitQuoted 5 lines
drivers/common/idpf/idpf_common_rxtx_avx512.c | 7 +++++++ drivers/net/i40e/i40e_rxtx_vec_avx512.c | 7 +++++++ drivers/net/iavf/iavf_rxtx_vec_avx512.c | 7 +++++++ drivers/net/ice/ice_rxtx_vec_avx512.c | 7 +++++++ 4 files changed, 28 insertions(+)Sorry, not directly related to this series, but as I was checking some AVX512 patch, I suspect some drivers are missing runtime checks for availability of some AVX512 instructions:
$ for meson in $(git grep -l __AVX512[^_]*__ 'drivers/**/meson.build'); do dir=$(dirname $meson); for flag in $(git grep -ho __AVX512[^_]*__ $dir | sort -u); do flag=${flag%%__}; flag=${flag##__}; git grep -ql rte_cpu_get_flag_enabled.RTE_CPUFLAG_$flag $dir || echo RTE_CPUFLAG_$flag check missing in $dir; done; doneQuoted 9 lines
RTE_CPUFLAG_AVX512BWcheck missing indrivers/common/idpfRTE_CPUFLAG_AVX512DQcheck missing indrivers/common/idpfRTE_CPUFLAG_AVX512Fcheck missing indrivers/common/idpfRTE_CPUFLAG_AVX512VLcheck missing indrivers/net/i40eRTE_CPUFLAG_AVX512VLcheck missing indrivers/net/iceMaybe some flags are implictly available... worth a confirmation from Intel in any case from my pov.
Quoted 5 lines
I think it would be good practice to explicitly check for all the AVX-512 extensions actually used. Ideally, as a cleanup, we should probably check for those listed (f, bw, dq and vl) once early in the config and reuse that value throughout the build, rather than having each and every PMD continually check them.
Quoted 7 lines
This simplification on the build side looks good.
On the other hand, vectorized handlers in libraries and drivers are selected based on some AVX512 instructions availability at runtime. Don't we need to validate *runtime* availability of each of those instructions in each library/driver?
Yes, each lib and driver should be also checking these at runtime. Simplification of such checks may be possible, and may be something I look at in future, time permitting. For now, an example of the checks done can be seen in [1].
/Bruce
[1] https://git.dpdk.org/dpdk/tree/drivers/net/ice/ice_rxtx.c#n3486