| 9eb60580 | 24-Jan-2025 |
Bruce Richardson <bruce.richardson@intel.com> |
net/intel: extract common Rx vector criteria
While some drivers have specific criteria for when a vector driver can be enabled on the Rx path, there are a number of basic criteria which apply across
net/intel: extract common Rx vector criteria
While some drivers have specific criteria for when a vector driver can be enabled on the Rx path, there are a number of basic criteria which apply across all drivers. Centralize those in the intel/common folder, and then update drivers to use the common conditional checks. This adds some additional restrictions to some drivers like ixgbe, where those conditions were necessary but never checked.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Praveen Shetty <praveen.shetty@intel.com>
show more ...
|
| 61dcf278 | 24-Jan-2025 |
Bruce Richardson <bruce.richardson@intel.com> |
net/intel: create common mbuf initializer
Across a number of drivers, the same code is used for initializing the "mbuf_initializer" value inside the rx queue structure for use with the vector driver
net/intel: create common mbuf initializer
Across a number of drivers, the same code is used for initializing the "mbuf_initializer" value inside the rx queue structure for use with the vector drivers. Since the rx queue structures are (currently) different across the drivers, we cannot just move a single copy of the function to a common location. Instead, we create a dedicated function which just creates the mbuf initializer for a particular port.
In creating this function, we can shorten it vs the original versions by initializing the mbuf fields as they are defined, rather than afterwards. We can also remove the use of the barrier and temporary uintptr_t variable, because the mbuf has been reworked so that rearm_data is a proper single-element array in a union.
Across ixgbe, i40e, iavf and i40e, we can call this function to initialize the rxq data, replacing the "*_rxq_vec_setup_default" functions. Only the i40e was slightly different, having an extra assignment in it, to set the "sse" flag (even in case of neon and altivec paths). This assignment was just duplicated to the calling sites for simplicity and to keep existing behaviour.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Praveen Shetty <praveen.shetty@intel.com>
show more ...
|
| 6e405461 | 24-Jan-2025 |
Bruce Richardson <bruce.richardson@intel.com> |
net/ixgbe: use common Tx backlog entry function
Remove the custom vector Tx backlog entry function and use the standard intel_common one, now that all vector drivers are using the same, smaller ring
net/ixgbe: use common Tx backlog entry function
Remove the custom vector Tx backlog entry function and use the standard intel_common one, now that all vector drivers are using the same, smaller ring structure.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Praveen Shetty <praveen.shetty@intel.com>
show more ...
|
| d3bb1c9e | 24-Jan-2025 |
Bruce Richardson <bruce.richardson@intel.com> |
net/intel: remove unneeded vector flags and cleanup code
With all drivers using the common Tx structure updated so that their vector paths all use the simplified Tx mbuf ring format, it's no longer
net/intel: remove unneeded vector flags and cleanup code
With all drivers using the common Tx structure updated so that their vector paths all use the simplified Tx mbuf ring format, it's no longer necessary to have a separate flag for the ring format and for use of a vector driver.
Remove the former flag and base all decisions off the vector flag. With that done, we go from having only two paths to consider for releasing all mbufs in the ring, not three. That allows further simplification of the "ci_txq_release_all_mbufs" function.
The separate function to free buffers from the vector driver not using the simplified ring format can similarly be removed as no longer necessary.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Praveen Shetty <praveen.shetty@intel.com>
show more ...
|
| 7662502d | 24-Jan-2025 |
Bruce Richardson <bruce.richardson@intel.com> |
net/iavf: use vector SW ring for all vector paths
The AVX-512 code path used a smaller SW ring structure only containing the mbuf pointer, but no other fields. The other fields are only used in the
net/iavf: use vector SW ring for all vector paths
The AVX-512 code path used a smaller SW ring structure only containing the mbuf pointer, but no other fields. The other fields are only used in the scalar code path, so update all vector driver code paths (AVX2, SSE) to use the smaller, faster structure.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Praveen Shetty <praveen.shetty@intel.com>
show more ...
|
| 10da6792 | 24-Jan-2025 |
Bruce Richardson <bruce.richardson@intel.com> |
net/i40e: use vector SW ring for all vector paths
The AVX-512 code path used a smaller SW ring structure only containing the mbuf pointer, but no other fields. The other fields are only used in the
net/i40e: use vector SW ring for all vector paths
The AVX-512 code path used a smaller SW ring structure only containing the mbuf pointer, but no other fields. The other fields are only used in the scalar code path, so update all vector driver code paths (AVX2, SSE, Neon, Altivec) to use the smaller, faster structure.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Praveen Shetty <praveen.shetty@intel.com>
show more ...
|
| 7e230d56 | 24-Jan-2025 |
Bruce Richardson <bruce.richardson@intel.com> |
net/ice: use vector SW ring for all vector paths
The AVX-512 code path used a smaller SW ring structure only containing the mbuf pointer, but no other fields. The other fields are only used in the s
net/ice: use vector SW ring for all vector paths
The AVX-512 code path used a smaller SW ring structure only containing the mbuf pointer, but no other fields. The other fields are only used in the scalar code path, so update all vector driver code paths to use the smaller, faster structure.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Praveen Shetty <praveen.shetty@intel.com>
show more ...
|
| cef05386 | 24-Jan-2025 |
Bruce Richardson <bruce.richardson@intel.com> |
net/iavf: use common Tx queue mbuf cleanup
Adjust iavf driver to also use the common mbuf freeing functions on Tx queue release/cleanup. The implementation is complicated a little by the need to int
net/iavf: use common Tx queue mbuf cleanup
Adjust iavf driver to also use the common mbuf freeing functions on Tx queue release/cleanup. The implementation is complicated a little by the need to integrate the additional "has_ctx" parameter for the iavf code, but changes in other drivers are minimal - just a constant "false" parameter.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Praveen Shetty <praveen.shetty@intel.com>
show more ...
|
| 7c5d1d4d | 24-Jan-2025 |
Bruce Richardson <bruce.richardson@intel.com> |
net/i40e: use common Tx queue mbuf cleanup
Update driver to be similar to the "ice" driver and use the common mbuf ring cleanup code on shutdown of a Tx queue.
Signed-off-by: Bruce Richardson <bruc
net/i40e: use common Tx queue mbuf cleanup
Update driver to be similar to the "ice" driver and use the common mbuf ring cleanup code on shutdown of a Tx queue.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Praveen Shetty <praveen.shetty@intel.com>
show more ...
|
| 552979df | 24-Jan-2025 |
Bruce Richardson <bruce.richardson@intel.com> |
net/intel: create common Tx queue mbuf cleanup
The function to loop over the Tx queue and clean up all the mbufs on it, e.g. for queue shutdown, is not device specific and so can move into the commo
net/intel: create common Tx queue mbuf cleanup
The function to loop over the Tx queue and clean up all the mbufs on it, e.g. for queue shutdown, is not device specific and so can move into the common/intel headers. Only complication is ensuring that the correct ring format, either minimal vector or full structure, is used. Ice driver currently uses two functions and a function pointer to help with this - though actually one of those functions uses a further check inside it - so we can simplify this down to just one common function, with a flag set in the appropriate place. This avoids checking for AVX-512-specific functions, which were the only function using the smaller struct in this driver.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Praveen Shetty <praveen.shetty@intel.com>
show more ...
|
| 0f62bbef | 24-Jan-2025 |
Bruce Richardson <bruce.richardson@intel.com> |
net/iavf: use common Tx free for AVX-512
Switch the iavf driver to use the common Tx free function. This requires one additional parameter to that function, since iavf sometimes uses context descrip
net/iavf: use common Tx free for AVX-512
Switch the iavf driver to use the common Tx free function. This requires one additional parameter to that function, since iavf sometimes uses context descriptors which means that we have double the descriptors per SW ring slot.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Praveen Shetty <praveen.shetty@intel.com>
show more ...
|
| f6f34a5c | 24-Jan-2025 |
Bruce Richardson <bruce.richardson@intel.com> |
net/intel: create common Tx buffer free for AVX-512
AVX-512 code paths for ice and i40e drivers are common, and differ from the regular post-Tx free function in that the SW ring from which the buffe
net/intel: create common Tx buffer free for AVX-512
AVX-512 code paths for ice and i40e drivers are common, and differ from the regular post-Tx free function in that the SW ring from which the buffers are freed does not contain anything other than the mbuf pointer. Merge these into a common function in intel/common to reduce duplication.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Praveen Shetty <praveen.shetty@intel.com>
show more ...
|
| b87fc211 | 24-Jan-2025 |
Bruce Richardson <bruce.richardson@intel.com> |
net/intel: create common post-Tx buffer free
The actions taken for post-Tx buffer free for the SSE and AVX drivers for i40e, iavf and ice drivers are all common, so centralize those in net/intel/com
net/intel: create common post-Tx buffer free
The actions taken for post-Tx buffer free for the SSE and AVX drivers for i40e, iavf and ice drivers are all common, so centralize those in net/intel/common driver.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Praveen Shetty <praveen.shetty@intel.com>
show more ...
|
| e3b5f52d | 24-Jan-2025 |
Bruce Richardson <bruce.richardson@intel.com> |
net/intel: pack Tx queue structure
Move some fields about to better pack the Tx queue structure and make sure all data used by the vector codepaths is on the first cacheline of the structure. Checki
net/intel: pack Tx queue structure
Move some fields about to better pack the Tx queue structure and make sure all data used by the vector codepaths is on the first cacheline of the structure. Checking with "pahole" on 64-bit build, only one 6-byte hole is left in the structure - on second cacheline - after this patch.
As part of the reordering, move the p/h/wthresh values to the ixgbe-specific part of the union. That is the only driver which actually uses those values. i40e and ice drivers just record the values for later return, so we can drop them from the Tx queue structure for those drivers and just report the defaults in all cases.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Praveen Shetty <praveen.shetty@intel.com>
show more ...
|
| c5faf26b | 24-Jan-2025 |
Bruce Richardson <bruce.richardson@intel.com> |
net/ixgbe: convert Tx queue context cache field to pointer
Rather than having a two element array of context cache values inside the Tx queue structure, convert it to a pointer to a cache at the end
net/ixgbe: convert Tx queue context cache field to pointer
Rather than having a two element array of context cache values inside the Tx queue structure, convert it to a pointer to a cache at the end of the structure. This makes future merging of the structure easier as we don't need the "ixgbe_advctx_info" struct defined when defining a combined queue structure.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Praveen Shetty <praveen.shetty@intel.com>
show more ...
|
| 82fbc4a4 | 24-Jan-2025 |
Bruce Richardson <bruce.richardson@intel.com> |
net/intel: create common packet reassembly
The code for reassembling a single, multi-mbuf packet from multiple buffers received from the NIC is duplicated across many drivers. Rather than having mul
net/intel: create common packet reassembly
The code for reassembling a single, multi-mbuf packet from multiple buffers received from the NIC is duplicated across many drivers. Rather than having multiple copies of this function, we can create an "intel/common" directory to hold such functions and consolidate multiple functions down to a single one for easier maintenance.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Praveen Shetty <praveen.shetty@intel.com>
show more ...
|