mbox series

[net-next,v2,0/3] Add devlink params to vary cqe and rbuf

Message ID 1633504726-30751-1-git-send-email-sbhatta@marvell.com (mailing list archive)
Headers show
Series Add devlink params to vary cqe and rbuf | expand

Message

Subbaraya Sundeep Oct. 6, 2021, 7:18 a.m. UTC
Octeontx2 hardware writes a Completion Queue Entry(CQE) in the
memory provided by software when a packet is received or
transmitted. CQE has the buffer pointers (IOVAs) where the
packet data fragments are written by hardware. One 128 byte
CQE can hold 6 buffer pointers and a 512 byte CQE can hold
42 buffer pointers. Hence large packets can be received either
by using 512 byte CQEs or by increasing size of receive buffers.
Current driver only supports 128 byte CQEs.
This patchset adds devlink params to change CQE and receive
buffer sizes which inturn helps to tune whether many small size
buffers or less big size buffers are needed to receive larger
packets. Below is the patches description:

Patch 1 - This prepares for 512 byte CQE operation by
seperating out transmit side and receive side config.
Also simplifies existing rbuf size calculation.

Patch 2 - Adds devlink param to change cqe. Basically
sets new config and toggles interface to cleanup and init properly.

Patch 3 - Similar to patch 2 and adds devlink param to
change receive buffer size


v2 changes:
Fixed compilation error in patch 1
error: ‘struct otx2_nic’ has no member named ‘max_frs’



Thanks,
Sundeep


Subbaraya Sundeep (3):
  octeontx2-pf: Simplify the receive buffer size calculation
  octeontx2-pf: Add devlink param to vary cqe size
  octeontx2-pf: Add devlink param to vary rbuf size

 drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c |   2 +-
 .../ethernet/marvell/octeontx2/nic/otx2_common.c   |  20 ++--
 .../ethernet/marvell/octeontx2/nic/otx2_common.h   |   4 +-
 .../ethernet/marvell/octeontx2/nic/otx2_devlink.c  | 116 +++++++++++++++++++++
 .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c   |  24 +++--
 .../net/ethernet/marvell/octeontx2/nic/otx2_txrx.c |  30 ++++--
 .../net/ethernet/marvell/octeontx2/nic/otx2_txrx.h |   4 +-
 .../net/ethernet/marvell/octeontx2/nic/otx2_vf.c   |   7 ++
 8 files changed, 177 insertions(+), 30 deletions(-)

Comments

Jakub Kicinski Oct. 6, 2021, 1:43 p.m. UTC | #1
On Wed, 6 Oct 2021 12:48:43 +0530 Subbaraya Sundeep wrote:
> Octeontx2 hardware writes a Completion Queue Entry(CQE) in the
> memory provided by software when a packet is received or
> transmitted. CQE has the buffer pointers (IOVAs) where the
> packet data fragments are written by hardware. One 128 byte
> CQE can hold 6 buffer pointers and a 512 byte CQE can hold
> 42 buffer pointers. Hence large packets can be received either
> by using 512 byte CQEs or by increasing size of receive buffers.
> Current driver only supports 128 byte CQEs.
> This patchset adds devlink params to change CQE and receive
> buffer sizes which inturn helps to tune whether many small size
> buffers or less big size buffers are needed to receive larger
> packets. Below is the patches description:

nak. Stop ignoring feedback and reposting your patches.
sundeep subbaraya Oct. 6, 2021, 1:48 p.m. UTC | #2
Hi Jakub,

On Wed, Oct 6, 2021 at 7:14 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Wed, 6 Oct 2021 12:48:43 +0530 Subbaraya Sundeep wrote:
> > Octeontx2 hardware writes a Completion Queue Entry(CQE) in the
> > memory provided by software when a packet is received or
> > transmitted. CQE has the buffer pointers (IOVAs) where the
> > packet data fragments are written by hardware. One 128 byte
> > CQE can hold 6 buffer pointers and a 512 byte CQE can hold
> > 42 buffer pointers. Hence large packets can be received either
> > by using 512 byte CQEs or by increasing size of receive buffers.
> > Current driver only supports 128 byte CQEs.
> > This patchset adds devlink params to change CQE and receive
> > buffer sizes which inturn helps to tune whether many small size
> > buffers or less big size buffers are needed to receive larger
> > packets. Below is the patches description:
>
> nak. Stop ignoring feedback and reposting your patches.
Sure and noted.

Thanks,
Sundeep