public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcin Mielniczuk <marcin@golem.network>
To: Leon Romanovsky <leon@kernel.org>
Cc: Krishnamraju Eraparaju <krishna2@chelsio.com>,
	linux-rdma@vger.kernel.org
Subject: Re: Setting up siw devices
Date: Mon, 26 Aug 2019 12:02:47 +0200	[thread overview]
Message-ID: <1d28390e-c55a-3f9b-4b25-2239bdb71d6e@golem.network> (raw)
In-Reply-To: <20190822183807.GN29433@mtr-leonro.mtl.com>

With the kernel built with yiour patch the device is still being
renamed. (tbh, I don't even see why this patch would help)
But it's not a big issue for me right now, I can just type in the
renamed interface name.
Thanks

On 22.08.2019 20:38, Leon Romanovsky wrote:
> On Thu, Aug 22, 2019 at 07:58:56PM +0200, Marcin Mielniczuk wrote:
>> On 22.08.2019 19:21, Leon Romanovsky wrote:
>>> On Thu, Aug 22, 2019 at 07:05:12PM +0200, Marcin Mielniczuk wrote:
>>>> Thanks a lot, this did the trick. I think this is worth documenting
>>>> somewhere that this step is needed.
>>>> I'll make a PR, would README.md in the rdma-core repo be a good place?
>>> I'm not so sure, but it is better to have in some place instead of not having at all.
>> I think it's the first place one would look for some information. I'll
>> make a PR today or tomorrow.
>>>> Does <NAME> have any significance? I did:
>>>>
>>>>      sudo rdma link add siw0 type siw netdev enpXsYYfZ
>>>>
>>>> but the resulting device is called iwpXsYYfZ. I couldn't find a trace of
>>>> `siw0` anywhere.
>>> I would say that it is a bug in kernel part of SIW, because kernel rename
>>> (the thing which change your siw0 to be iw* name) is looking for absence
>>> of mentioning PCI inside of /sys/class/infiniband/siw0/*
>>> https://github.com/linux-rdma/rdma-core/blob/master/kernel-boot/rdma_rename.c#L378
>> I don't have /sys/class/infiniband/siw0 on my system, only
>> /sys/class/infiniband/iwpXsYYfZ.
>> iwp probably comes from iWARP.
> Your iwpXsYYfZ was siw0 before rdma_rename was executed.
>
> I can't test the patch now, but hope that this change below will fix your problem.
>
> diff --git a/drivers/infiniband/sw/siw/siw_main.c b/drivers/infiniband/sw/siw/siw_main.c
> index 05a92f997f60..38c25a26dfb2 100644
> --- a/drivers/infiniband/sw/siw/siw_main.c
> +++ b/drivers/infiniband/sw/siw/siw_main.c
> @@ -326,21 +326,6 @@ static struct siw_device *siw_device_create(struct net_device *netdev)
>  	struct device *parent = netdev->dev.parent;
>  	int rv;
>
> -	if (!parent) {
> -		/*
> -		 * The loopback device has no parent device,
> -		 * so it appears as a top-level device. To support
> -		 * loopback device connectivity, take this device
> -		 * as the parent device. Skip all other devices
> -		 * w/o parent device.
> -		 */
> -		if (netdev->type != ARPHRD_LOOPBACK) {
> -			pr_warn("siw: device %s error: no parent device\n",
> -				netdev->name);
> -			return NULL;
> -		}
> -		parent = &netdev->dev;
> -	}
>  	sdev = ib_alloc_device(siw_device, base_dev);
>  	if (!sdev)
>  		return NULL;
>


  parent reply	other threads:[~2019-08-26 10:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22 15:08 Setting up siw devices Marcin Mielniczuk
2019-08-22 15:43 ` Krishnamraju Eraparaju
2019-08-22 15:52   ` Leon Romanovsky
2019-08-22 17:05     ` Marcin Mielniczuk
2019-08-22 17:21       ` Leon Romanovsky
2019-08-22 17:58         ` Marcin Mielniczuk
2019-08-22 18:38           ` Leon Romanovsky
2019-08-22 19:13             ` Jason Gunthorpe
2019-08-22 19:24               ` Leon Romanovsky
2019-08-26 10:02             ` Marcin Mielniczuk [this message]
2019-08-26 11:39               ` Leon Romanovsky
2019-08-26 18:21                 ` Marcin Mielniczuk
     [not found]     ` <b4bf4bc2-8dc7-a2c2-6bd2-ab41d9fbadc9@golem.network>
2019-08-23 14:17       ` Marcin Mielniczuk
2019-08-23 14:50         ` Jason Gunthorpe

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=1d28390e-c55a-3f9b-4b25-2239bdb71d6e@golem.network \
    --to=marcin@golem.network \
    --cc=krishna2@chelsio.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /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