mbox series

[net-next,0/2] Add ethtool support for completion event size

Message ID 1645109346-27600-1-git-send-email-sbhatta@marvell.com (mailing list archive)
Headers show
Series Add ethtool support for completion event size | expand

Message

Subbaraya Sundeep Feb. 17, 2022, 2:49 p.m. UTC
After a packet is sent or received by NIC then NIC posts
a completion event which consists of transmission status
(like send success or error) and received status(like
pointers to packet fragments). These completion events may
also use a ring similar to rx and tx rings. This patchset
introduces ce-size ethtool parameter to modify the size
of the completion event if NIC hardware has that capability.
A bigger completion event can have more receive buffer pointers
inturn NIC can transfer a bigger frame from wire as long as
hardware(MAC) receive frame size limit is not exceeded.

Patch 1 adds support setting/getting ce-size via
ethtool -G and ethtool -g.

Patch 2 includes octeontx2 driver changes to use
completion event size set from ethtool -G.

Thanks,
Sundeep

Subbaraya Sundeep (2):
  ethtool: add support to set/get completion event size
  octeontx2-pf: Vary completion queue event size

 Documentation/networking/ethtool-netlink.rst          |  2 ++
 .../net/ethernet/marvell/octeontx2/nic/otx2_common.c  |  4 ++--
 .../net/ethernet/marvell/octeontx2/nic/otx2_common.h  |  1 +
 .../net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c | 17 ++++++++++++++---
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c  |  2 ++
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c  |  2 ++
 include/linux/ethtool.h                               |  3 +++
 include/uapi/linux/ethtool_netlink.h                  |  1 +
 net/ethtool/netlink.h                                 |  2 +-
 net/ethtool/rings.c                                   | 19 +++++++++++++++++--
 10 files changed, 45 insertions(+), 8 deletions(-)

Comments

Jakub Kicinski Feb. 17, 2022, 5:01 p.m. UTC | #1
On Thu, 17 Feb 2022 20:19:04 +0530 Subbaraya Sundeep wrote:
> After a packet is sent or received by NIC then NIC posts
> a completion event which consists of transmission status
> (like send success or error) and received status(like
> pointers to packet fragments). These completion events may
> also use a ring similar to rx and tx rings. This patchset
> introduces ce-size ethtool parameter to modify the size
> of the completion event if NIC hardware has that capability.
> A bigger completion event can have more receive buffer pointers
> inturn NIC can transfer a bigger frame from wire as long as
> hardware(MAC) receive frame size limit is not exceeded.
> 
> Patch 1 adds support setting/getting ce-size via
> ethtool -G and ethtool -g.
> 
> Patch 2 includes octeontx2 driver changes to use
> completion event size set from ethtool -G.

Please add an explanation to ethtool-netlink.rst so people can
understand what the semantics are.

I think we may want to rename CE -> CQE, we used cqe for IRQ config.

Does changing the CQE size also change the size of the completion ring?
Or does it only control aggregation / writeback size?
sundeep subbaraya Feb. 18, 2022, 5:37 a.m. UTC | #2
Hi Jakub,

On Thu, Feb 17, 2022 at 10:31 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Thu, 17 Feb 2022 20:19:04 +0530 Subbaraya Sundeep wrote:
> > After a packet is sent or received by NIC then NIC posts
> > a completion event which consists of transmission status
> > (like send success or error) and received status(like
> > pointers to packet fragments). These completion events may
> > also use a ring similar to rx and tx rings. This patchset
> > introduces ce-size ethtool parameter to modify the size
> > of the completion event if NIC hardware has that capability.
> > A bigger completion event can have more receive buffer pointers
> > inturn NIC can transfer a bigger frame from wire as long as
> > hardware(MAC) receive frame size limit is not exceeded.
> >
> > Patch 1 adds support setting/getting ce-size via
> > ethtool -G and ethtool -g.
> >
> > Patch 2 includes octeontx2 driver changes to use
> > completion event size set from ethtool -G.
>
> Please add an explanation to ethtool-netlink.rst so people can
> understand what the semantics are.
>
Sure

> I think we may want to rename CE -> CQE, we used cqe for IRQ config.
>
I used CE because not to be confused with CQE mode in coalesce. I will
change to CQE

> Does changing the CQE size also change the size of the completion ring?
> Or does it only control aggregation / writeback size?

In our case we change the completion ring size too.

Thanks,
Sundeep
Jakub Kicinski Feb. 19, 2022, 4:29 a.m. UTC | #3
On Fri, 18 Feb 2022 11:07:11 +0530 sundeep subbaraya wrote:
> > Does changing the CQE size also change the size of the completion ring?
> > Or does it only control aggregation / writeback size?  
> 
> In our case we change the completion ring size too.

Okay, sounds good. Let's make sure the behavior is documented.