From: Zhu Yanjun <redacted>
Based on the link https://www.spinics.net/lists/linux-rdma/msg73735.html,
get the source udp port number for a QP based on the grh.flow_label or
lqpn/rqrpn. This provides a better spread of traffic across NIC RX queues.
The method in the commit 2b880b2e5e03 ("RDMA/mlx5: Define RoCEv2 udp
source port when set path") is a standard way. So it is also adopted in
this commit.
Signed-off-by: Zhu Yanjun <redacted>
---
V2->V3: Move to the block of IB_QP_AV in the mask and IB_AH_GRH in ah_flags
V1->V2: Adopt a standard method to get udp source port.
---
drivers/infiniband/hw/irdma/verbs.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
From: Ismail, Mustafa <hidden> Date: 2021-12-21 23:07:43
Subject: [PATCHv3 1/1] RDMA/irdma: Make the source udp port vary
From: Zhu Yanjun <redacted>
Based on the link https://www.spinics.net/lists/linux-rdma/msg73735.html,
get the source udp port number for a QP based on the grh.flow_label or
lqpn/rqrpn. This provides a better spread of traffic across NIC RX queues.
The method in the commit 2b880b2e5e03 ("RDMA/mlx5: Define RoCEv2 udp
source port when set path") is a standard way. So it is also adopted in this
commit.
Signed-off-by: Zhu Yanjun <redacted>
---
V2->V3: Move to the block of IB_QP_AV in the mask and IB_AH_GRH in
V2->ah_flags
V1->V2: Adopt a standard method to get udp source port.
---
drivers/infiniband/hw/irdma/verbs.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
Please use lore.kernel.org links. They have all chances to outlive spinics.
quoted hunk
get the source udp port number for a QP based on the grh.flow_label or
lqpn/rqrpn. This provides a better spread of traffic across NIC RX queues.
The method in the commit 2b880b2e5e03 ("RDMA/mlx5: Define RoCEv2 udp
source port when set path") is a standard way. So it is also adopted in
this commit.
Signed-off-by: Zhu Yanjun <redacted>
---
V2->V3: Move to the block of IB_QP_AV in the mask and IB_AH_GRH in ah_flags
V1->V2: Adopt a standard method to get udp source port.
---
drivers/infiniband/hw/irdma/verbs.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
I don't see too much value in these extra variables and extra function
that is the same as get_udp_sport() from hns.
It is worth to add new function to ib_verbs.h and reuse in both drivers.
Thanks
Please use lore.kernel.org links. They have all chances to outlive spinics.
quoted
get the source udp port number for a QP based on the grh.flow_label or
lqpn/rqrpn. This provides a better spread of traffic across NIC RX queues.
The method in the commit 2b880b2e5e03 ("RDMA/mlx5: Define RoCEv2 udp
source port when set path") is a standard way. So it is also adopted in
this commit.
Signed-off-by: Zhu Yanjun <redacted>
---
V2->V3: Move to the block of IB_QP_AV in the mask and IB_AH_GRH in ah_flags
V1->V2: Adopt a standard method to get udp source port.
---
drivers/infiniband/hw/irdma/verbs.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
I don't see too much value in these extra variables and extra function
that is the same as get_udp_sport() from hns.
It is worth to add new function to ib_verbs.h and reuse in both drivers.
Do you mean the following function should be added into ib_verbs.h?
"
static inline u16 rdma_get_udp_sport(u32 fl, u32 lqpn, u32 rqpn)
{
if (!fl)
fl = rdma_calc_flow_label(lqpn, rqpn);
return rdma_flow_label_to_udp_sport(fl);
}
"
Then in hns, rxe and irdma, this function is called to get udp source port?
If so, I will send new patches.
Thanks.
Zhu Yanjun
Please use lore.kernel.org links. They have all chances to outlive spinics.
quoted
get the source udp port number for a QP based on the grh.flow_label or
lqpn/rqrpn. This provides a better spread of traffic across NIC RX queues.
The method in the commit 2b880b2e5e03 ("RDMA/mlx5: Define RoCEv2 udp
source port when set path") is a standard way. So it is also adopted in
this commit.
Signed-off-by: Zhu Yanjun <redacted>
---
V2->V3: Move to the block of IB_QP_AV in the mask and IB_AH_GRH in ah_flags
V1->V2: Adopt a standard method to get udp source port.
---
drivers/infiniband/hw/irdma/verbs.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
I don't see too much value in these extra variables and extra function
that is the same as get_udp_sport() from hns.
It is worth to add new function to ib_verbs.h and reuse in both drivers.
Do you mean the following function should be added into ib_verbs.h?
"
static inline u16 rdma_get_udp_sport(u32 fl, u32 lqpn, u32 rqpn)
{
if (!fl)
fl = rdma_calc_flow_label(lqpn, rqpn);
return rdma_flow_label_to_udp_sport(fl);
}
"
Then in hns, rxe and irdma, this function is called to get udp source port?
If so, I will send new patches.
Yes and group all these patches in one series, please.
Thanks
Subject: [PATCHv3 1/1] RDMA/irdma: Make the source udp port vary
From: Zhu Yanjun <redacted>
Based on the link https://www.spinics.net/lists/linux-rdma/msg73735.html,
get the source udp port number for a QP based on the grh.flow_label or
lqpn/rqrpn. This provides a better spread of traffic across NIC RX queues.
The method in the commit 2b880b2e5e03 ("RDMA/mlx5: Define RoCEv2 udp
source port when set path") is a standard way. So it is also adopted in this
commit.
Signed-off-by: Zhu Yanjun <redacted>
---
V2->V3: Move to the block of IB_QP_AV in the mask and IB_AH_GRH in
V2->ah_flags
V1->V2: Adopt a standard method to get udp source port.
---
drivers/infiniband/hw/irdma/verbs.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
Subject: [PATCHv3 1/1] RDMA/irdma: Make the source udp port vary
From: Zhu Yanjun <redacted>
Based on the link https://www.spinics.net/lists/linux-rdma/msg73735.html,
get the source udp port number for a QP based on the grh.flow_label or
lqpn/rqrpn. This provides a better spread of traffic across NIC RX queues.
The method in the commit 2b880b2e5e03 ("RDMA/mlx5: Define RoCEv2 udp
source port when set path") is a standard way. So it is also adopted in this
commit.
Signed-off-by: Zhu Yanjun <redacted>
---
V2->V3: Move to the block of IB_QP_AV in the mask and IB_AH_GRH in
V2->ah_flags
V1->V2: Adopt a standard method to get udp source port.
---
drivers/infiniband/hw/irdma/verbs.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)