net/ixgbe: shrink size of context index
PATCH 1/1 net/ixgbe: shrink size of context index
The ixgbe driver only supports two contexts, so using uint32_t for the context index is excessive. Reducing this to uint8_t shrinks the ixgbe part of the union from 32 bytes to 24. Although it does not in itself shrink the space for the whole struct, it is worth doing as ixgbe is the second-largest block in the union, so may become relevant if other rework shrinks the idpf-specific block.
--- drivers/net/intel/common/tx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/intel/common/tx.h +1 -1
@@ -200,7 +200,7 @@ struct ci_tx_queue {struct {/* ixgbe specific values */ const struct ixgbe_txq_ops *ops;struct ixgbe_advctx_info *ctx_cache; -uint32_t ctx_curr; +uint8_t ctx_curr;uint8_t pthresh;/**< Prefetch threshold register. */ uint8_t hthresh;/**< Host threshold register. */ uint8_t wthresh;/**< Write-back threshold reg. */
Signature · 1 line
2.51.0
Quoted 9 lines · Bruce Richardson
The ixgbe driver only supports two contexts, so using
uint32_tfor the context index is excessive. Reducing this touint8_tshrinks the ixgbe part of the union from 32 bytes to 24. Although it does not in itself shrink the space for the whole struct, it is worth doing as ixgbe is the second-largest block in the union, so may become relevant if other rework shrinks the idpf-specific block.Signed-off-by Bruce Richardson <[email protected]>---
Signature · 2 lines
Thanks, Anatoly
Bruce Richardson
AppliedQuoted 8 lines · Anatoly
Quoted 7 lines · Bruce Richardson
The ixgbe driver only supports two contexts, so using
uint32_tfor the context index is excessive. Reducing this touint8_tshrinks the ixgbe part of the union from 32 bytes to 24. Although it does not in itself shrink the space for the whole struct, it is worth doing as ixgbe is the second-largest block in the union, so may become relevant if other rework shrinks the idpf-specific block.
Quoted 5 lines
Quoted 2 lines
Signed-off-by Bruce Richardson <[email protected]>---
Acked-by Anatoly Burakov <[email protected]>
Applied to dpdk-next-net-intel
Thanks,
/Bruce