Page MenuHomeFreeBSD

cxgbe: Add a struct sge_ofld_txq type.
ClosedPublic

Authored by jhb on Mar 22 2021, 10:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 11, 8:38 PM
Unknown Object (File)
Mon, Nov 3, 3:04 AM
Unknown Object (File)
Mon, Nov 3, 1:33 AM
Unknown Object (File)
Sun, Nov 2, 3:03 AM
Unknown Object (File)
Wed, Oct 29, 9:25 PM
Unknown Object (File)
Wed, Oct 29, 9:24 PM
Unknown Object (File)
Wed, Oct 29, 9:23 PM
Unknown Object (File)
Wed, Oct 29, 9:23 PM
Subscribers

Details

Summary

This type mirrors struct sge_ofld_rxq and holds state for TCP offload
transmit queues. Currently it only holds a work queue but will
include additional state in future changes.

Sponsored by: Chelsio Communications

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 38072
Build 34961: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Mar 22 2021, 10:44 PM
  • Add alloc/free_ofld_txq() routines.

The offload tx queues are also used for RATELIMIT tx and we should either set cxgbe_rate_tag->eo_txq to ofld_txq->wrq in ethofld_transmit or change eo_txq to be a sge_ofld_txq.

np requested changes to this revision.Mar 25 2021, 5:17 AM

There's also this in t4_main.c that needs to be updated to sizeof(struct sge_ofld_txq):

s->ofld_txq = malloc(s->nofldtxq * sizeof(struct sge_wrq),  M_CXGBE, M_ZERO | M_WAITOK);
This revision now requires changes to proceed.Mar 25 2021, 5:17 AM
  • Fix with RATELIMIT and malloc size.
sys/dev/cxgbe/t4_main.c
1334

Using 'sizeof(*s->ofld_txq)' here instead of the type would perhaps have been more future proof.

sys/dev/cxgbe/t4_sge.c
6447

I changed the type of cst->eo_txq so that this line would still work (and it also seemed more natural for eo_txq to point to the actual txq rather than just the embedded wrq).

This revision is now accepted and ready to land.Mar 25 2021, 10:37 PM

Let's land this if it's ready.

This revision was automatically updated to reflect the committed changes.