RDMA/mana_ib: Use v2 version of cfg_rx_steer_req to enable RX coalescing
Subsystems (5)
PATCH 1/1 RDMA/mana_ib: Use v2 version of cfg_rx_steer_req to enable RX coalescing
From: Long Li <[email protected]>
With RX coalescing, one CQE entry can be used to indicate multiple packets on the receive queue. This saves processing time and PCI bandwidth over the CQ.
--- drivers/infiniband/hw/mana/qp.c | 5 ++++- include/net/mana/mana.h | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-)
drivers/infiniband/hw/mana/qp.c +4 -1
@@ -13,7 +13,7 @@ static int mana_ib_cfg_vport_steering(struct mana_ib_dev *dev, u8 *rx_hash_key) {struct mana_port_context *mpc =netdev_priv (ndev); -struct mana_cfg_rx_steer_req *req =NULL ; +struct mana_cfg_rx_steer_req_v2 *req =NULL ;struct mana_cfg_rx_steer_resp resp = {};mana_handle_t *req_indir_tab;struct gdma_context *gc;
@@ -33,6 +33,8 @@ static int mana_ib_cfg_vport_steering(struct mana_ib_dev *dev,mana_gd_init_req_hdr (&req->hdr,MANA_CONFIG_VPORT_RX , req_buf_size,sizeof (resp)); + req->hdr.req.msg_version =GDMA_MESSAGE_V2 ; + req->vport = mpc->port_handle; req->rx_enable =1 ; req->update_default_rxobj =1 ;
@@ -46,6 +48,7 @@ static int mana_ib_cfg_vport_steering(struct mana_ib_dev *dev, req->num_indir_entries =MANA_INDIRECT_TABLE_SIZE ; req->indir_tab_offset =sizeof (*req); req->update_indir_tab = true; + req->cqe_coalescing_enable = true; req_indir_tab = (mana_handle_t *)(req +1 );/* The ind table passed to the hardware must have
include/net/mana/mana.h +17 -0
@@ -596,6 +596,23 @@ struct mana_cfg_rx_steer_req {u8 hashkey[MANA_HASH_KEY_SIZE ]; };/* HW DATA */ +struct mana_cfg_rx_steer_req_v2 { +struct gdma_req_hdr hdr; +mana_handle_t vport; +u16 num_indir_entries; +u16 indir_tab_offset; +u32 rx_enable; +u32 rss_enable; +u8 update_default_rxobj; +u8 update_hashkey; +u8 update_indir_tab; +u8 reserved; +mana_handle_t default_rxobj; +u8 hashkey[MANA_HASH_KEY_SIZE ]; +u8 cqe_coalescing_enable; +u8 reserved2[7 ]; +};/* HW DATA */ +struct mana_cfg_rx_steer_resp {struct gdma_resp_hdr hdr; };/* HW DATA */
Signature · 1 line
2.17.1
Quoted 11 lines · On Fri, May 05, 2023 at 11:51:48AM -0700, [email protected] wrote:
From: Long Li <[email protected]>
With RX coalescing, one CQE entry can be used to indicate multiple packets on the receive queue. This saves processing time and PCI bandwidth over the CQ.
Signed-off-by Long Li <[email protected]>--- drivers/infiniband/hw/mana/qp.c | 5 ++++- include/net/mana/mana.h | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-)
Why didn't you change mana_cfg_vport_steering() too?
drivers/infiniband/hw/mana/qp.c static int mana_ib_cfg_vport_steering(struct mana_ib_dev *dev, · line 16
Quoted 11 lines
drivers/infiniband/hw/mana/qp.c +1
-1@@ -13,7 +13,7 @@ static int mana_ib_cfg_vport_steering(struct mana_ib_dev *dev, u8 *rx_hash_key) {struct mana_port_context *mpc =netdev_priv (ndev); -struct mana_cfg_rx_steer_req *req =NULL ; +struct mana_cfg_rx_steer_req_v2 *req =NULL ;
There is no need in NULL here, req is going to be overwritten almost immediately.
Thanks
Quoted 51 lines
drivers/infiniband/hw/mana/qp.c +3
-0struct mana_cfg_rx_steer_resp resp = {};mana_handle_t *req_indir_tab;struct gdma_context *gc;@@ -33,6 +33,8 @@ static int mana_ib_cfg_vport_steering(struct mana_ib_dev *dev,mana_gd_init_req_hdr (&req->hdr,MANA_CONFIG_VPORT_RX , req_buf_size,sizeof (resp)); + req->hdr.req.msg_version =GDMA_MESSAGE_V2 ; + req->vport = mpc->port_handle; req->rx_enable =1 ; req->update_default_rxobj =1 ;@@ -46,6 +48,7 @@ static int mana_ib_cfg_vport_steering(struct mana_ib_dev *dev, req->num_indir_entries =MANA_INDIRECT_TABLE_SIZE ; req->indir_tab_offset =sizeof (*req); req->update_indir_tab = true; + req->cqe_coalescing_enable = true; req_indir_tab = (mana_handle_t *)(req +1 );/* The ind table passed to the hardware must have include/net/mana/mana.h +17
-0@@ -596,6 +596,23 @@ struct mana_cfg_rx_steer_req {u8 hashkey[MANA_HASH_KEY_SIZE ]; };/* HW DATA */ +struct mana_cfg_rx_steer_req_v2 { +struct gdma_req_hdr hdr; +mana_handle_t vport; +u16 num_indir_entries; +u16 indir_tab_offset; +u32 rx_enable; +u32 rss_enable; +u8 update_default_rxobj; +u8 update_hashkey; +u8 update_indir_tab; +u8 reserved; +mana_handle_t default_rxobj; +u8 hashkey[MANA_HASH_KEY_SIZE ]; +u8 cqe_coalescing_enable; +u8 reserved2[7 ]; +};/* HW DATA */ +struct mana_cfg_rx_steer_resp {struct gdma_resp_hdr hdr; };/* HW DATA */ Signature · 1 line
2.17.1
Haiyang Zhang
maintainerQuoted 25 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Sunday, May 7, 2023 4:11 AM
To: Long Li <[email protected]>
Cc: Jason Gunthorpe <[email protected]>; Ajay Sharma <[email protected]>; Dexuan Cui <[email protected]>; KY Srinivasan <[email protected]>; Haiyang Zhang <[email protected]>; Wei Liu <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]
Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version ofcfg_rx_steer_reqto enable RX coalescingQuoted 6 lines · On Fri, May 05, 2023 at 11:51:48AM -0700, [email protected] wrote:
From: Long Li <[email protected]>
With RX coalescing, one CQE entry can be used to indicate multiple packets on the receive queue. This saves processing time and PCI bandwidth over the CQ.
Quoted 7 lines
Quoted 5 lines
Signed-off-by Long Li <[email protected]>--- drivers/infiniband/hw/mana/qp.c | 5 ++++- include/net/mana/mana.h | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-)Why didn't you change
mana_cfg_vport_steering()too?
The mana_cfg_vport_steering() is for mana_en (Enthernet) driver, not the mana_ib driver.
The changes for mana_en will be done in a separate patch together with changes for mana_en RX code patch to support multiple packets / CQE.
Thanks,
- Haiyang
Quoted 31 lines · Haiyang Zhang
Quoted 31 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Sunday, May 7, 2023 4:11 AM
To: Long Li <[email protected]>
Cc: Jason Gunthorpe <[email protected]>; Ajay Sharma <[email protected]>; Dexuan Cui <[email protected]>; KY Srinivasan <[email protected]>; Haiyang Zhang <[email protected]>; Wei Liu <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]
Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version ofcfg_rx_steer_reqto enable RX coalescingQuoted 11 lines · On Fri, May 05, 2023 at 11:51:48AM -0700, [email protected] wrote:
From: Long Li <[email protected]>
With RX coalescing, one CQE entry can be used to indicate multiple packets on the receive queue. This saves processing time and PCI bandwidth over the CQ.
Signed-off-by Long Li <[email protected]>--- drivers/infiniband/hw/mana/qp.c | 5 ++++- include/net/mana/mana.h | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-)
Quoted 7 lines
Quoted 1 line
Why didn't you change
mana_cfg_vport_steering()too?The
mana_cfg_vport_steering()is formana_en(Enthernet) driver, not themana_ibdriver.The changes for
mana_enwill be done in a separate patch together with changes formana_enRX code patch to support multiple packets / CQE.
I'm aware of the difference between mana_en and mana_ib.
The change you proposed doesn't depend on "support multiple packets / CQE." and works perfectly with one packet/CQE also, does it?
Thanks
Quoted 4 lines
Thanks,
- Haiyang
Haiyang Zhang
maintainerQuoted 57 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Monday, May 8, 2023 2:10 AM
To: Haiyang Zhang <[email protected]>
Cc: Long Li <[email protected]>; Jason Gunthorpe <[email protected]>; Ajay Sharma <[email protected]>; Dexuan Cui <[email protected]>; KY Srinivasan <[email protected]>; Wei Liu <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; linux- [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version ofcfg_rx_steer_reqto enable RX coalescingQuoted 9 lines · Haiyang Zhang
Quoted 9 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Sunday, May 7, 2023 4:11 AM
To: Long Li <[email protected]>
Cc: Jason Gunthorpe <[email protected]>; Ajay Sharma <[email protected]>; Dexuan Cui <[email protected]>; KY Srinivasan <[email protected]>; Haiyang ZhangQuoted 2 lines
Quoted 2 lines
Wei Liu <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>;
Paolo
Quoted 4 lines
Quoted 4 lines
Abeni <[email protected]>; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]
Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version ofcfg_rx_steer_reqto
Quoted 7 lines
Quoted 7 lines
enable RX coalescing
Quoted 3 lines · On Fri, May 05, 2023 at 11:51:48AM -0700, [email protected] wrote:
From: Long Li <[email protected]>
With RX coalescing, one CQE entry can be used to indicate multiple
packets
Quoted 14 lines
Quoted 10 lines
Quoted 8 lines
on the receive queue. This saves processing time and PCI bandwidth over the CQ.
Signed-off-by Long Li <[email protected]>--- drivers/infiniband/hw/mana/qp.c | 5 ++++- include/net/mana/mana.h | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-)Why didn't you change
mana_cfg_vport_steering()too?The
mana_cfg_vport_steering()is formana_en(Enthernet) driver, not themana_ibdriver.
Quoted 8 lines
Quoted 2 lines
The changes for
mana_enwill be done in a separate patch together with changes formana_enRX code patch to support multiple packets / CQE.I'm aware of the difference between
mana_enandmana_ib.The change you proposed doesn't depend on "support multiple packets / CQE."
and works perfectly with one packet/CQE also, does it?
No.
If we add the following setting to the mana_en / mana_cfg_vport_steering(), the NIC may put multiple packets in one CQE, so we need to have the changes for mana_en RX code path to support multiple packets / CQE.
+ req->cqe_coalescing_enable = true;
So we plan to set this cqe_coalescing_enable, and the changes for mana_en RX code path to support multiple packets / CQE in another patch.
Thanks,
- Haiyang
Quoted 70 lines · Haiyang Zhang
Quoted 57 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Monday, May 8, 2023 2:10 AM
To: Haiyang Zhang <[email protected]>
Cc: Long Li <[email protected]>; Jason Gunthorpe <[email protected]>; Ajay Sharma <[email protected]>; Dexuan Cui <[email protected]>; KY Srinivasan <[email protected]>; Wei Liu <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; linux- [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version ofcfg_rx_steer_reqto enable RX coalescingQuoted 9 lines · Haiyang Zhang
Quoted 9 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Sunday, May 7, 2023 4:11 AM
To: Long Li <[email protected]>
Cc: Jason Gunthorpe <[email protected]>; Ajay Sharma <[email protected]>; Dexuan Cui <[email protected]>; KY Srinivasan <[email protected]>; Haiyang ZhangQuoted 2 lines
Quoted 2 lines
Wei Liu <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>;
Paolo
Quoted 4 lines
Quoted 4 lines
Abeni <[email protected]>; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]
Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version ofcfg_rx_steer_reqto
Quoted 7 lines
Quoted 7 lines
enable RX coalescing
Quoted 3 lines · On Fri, May 05, 2023 at 11:51:48AM -0700, [email protected] wrote:
From: Long Li <[email protected]>
With RX coalescing, one CQE entry can be used to indicate multiple
packets
Quoted 14 lines
Quoted 10 lines
Quoted 8 lines
on the receive queue. This saves processing time and PCI bandwidth over the CQ.
Signed-off-by Long Li <[email protected]>--- drivers/infiniband/hw/mana/qp.c | 5 ++++- include/net/mana/mana.h | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-)Why didn't you change
mana_cfg_vport_steering()too?The
mana_cfg_vport_steering()is formana_en(Enthernet) driver, not themana_ibdriver.Quoted 8 lines
Quoted 2 lines
The changes for
mana_enwill be done in a separate patch together with changes formana_enRX code patch to support multiple packets / CQE.I'm aware of the difference between
mana_enandmana_ib.The change you proposed doesn't depend on "support multiple packets / CQE."
and works perfectly with one packet/CQE also, does it?No.
If we add the following setting to themana_en/mana_cfg_vport_steering(), the NIC may put multiple packets in one CQE, so we need to have the changes formana_enRX code path to support multiple packets / CQE.
drivers/infiniband/hw/mana/qp.c static int mana_ib_cfg_vport_steering(struct mana_ib_dev *dev, · line 51
Quoted 1 line
drivers/infiniband/hw/mana/qp.c +1
-0+ req->cqe_coalescing_enable = true;
You can leave "cqe_coalescing_enable = false" for ETH and still reuse your new v2 struct.
H>
Quoted 2 lines
So we plan to set this
cqe_coalescing_enable, and the changes formana_enRX code path to support multiple packets / CQE in another patch.
And how does it work with IB without changing anything except this proposed patch?
Thanks
Quoted 4 lines
Thanks,
- Haiyang
Quoted 81 lines
Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version of
cfg_rx_steer_reqto enable RX coalescingQuoted 9 lines · Haiyang Zhang
Quoted 9 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Monday, May 8, 2023 2:10 AM
To: Haiyang Zhang <[email protected]>
Cc: Long Li <[email protected]>; Jason Gunthorpe <[email protected]>; Ajay Sharma <[email protected]>; Dexuan Cui <[email protected]>; KY Srinivasan <[email protected]>; Wei Liu<[email protected]>; David S.
Quoted 17 lines
Quoted 17 lines
Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; linux- [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version ofcfg_rx_steer_reqto enable RX coalescingQuoted 9 lines · Haiyang Zhang
Quoted 9 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Sunday, May 7, 2023 4:11 AM
To: Long Li <[email protected]>
Cc: Jason Gunthorpe <[email protected]>; Ajay Sharma <[email protected]>; Dexuan Cui <[email protected]>; KY Srinivasan <[email protected]>; Haiyang ZhangQuoted 3 lines
Quoted 3 lines
Quoted 2 lines
Quoted 2 lines
Wei Liu <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>;
Jakub
Quoted 27 lines
Quoted 27 lines
Quoted 1 line
Quoted 1 line
Kicinski <[email protected]>;
Paolo
Quoted 5 lines
Quoted 5 lines
Abeni <[email protected]>; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]
Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version ofcfg_rx_steer_reqto
Quoted 9 lines
Quoted 9 lines
enable RX coalescing
Quoted 4 lines · On Fri, May 05, 2023 at 11:51:48AM -0700, [email protected] wrote:
From: Long Li <[email protected]>
With RX coalescing, one CQE entry can be used to indicate multiple
packets
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
on the receive queue. This saves processing time and PCI bandwidth over the CQ.
Signed-off-by Long Li <[email protected]>--- drivers/infiniband/hw/mana/qp.c | 5 ++++- include/net/mana/mana.h | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-)Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Why didn't you change
mana_cfg_vport_steering()too?The
mana_cfg_vport_steering()is formana_en(Enthernet) driver, not themana_ibdriver.The changes for
mana_enwill be done in a separate patch together with changes formana_enRX code patch to support multiple packets /CQE.
Quoted 11 lines
Quoted 6 lines
I'm aware of the difference between
mana_enandmana_ib.The change you proposed doesn't depend on "support multiple packets / CQE."
and works perfectly with one packet/CQE also, does it?No.
If we add the following setting to themana_en/mana_cfg_vport_steering(), the NIC may put multiple packets in one CQE, so we need to have the changes formana_enRX code path to support
Quoted 5 lines
multiple packets / CQE.
drivers/infiniband/hw/mana/qp.c static int mana_ib_cfg_vport_steering(struct mana_ib_dev *dev, · line 51
Quoted 1 line
drivers/infiniband/hw/mana/qp.c +1
-0+ req->cqe_coalescing_enable = true;You can leave "
cqe_coalescing_enable= false" for ETH and still reuse your new v2 struct.
I think your proposal will work for both Ethernet and IB.
The idea is that we want this patch to change the behavior of the IB driver. We plan to make another patch for the Ethernet driver. This makes it easier to track all changes for a driver.
Quoted 7 lines
H>
Quoted 2 lines
So we plan to set this
cqe_coalescing_enable, and the changes formana_enRX code path to support multiple packets / CQE in another patch.And how does it work with IB without changing anything except this proposed patch?
The RX CQE Coalescing is implemented in the user-mode. This feature is always turned on from cluster. The user-mode code is written in a way that can deal with both CQE Coalescing and CQE non-coalescing, so it doesn't depend on kernel version for the correct behavior. Thanks,
Long
Quoted 82 lines · Long Li
Quoted 82 lines
Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version of
cfg_rx_steer_reqto enable RX coalescingQuoted 9 lines · Haiyang Zhang
Quoted 9 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Monday, May 8, 2023 2:10 AM
To: Haiyang Zhang <[email protected]>
Cc: Long Li <[email protected]>; Jason Gunthorpe <[email protected]>; Ajay Sharma <[email protected]>; Dexuan Cui <[email protected]>; KY Srinivasan <[email protected]>; Wei Liu<[email protected]>; David S.
Quoted 17 lines
Quoted 17 lines
Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; linux- [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version ofcfg_rx_steer_reqto enable RX coalescingQuoted 9 lines · Haiyang Zhang
Quoted 9 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Sunday, May 7, 2023 4:11 AM
To: Long Li <[email protected]>
Cc: Jason Gunthorpe <[email protected]>; Ajay Sharma <[email protected]>; Dexuan Cui <[email protected]>; KY Srinivasan <[email protected]>; Haiyang ZhangQuoted 3 lines
Quoted 3 lines
Quoted 2 lines
Quoted 2 lines
Wei Liu <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>;
Jakub
Quoted 27 lines
Quoted 27 lines
Quoted 1 line
Quoted 1 line
Kicinski <[email protected]>;
Paolo
Quoted 5 lines
Quoted 5 lines
Abeni <[email protected]>; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]
Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version ofcfg_rx_steer_reqto
Quoted 9 lines
Quoted 9 lines
enable RX coalescing
Quoted 4 lines · On Fri, May 05, 2023 at 11:51:48AM -0700, [email protected] wrote:
From: Long Li <[email protected]>
With RX coalescing, one CQE entry can be used to indicate multiple
packets
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
on the receive queue. This saves processing time and PCI bandwidth over the CQ.
Signed-off-by Long Li <[email protected]>--- drivers/infiniband/hw/mana/qp.c | 5 ++++- include/net/mana/mana.h | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-)Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Why didn't you change
mana_cfg_vport_steering()too?The
mana_cfg_vport_steering()is formana_en(Enthernet) driver, not themana_ibdriver.The changes for
mana_enwill be done in a separate patch together with changes formana_enRX code patch to support multiple packets /CQE.
Quoted 11 lines
Quoted 6 lines
I'm aware of the difference between
mana_enandmana_ib.The change you proposed doesn't depend on "support multiple packets / CQE."
and works perfectly with one packet/CQE also, does it?No.
If we add the following setting to themana_en/mana_cfg_vport_steering(), the NIC may put multiple packets in one CQE, so we need to have the changes formana_enRX code path to supportmultiple packets / CQE.
Quoted 8 lines
Quoted 4 lines
Review
Quoted 1 line
(quoted diff) +1
-0+ req->cqe_coalescing_enable = true;You can leave "
cqe_coalescing_enable= false" for ETH and still reuse your new v2 struct.I think your proposal will work for both Ethernet and IB.
The idea is that we want this patch to change the behavior of the IB driver. We plan to make another patch for the Ethernet driver. This makes it easier to track all changes for a driver.
And I don't want to deal with deletion of v1 struct for two/three kernel cycles instead of one patch in one cycle.
Quoted 10 lines
Quoted 8 lines
H>
Quoted 2 lines
So we plan to set this
cqe_coalescing_enable, and the changes formana_enRX code path to support multiple packets / CQE in another patch.And how does it work with IB without changing anything except this proposed patch?
The RX CQE Coalescing is implemented in the user-mode. This feature is always turned on from cluster. The user-mode code is written in a way that can deal with both CQE Coalescing and CQE non-coalescing, so it doesn't depend on kernel version for the correct behavior.
Yes, but how does userspace know that CQE coalescing was enabled?
Thanks
Quoted 2 lines
Thanks,
Long
Quoted 97 lines
Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version of
cfg_rx_steer_reqto enable RX coalescingQuoted 93 lines · Long Li
Quoted 92 lines
Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version of
cfg_rx_steer_reqto enable RX coalescingQuoted 10 lines · Haiyang Zhang
Quoted 10 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Monday, May 8, 2023 2:10 AM
To: Haiyang Zhang <[email protected]>
Cc: Long Li <[email protected]>; Jason Gunthorpe <[email protected]>; Ajay Sharma <[email protected]>; Dexuan Cui <[email protected]>; KY Srinivasan <[email protected]>; Wei Liu<[email protected]>; David S.
Quoted 19 lines
Quoted 19 lines
Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>;
linux- [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version ofcfg_rx_steer_reqto enable RX coalescingQuoted 10 lines · Haiyang Zhang
Quoted 10 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Sunday, May 7, 2023 4:11 AM
To: Long Li <[email protected]>
Cc: Jason Gunthorpe <[email protected]>; Ajay Sharma <[email protected]>; Dexuan Cui <[email protected]>; KY Srinivasan <[email protected]>; Haiyang ZhangQuoted 3 lines
Quoted 3 lines
Quoted 2 lines
Quoted 2 lines
Wei Liu <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>;
Jakub
Quoted 27 lines
Quoted 27 lines
Quoted 1 line
Quoted 1 line
Kicinski <[email protected]>;
Paolo
Quoted 5 lines
Quoted 5 lines
Abeni <[email protected]>; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]
Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version ofcfg_rx_steer_reqto
Quoted 9 lines
Quoted 9 lines
enable RX coalescing
Quoted 4 lines · On Fri, May 05, 2023 at 11:51:48AM -0700, [email protected] wrote:
From: Long Li <[email protected]>
With RX coalescing, one CQE entry can be used to indicate multiple
packets
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
on the receive queue. This saves processing time and PCI bandwidth over the CQ.
Signed-off-by Long Li <[email protected]>--- drivers/infiniband/hw/mana/qp.c | 5 ++++- include/net/mana/mana.h | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-)Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Why didn't you change
mana_cfg_vport_steering()too?The
mana_cfg_vport_steering()is formana_en(Enthernet) driver, not themana_ibdriver.The changes for
mana_enwill be done in a separate patch together with changes formana_enRX code patch to support multiple packets /CQE.
Quoted 7 lines
Quoted 6 lines
I'm aware of the difference between
mana_enandmana_ib.The change you proposed doesn't depend on "support multiple packets / CQE."
and works perfectly with one packet/CQE also, does it?Quoted 5 lines
No.
If we add the following setting to themana_en/mana_cfg_vport_steering(), the NIC may put multiple packets in one CQE, so we need to have the changes formana_enRX code path to supportmultiple packets / CQE.
Review
Quoted 1 line
(quoted diff) +1
-0+ req->cqe_coalescing_enable = true;You can leave "
cqe_coalescing_enable= false" for ETH and still reuse your new
v2 struct.
Quoted 8 lines
Quoted 3 lines
I think your proposal will work for both Ethernet and IB.
The idea is that we want this patch to change the behavior of the IB driver. We
plan to make another patch for the Ethernet driver. This makes it easier to track all changes for a driver.
And I don't want to deal with deletion of v1 struct for two/three kernel cycles instead of one patch in one cycle.
I'm resubmitting this patch to replace v1 for both driver.
Quoted 11 lines
Quoted 6 lines
Quoted 6 lines
H>
Quoted 2 lines
So we plan to set this
cqe_coalescing_enable, and the changes formana_enRX code path to support multiple packets / CQE in anotherpatch.
Quoted 4 lines
Quoted 3 lines
And how does it work with IB without changing anything except this proposed patch?
Quoted 6 lines
Quoted 1 line
The RX CQE Coalescing is implemented in the user-mode. This feature is
always turned on from cluster. The user-mode code is written in a way that can deal with both CQE Coalescing and CQE non-coalescing, so it doesn't depend on kernel version for the correct behavior.
Yes, but how does userspace know that CQE coalescing was enabled?
The user-mode doesn't know if CQE is enabled in advance. If this information is required I can modify the patch to pass this information along to rdma-core. However, this is not useful as the cluster is running with CQE coalescing enabled by default, there is no need to know this information.
Quoted 99 lines · Long Li
Quoted 99 lines
Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version of
cfg_rx_steer_reqto enable RX coalescingQuoted 95 lines · Long Li
Quoted 86 lines
Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version of
cfg_rx_steer_reqto enable RX coalescingQuoted 10 lines · Haiyang Zhang
Quoted 10 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Monday, May 8, 2023 2:10 AM
To: Haiyang Zhang <[email protected]>
Cc: Long Li <[email protected]>; Jason Gunthorpe <[email protected]>; Ajay Sharma <[email protected]>; Dexuan Cui <[email protected]>; KY Srinivasan <[email protected]>; Wei Liu<[email protected]>; David S.
Quoted 19 lines
Quoted 19 lines
Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>;
linux- [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version ofcfg_rx_steer_reqto enable RX coalescingQuoted 10 lines · Haiyang Zhang
Quoted 10 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Sunday, May 7, 2023 4:11 AM
To: Long Li <[email protected]>
Cc: Jason Gunthorpe <[email protected]>; Ajay Sharma <[email protected]>; Dexuan Cui <[email protected]>; KY Srinivasan <[email protected]>; Haiyang ZhangQuoted 3 lines
Quoted 3 lines
Quoted 2 lines
Quoted 2 lines
Wei Liu <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>;
Jakub
Quoted 27 lines
Quoted 27 lines
Quoted 1 line
Quoted 1 line
Kicinski <[email protected]>;
Paolo
Quoted 5 lines
Quoted 5 lines
Abeni <[email protected]>; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]
Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version ofcfg_rx_steer_reqto
Quoted 9 lines
Quoted 9 lines
enable RX coalescing
Quoted 4 lines · On Fri, May 05, 2023 at 11:51:48AM -0700, [email protected] wrote:
From: Long Li <[email protected]>
With RX coalescing, one CQE entry can be used to indicate multiple
packets
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
on the receive queue. This saves processing time and PCI bandwidth over the CQ.
Signed-off-by Long Li <[email protected]>--- drivers/infiniband/hw/mana/qp.c | 5 ++++- include/net/mana/mana.h | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-)Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Why didn't you change
mana_cfg_vport_steering()too?The
mana_cfg_vport_steering()is formana_en(Enthernet) driver, not themana_ibdriver.The changes for
mana_enwill be done in a separate patch together with changes formana_enRX code patch to support multiple packets /CQE.
Quoted 7 lines
Quoted 6 lines
I'm aware of the difference between
mana_enandmana_ib.The change you proposed doesn't depend on "support multiple packets / CQE."
and works perfectly with one packet/CQE also, does it?Quoted 5 lines
No.
If we add the following setting to themana_en/mana_cfg_vport_steering(), the NIC may put multiple packets in one CQE, so we need to have the changes formana_enRX code path to supportQuoted 6 lines
multiple packets / CQE.
Review
Quoted 1 line
(quoted diff) +1
-0+ req->cqe_coalescing_enable = true;You can leave "
cqe_coalescing_enable= false" for ETH and still reuse your new
v2 struct.I think your proposal will work for both Ethernet and IB.
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
The idea is that we want this patch to change the behavior of the IB driver. We
plan to make another patch for the Ethernet driver. This makes it easier to track all changes for a driver.
And I don't want to deal with deletion of v1 struct for two/three kernel cycles instead of one patch in one cycle.
I'm resubmitting this patch to replace v1 for both driver.
Great
Quoted 12 lines
Quoted 12 lines
Quoted 7 lines
Quoted 7 lines
H>
Quoted 2 lines
So we plan to set this
cqe_coalescing_enable, and the changes formana_enRX code path to support multiple packets / CQE in anotherpatch.
Quoted 4 lines
Quoted 3 lines
And how does it work with IB without changing anything except this proposed patch?
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
The RX CQE Coalescing is implemented in the user-mode. This feature is
always turned on from cluster. The user-mode code is written in a way that can deal with both CQE Coalescing and CQE non-coalescing, so it doesn't depend on kernel version for the correct behavior.
Yes, but how does userspace know that CQE coalescing was enabled?
The user-mode doesn't know if CQE is enabled in advance. If this information is required I can modify the patch to pass this information along to rdma-core. However, this is not useful as the cluster is running with CQE coalescing enabled by default, there is no need to know this information.
It is ok, not needed. if we can do something without UAPI involvement, it will be always preferable way.
Thanks