[dpdk-dev,1/5] net/mlx5: last WQE no room inline
Checks
Commit Message
Prior to this patch, when sending a packet and the following
conditions were reached:
1. last working queue element is used.
2. inline was requested by the user
3. no room for inline packet.
then the inline request was ignored and the packet was sent
by pointer completely.
This patch handles this scenario. In this case the last
work queue element is turned to be a null work queue element and
the packet is being sent after the wrap around.
Signed-off-by: Elad Persiko <eladpe@mellanox.com>
---
drivers/net/mlx5/mlx5_rxtx.c | 12 ++++++++++++
drivers/net/mlx5/mlx5_txq.c | 8 ++++++--
2 files changed, 18 insertions(+), 2 deletions(-)
Comments
On 1/8/2017 3:41 PM, Elad Persiko wrote:
> Prior to this patch, when sending a packet and the following
> conditions were reached:
> 1. last working queue element is used.
> 2. inline was requested by the user
> 3. no room for inline packet.
> then the inline request was ignored and the packet was sent
> by pointer completely.
>
> This patch handles this scenario. In this case the last
> work queue element is turned to be a null work queue element and
> the packet is being sent after the wrap around.
>
> Signed-off-by: Elad Persiko <eladpe@mellanox.com>
It looks like this series missing driver maintainer CC'ed.
Cc: Adrien Mazarguil <adrien.mazarguil@6wind.com>
On 1/23/2017 12:27 PM, Ferruh Yigit wrote:
> On 1/8/2017 3:41 PM, Elad Persiko wrote:
>> Prior to this patch, when sending a packet and the following
>> conditions were reached:
>> 1. last working queue element is used.
>> 2. inline was requested by the user
>> 3. no room for inline packet.
>> then the inline request was ignored and the packet was sent
>> by pointer completely.
>>
>> This patch handles this scenario. In this case the last
>> work queue element is turned to be a null work queue element and
>> the packet is being sent after the wrap around.
>>
>> Signed-off-by: Elad Persiko <eladpe@mellanox.com>
>
> It looks like this series missing driver maintainer CC'ed.
>
> Cc: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This series postponed to next release (17.05).
There was an expected update to merge with another patch [1], not
received in this release time frame.
[1]
http://dpdk.org/dev/patchwork/patch/19009/
Thanks,
ferruh
@@ -481,6 +481,17 @@
pkt_inline_sz += copy_b;
/* Sanity check. */
assert(addr <= addr_end);
+ } else {
+ wqe->ctrl = (rte_v128u32_t){
+ htonl(txq->wqe_ci << 8),
+ htonl(txq->qp_num_8s | 1),
+ 0,
+ 0,
+ };
+ length = 0;
+ buf = *(pkts--);
+ ds = 1;
+ goto next_pkt_part;
}
/*
* 2 DWORDs consumed by the WQE header + ETH segment +
@@ -577,6 +588,7 @@
0,
0,
};
+next_pkt_part:
wqe->eseg = (rte_v128u32_t){
0,
cs_flags,
@@ -314,8 +314,12 @@
/* CQ to be associated with the receive queue. */
.recv_cq = tmpl.cq,
.cap = {
- /* Max number of outstanding WRs. */
- .max_send_wr = ((priv->device_attr.max_qp_wr < desc) ?
+ /*
+ * Max number of outstanding WRs.
+ * "+1" for null WQE place holder.
+ */
+ .max_send_wr = ((priv->device_attr.max_qp_wr <
+ (desc + 1)) ?
priv->device_attr.max_qp_wr :
desc),
/*