All of lore.kernel.org
 help / color / mirror / Atom feed
From: Casey Leedom <leedom@chelsio.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	Eric Dumazet <edumazet@google.com>,
	Tariq Toukan <tariqt@mellanox.com>,
	"David S . Miller" <davem@davemloft.net>,
	"Komali Katari" <komali@chelsio.com>,
	"Luis R. Rodriguez" <mcgrof@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kobject: fix suppressing modalias in uevents delivered over netlink
Date: Fri, 15 Dec 2017 19:17:22 +0000	[thread overview]
Message-ID: <SN1PR12MB035218DF41A1F08791A3E89EC80B0@SN1PR12MB0352.namprd12.prod.outlook.com> (raw)
In-Reply-To: <CAKdAkRRMFVBGvXJnU0EsQV3j4WRUjPKK6vdG=w5Ft3ruHaObBw@mail.gmail.com>

| From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| Sent: Friday, December 15, 2017 10:53 AM
|
|  Hmm, can she collect output of 'udevadm monitor -p' at the time you
| assign the adapter to the VM?

Sure.  I'll have Komali report on that.

| Also, do you have any udev rules that is specific to cxgb? Or any other
| custom udev rules?

I don't ~think~ so, but I'm not super familiar with udev stuff.  Point me at
a place to look and I can get this information for you.  [[ Komali is
hopefully at home in bed sound asleep looking forward to a fun weekend of
adventures! ]]

| Also, we only suppress the modalias string on driver unbind, could it be
| that for you module loading is happening when driver is bound to the
| device?

What Komali is saying is that when she first instantiates the SR-IOV Virtual
Functions, cxgb4vf gets automatically loaded as the VFs come into existence.
This has been happening forever and the only way to prevent this from
happening is to blacklist the cxgb4vf module.  That's fine and normal
behavior and she manually does a "rmmod cxgb4vf" to get rid of it.

But now, after doing the "rmmod cxgb4vf", when she assigns a VF to a Virtual
Machine and brings the VM up, cxgb4vf gets reloaded again.  This is the new
behavior which got introduced with kernel.org commit
1455cf8dbfd06aa7651dcfccbadb7a093944ca65 ...

| Actually, as far as I can see, you share PCI IDs between cxgb4 and cxgb4vf
| drivers, so they have similar modalias entries. How do you normally decide
| what driver is to be loaded for a given device?

The PCI Device IDs for the VFs aren't quite the same as those for the base
adapter Physical Functions.  Our PCI Device IDs look like:

  PF0..3          0x{T}0{DD}
  PF4             0x{T}4{DD}
  PF5             0x{T}5{DD}
  PF6             0x{T}6{DD}
  PF0..3/VF1..16  0x{T}8{DD}

  Where:
    {T} is 4, 5, 6, ... the adapter chip base
    {DD} is the adapter Device ID for that chip base implementation

So the VFs PCI Device IDs are in fact different from any of the PFs.

Casey

  reply	other threads:[~2017-12-15 19:17 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13 23:21 [PATCH] kobject: fix suppressing modalias in uevents delivered over netlink Dmitry Torokhov
2017-12-14 20:15 ` Casey Leedom
2017-12-14 20:32   ` Dmitry Torokhov
2017-12-14 21:38     ` Casey Leedom
2017-12-14 21:44       ` Dmitry Torokhov
2017-12-14 22:08         ` Casey Leedom
2017-12-15 18:17           ` Casey Leedom
2017-12-15 18:53             ` Dmitry Torokhov
2017-12-15 19:17               ` Casey Leedom [this message]
2017-12-18 19:45                 ` Casey Leedom
2017-12-18 20:06                   ` Casey Leedom
2017-12-19 21:20                     ` Casey Leedom
2017-12-21  5:13                       ` Dmitry Torokhov
2017-12-21 20:26                         ` Casey Leedom
2017-12-28  1:56                           ` Casey Leedom
2017-12-31 10:28                         ` Tariq Toukan
2017-12-31 10:39                           ` Greg Kroah-Hartman
2017-12-31 10:55                             ` Tariq Toukan
2017-12-17 15:29     ` Tariq Toukan
2017-12-17 16:48       ` Tariq Toukan
2017-12-19  8:48 ` Greg Kroah-Hartman
2017-12-19  9:12   ` Eric Dumazet
2017-12-19 15:41     ` Tariq Toukan

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=SN1PR12MB035218DF41A1F08791A3E89EC80B0@SN1PR12MB0352.namprd12.prod.outlook.com \
    --to=leedom@chelsio.com \
    --cc=davem@davemloft.net \
    --cc=dmitry.torokhov@gmail.com \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=komali@chelsio.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.