Re: linux-next: manual merge of the net-next tree with the net tree
From: Matthieu Baerts
Date: Sun May 31 2026 - 03:09:03 EST
Hi Mark,
On 30/05/2026 07:21, Mark Brown wrote:
> Hi all,
>
> Today's linux-next merge of the net-next tree got a conflict in:
>
> drivers/net/ethernet/microsoft/mana/mana_en.c
>
> between commit:
>
> 17bfe0a8c014e ("net: mana: Add NULL guards in teardown path to prevent panic on attach failure")
>
> from the net tree and commit:
>
> d07efe5a6e641 ("net: mana: Use per-queue allocation for tx_qp to reduce allocation size")
>
> from the net-next tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
Thank you for the fix! I also had the conflict on my side, but I noticed
a small issue with your resolution, please see below:
> diff --combined drivers/net/ethernet/microsoft/mana/mana_en.c
> index cc48cd06cb15d,c9b1df1ed1098..0000000000000
> --- a/drivers/net/ethernet/microsoft/mana/mana_en.c
> +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
(...)
> @@@ -3338,21 -3296,13 +3338,21 @@@ static int mana_dealloc_queues(struct n
>
> if (apc->tx_qp) {
> for (i = 0; i < apc->num_queues; i++) {
> - txq = &apc->tx_qp[i].txq;
> + txq = &apc->tx_qp[i]->txq;
> tsleep = 1000;
> while (atomic_read(&txq->pending_sends) > 0 &&
> time_before(jiffies, timeout)) {
> usleep_range(tsleep, tsleep + 1000);
> tsleep <<= 1;
> }
> + if (atomic_read(&txq->pending_sends)) {
> + err = pcie_flr(to_pci_dev(gd->gdma_context->dev));
> + if (err) {
> + netdev_err(ndev, "flr failed %d with %d pkts pending in txq %u\n",
> + err, atomic_read(&txq->pending_sends),
> + txq->gdma_txq_id);
> + }
> + }
I don't think you should add this block here, it was already present
below, but slightly different:
- with 'err =' on a single line
- netdev_err()'s parameters have a different indentation
- with a 'break' at the end
In other words, please drop this block here above :)
Just in case, I attached the generated patch, and rerere cache are
available there:
https://github.com/multipath-tcp/mptcp-upstream-rr-cache/commit/29ad33b
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
diff --cc drivers/net/ethernet/microsoft/mana/mana_en.c
index 82f1461a48e9,c9b1df1ed109..2c6402dba5bb
--- a/drivers/net/ethernet/microsoft/mana/mana_en.c
+++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
@@@ -3329,22 -3294,35 +3336,35 @@@ static int mana_dealloc_queues(struct n
* number of queues.
*/
- for (i = 0; i < apc->num_queues; i++) {
- txq = &apc->tx_qp[i]->txq;
- tsleep = 1000;
- while (atomic_read(&txq->pending_sends) > 0 &&
- time_before(jiffies, timeout)) {
- usleep_range(tsleep, tsleep + 1000);
- tsleep <<= 1;
- }
- if (atomic_read(&txq->pending_sends)) {
- err = pcie_flr(to_pci_dev(gd->gdma_context->dev));
- if (err) {
- netdev_err(ndev, "flr failed %d with %d pkts pending in txq %u\n",
- err, atomic_read(&txq->pending_sends),
- txq->gdma_txq_id);
+ if (apc->tx_qp) {
+ for (i = 0; i < apc->num_queues; i++) {
- txq = &apc->tx_qp[i].txq;
++ txq = &apc->tx_qp[i]->txq;
+ tsleep = 1000;
+ while (atomic_read(&txq->pending_sends) > 0 &&
+ time_before(jiffies, timeout)) {
+ usleep_range(tsleep, tsleep + 1000);
+ tsleep <<= 1;
}
- break;
+ if (atomic_read(&txq->pending_sends)) {
+ err =
+ pcie_flr(to_pci_dev(gd->gdma_context->dev));
+ if (err) {
+ netdev_err(ndev, "flr failed %d with %d pkts pending in txq %u\n",
+ err,
+ atomic_read(&txq->pending_sends),
+ txq->gdma_txq_id);
+ }
+ break;
+ }
+ }
+
+ for (i = 0; i < apc->num_queues; i++) {
+ txq = &apc->tx_qp[i].txq;
+ while ((skb = skb_dequeue(&txq->pending_skbs))) {
+ mana_unmap_skb(skb, apc);
+ dev_kfree_skb_any(skb);
+ }
+ atomic_set(&txq->pending_sends, 0);
}
}