[dpdk-dev] net/sfc: fix crash on Tx queue release
Checks
Commit Message
Datapath TxQ handle is passed to release function, not control path.
Fixes: 5808dbaf751f ("net/sfc: factor out libefx-based Tx datapath")
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
Please, squash the patch into 5808dbaf751f.
drivers/net/sfc/sfc_ethdev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Comments
On 3/29/2017 4:08 PM, Andrew Rybchenko wrote:
> Datapath TxQ handle is passed to release function, not control path.
>
> Fixes: 5808dbaf751f ("net/sfc: factor out libefx-based Tx datapath")
>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> ---
> Please, squash the patch into 5808dbaf751f.
Hi Andrew,
To clarify, for the commits in next-net tree that are not merged yet, we
can benefit from sub-tree re-writable option and squash some fixes,
-without over using it.
But for this patch, as far as I can see, original code added with
commit: b1b7ad933b39 ("net/sfc: set up and release Tx queues")
which is part of v17.02 release.
So, please send a patch with correct fixes line and it won't be squashed.
Thanks,
ferruh
On 03/29/2017 07:25 PM, Ferruh Yigit wrote:
> On 3/29/2017 4:08 PM, Andrew Rybchenko wrote:
>> Datapath TxQ handle is passed to release function, not control path.
>>
>> Fixes: 5808dbaf751f ("net/sfc: factor out libefx-based Tx datapath")
>>
>> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
>> ---
>> Please, squash the patch into 5808dbaf751f.
> Hi Andrew,
Hi Ferruh,
> To clarify, for the commits in next-net tree that are not merged yet, we
> can benefit from sub-tree re-writable option and squash some fixes,
> -without over using it.
Yes, it is perfectly clear.
> But for this patch, as far as I can see, original code added with
> commit: b1b7ad933b39 ("net/sfc: set up and release Tx queues")
> which is part of v17.02 release.
If we take a look a lines, yes, these lines belong to
b1b7ad933b39 ("net/sfc: set up and release Tx queues")
however the breakage is introduced by
19f92f3ec37c ("net/sfc: factor out libefx-based Tx datapath")
since it registers pointer to the so-called datapath Tx queue in the
device data
instead of previous used control path Tx queue pointer.
> So, please send a patch with correct fixes line and it won't be squashed.
Correct fixes line for the patch with current dpdk-next-net is:
Fixes: 19f92f3ec37c ("net/sfc: factor out libefx-based Tx datapath")
which is in dpdk-next-net tree only. Should I resend it?
Thanks,
Andrew.
On 3/29/2017 5:37 PM, Andrew Rybchenko wrote:
> On 03/29/2017 07:25 PM, Ferruh Yigit wrote:
>> On 3/29/2017 4:08 PM, Andrew Rybchenko wrote:
>>> Datapath TxQ handle is passed to release function, not control path.
>>>
>>> Fixes: 5808dbaf751f ("net/sfc: factor out libefx-based Tx datapath")
>>>
>>> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
>>> ---
>>> Please, squash the patch into 5808dbaf751f.
>> Hi Andrew,
>
> Hi Ferruh,
>
>> To clarify, for the commits in next-net tree that are not merged yet, we
>> can benefit from sub-tree re-writable option and squash some fixes,
>> -without over using it.
>
> Yes, it is perfectly clear.
>
>> But for this patch, as far as I can see, original code added with
>> commit: b1b7ad933b39 ("net/sfc: set up and release Tx queues")
>> which is part of v17.02 release.
>
> If we take a look a lines, yes, these lines belong to
> b1b7ad933b39 ("net/sfc: set up and release Tx queues")
> however the breakage is introduced by
> 19f92f3ec37c ("net/sfc: factor out libefx-based Tx datapath")
> since it registers pointer to the so-called datapath Tx queue in the
> device data
> instead of previous used control path Tx queue pointer.
Oh, I see now, I was checking updated lines.
>
>> So, please send a patch with correct fixes line and it won't be squashed.
>
> Correct fixes line for the patch with current dpdk-next-net is:
>
> Fixes: 19f92f3ec37c ("net/sfc: factor out libefx-based Tx datapath")
>
> which is in dpdk-next-net tree only. Should I resend it?
I saw you already sent another patch, that is good, thanks.
>
> Thanks,
> Andrew.
@@ -485,13 +485,15 @@ sfc_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,
static void
sfc_tx_queue_release(void *queue)
{
- struct sfc_txq *txq = queue;
+ struct sfc_dp_txq *dp_txq = queue;
+ struct sfc_txq *txq;
unsigned int sw_index;
struct sfc_adapter *sa;
- if (txq == NULL)
+ if (dp_txq == NULL)
return;
+ txq = sfc_txq_by_dp_txq(dp_txq);
sw_index = sfc_txq_sw_index(txq);
SFC_ASSERT(txq->evq != NULL);