Re: [ovs-dev] [PATCH] netdev: Remove modulo operation in dpdk/vhost/afxdp tx path

2023-10-09 Thread Simon Horman
On Sat, Oct 07, 2023 at 06:06:56AM +, Li,Rongqing wrote:
> 
> 
> > -Original Message-
> > From: Simon Horman 
> > Sent: Friday, October 6, 2023 6:52 PM
> > To: Li,Rongqing 
> > Cc: d...@openvswitch.org
> > Subject: Re: [ovs-dev] [PATCH] netdev: Remove modulo operation in
> > dpdk/vhost/afxdp tx path
> > 
> > On Tue, Mar 23, 2021 at 11:51:33AM +0800, Li RongQing wrote:
> > > After 324c8374852a ("dpif-netdev: XPS (Transmit Packet Steering)
> > > implementation."), it is impossible that qid is greater than or equal
> > > to n_txq of netdev. so remove this modulo operation which is in hot
> > > path
> > >
> > > Signed-off-by: Li RongQing 
> > 
> > Hi Li RongQing,
> > 
> > This patch appears to have gone stale in patchwork, for one reason or 
> > another. If
> > it is still relevant then I think it needs to be revisited, by being 
> > reposted after
> > appropriate preparation.
> > 
> > As such I'm marking this patch as "Deferred" in patchwork.
> > 
> > No action is required unless there is a desire to revisit this patch.
> 
> 
> I hope this patch can be reviewed
> And modulo is an expensive operations in some CPUs, and it is in hot path

Hi Li RongQing,

In that case, please consider rebasing and reposting the patch.

For one, it does not appear to apply cleanly anymore.
For another, this will allow it to run through the upstream CI,
AFIK, which was not in place when the patch was originally submitted.

Thanks!
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH] netdev: Remove modulo operation in dpdk/vhost/afxdp tx path

2023-10-07 Thread Li,Rongqing via dev



> -Original Message-
> From: Simon Horman 
> Sent: Friday, October 6, 2023 6:52 PM
> To: Li,Rongqing 
> Cc: d...@openvswitch.org
> Subject: Re: [ovs-dev] [PATCH] netdev: Remove modulo operation in
> dpdk/vhost/afxdp tx path
> 
> On Tue, Mar 23, 2021 at 11:51:33AM +0800, Li RongQing wrote:
> > After 324c8374852a ("dpif-netdev: XPS (Transmit Packet Steering)
> > implementation."), it is impossible that qid is greater than or equal
> > to n_txq of netdev. so remove this modulo operation which is in hot
> > path
> >
> > Signed-off-by: Li RongQing 
> 
> Hi Li RongQing,
> 
> This patch appears to have gone stale in patchwork, for one reason or 
> another. If
> it is still relevant then I think it needs to be revisited, by being reposted 
> after
> appropriate preparation.
> 
> As such I'm marking this patch as "Deferred" in patchwork.
> 
> No action is required unless there is a desire to revisit this patch.


I hope this patch can be reviewed
And modulo is an expensive operations in some CPUs, and it is in hot path

Thanks

-Li

 
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH] netdev: Remove modulo operation in dpdk/vhost/afxdp tx path

2023-10-06 Thread Simon Horman
On Tue, Mar 23, 2021 at 11:51:33AM +0800, Li RongQing wrote:
> After 324c8374852a ("dpif-netdev: XPS (Transmit Packet Steering)
> implementation."), it is impossible that qid is greater than or
> equal to n_txq of netdev. so remove this modulo operation which
> is in hot path
> 
> Signed-off-by: Li RongQing 

Hi Li RongQing,

This patch appears to have gone stale in patchwork, for one reason or
another. If it is still relevant then I think it needs to be revisited,
by being reposted after appropriate preparation.

As such I'm marking this patch as "Deferred" in patchwork.

No action is required unless there is a desire to revisit this patch.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH] netdev: Remove modulo operation in dpdk/vhost/afxdp tx path

2021-03-22 Thread Li RongQing
After 324c8374852a ("dpif-netdev: XPS (Transmit Packet Steering)
implementation."), it is impossible that qid is greater than or
equal to n_txq of netdev. so remove this modulo operation which
is in hot path

Signed-off-by: Li RongQing 
---
 lib/netdev-afxdp.c | 1 -
 lib/netdev-dpdk.c  | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/netdev-afxdp.c b/lib/netdev-afxdp.c
index 482400d8d..c16ba7b90 100644
--- a/lib/netdev-afxdp.c
+++ b/lib/netdev-afxdp.c
@@ -1117,7 +1117,6 @@ netdev_afxdp_batch_send(struct netdev *netdev, int qid,
 
 if (concurrent_txq) {
 dev = netdev_linux_cast(netdev);
-qid = qid % netdev_n_txq(netdev);
 
 ovs_spin_lock(>tx_locks[qid].lock);
 ret = __netdev_afxdp_batch_send(netdev, qid, batch);
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 9d8096668..0078957ff 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -2598,7 +2598,7 @@ __netdev_dpdk_vhost_send(struct netdev *netdev, int qid,
 int max_retries = VHOST_ENQ_RETRY_MIN;
 int vid = netdev_dpdk_get_vid(dev);
 
-qid = dev->tx_q[qid % netdev->n_txq].map;
+qid = dev->tx_q[qid].map;
 
 if (OVS_UNLIKELY(vid < 0 || !dev->vhost_reconfigured || qid < 0
  || !(dev->flags & NETDEV_UP))) {
@@ -2872,7 +2872,6 @@ netdev_dpdk_send__(struct netdev_dpdk *dev, int qid,
 }
 
 if (OVS_UNLIKELY(concurrent_txq)) {
-qid = qid % dev->up.n_txq;
 rte_spinlock_lock(>tx_q[qid].tx_lock);
 }
 
-- 
2.17.3

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev