From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: David Miller <davem@davemloft.net>,
Networking <netdev@vger.kernel.org>,
Linux-Next Mailing List <linux-next@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Tariq Toukan <tariqt@mellanox.com>,
Saeed Mahameed <saeedm@mellanox.com>,
Tal Gilboa <talgi@mellanox.com>
Subject: Re: linux-next: manual merge of the net-next tree with the pci tree
Date: Thu, 5 Apr 2018 11:40:27 +1000 [thread overview]
Message-ID: <20180405114027.500aefad@canb.auug.org.au> (raw)
In-Reply-To: <20180403131454.4f9f032d@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 3018 bytes --]
Hi all,
On Tue, 3 Apr 2018 13:14:54 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the net-next tree got a conflict in:
>
> drivers/net/ethernet/mellanox/mlx5/core/en_main.c
>
> between commit:
>
> 2907938d2375 ("net/mlx5e: Use pcie_bandwidth_available() to compute bandwidth")
>
> from the pci tree and commit:
>
> 0608d4dbaf4e ("net/mlx5e: Unify slow PCI heuristic")
>
> 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.
>
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> index 884337f88589,0aab3afc6885..000000000000
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> @@@ -3880,16 -4026,50 +4033,20 @@@ void mlx5e_build_default_indir_rqt(u32
> indirection_rqt[i] = i % num_channels;
> }
>
> - static bool cqe_compress_heuristic(u32 link_speed, u32 pci_bw)
> -static int mlx5e_get_pci_bw(struct mlx5_core_dev *mdev, u32 *pci_bw)
> -{
> - enum pcie_link_width width;
> - enum pci_bus_speed speed;
> - int err = 0;
> -
> - err = pcie_get_minimum_link(mdev->pdev, &speed, &width);
> - if (err)
> - return err;
> -
> - if (speed == PCI_SPEED_UNKNOWN || width == PCIE_LNK_WIDTH_UNKNOWN)
> - return -EINVAL;
> -
> - switch (speed) {
> - case PCIE_SPEED_2_5GT:
> - *pci_bw = 2500 * width;
> - break;
> - case PCIE_SPEED_5_0GT:
> - *pci_bw = 5000 * width;
> - break;
> - case PCIE_SPEED_8_0GT:
> - *pci_bw = 8000 * width;
> - break;
> - default:
> - return -EINVAL;
> - }
> -
> - return 0;
> -}
> -
> + static bool slow_pci_heuristic(struct mlx5_core_dev *mdev)
> {
> - return (link_speed && pci_bw &&
> - (pci_bw < 40000) && (pci_bw < link_speed));
> - }
> + u32 link_speed = 0;
> + u32 pci_bw = 0;
>
> - static bool hw_lro_heuristic(u32 link_speed, u32 pci_bw)
> - {
> - return !(link_speed && pci_bw &&
> - (pci_bw <= 16000) && (pci_bw < link_speed));
> + mlx5e_get_max_linkspeed(mdev, &link_speed);
> - mlx5e_get_pci_bw(mdev, &pci_bw);
> ++ pci_bw = pcie_bandwidth_available(mdev->pdev, NULL, NULL, NULL);
> + mlx5_core_dbg_once(mdev, "Max link speed = %d, PCI BW = %d\n",
> + link_speed, pci_bw);
> +
> + #define MLX5E_SLOW_PCI_RATIO (2)
> +
> + return link_speed && pci_bw &&
> + link_speed > MLX5E_SLOW_PCI_RATIO * pci_bw;
> }
>
> void mlx5e_set_tx_cq_mode_params(struct mlx5e_params *params, u8 cq_period_mode)
This is now a conflict between the pci tree and Linus' tree.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2018-04-05 1:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-03 3:14 linux-next: manual merge of the net-next tree with the pci tree Stephen Rothwell
2018-04-05 1:40 ` Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-08-23 2:35 Stephen Rothwell
2017-06-21 1:54 Stephen Rothwell
2017-06-21 13:29 ` Kalle Valo
2017-06-21 13:32 ` Stephen Rothwell
2017-07-03 1:49 ` Stephen Rothwell
2017-04-12 0:25 Stephen Rothwell
2015-12-14 0:27 Stephen Rothwell
2013-04-26 3:31 Stephen Rothwell
2012-12-10 1:08 Stephen Rothwell
2012-12-10 6:44 ` Grumbach, Emmanuel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180405114027.500aefad@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=bhelgaas@google.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=saeedm@mellanox.com \
--cc=talgi@mellanox.com \
--cc=tariqt@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).