* mlx4 - query regarding PF VF functionality division
@ 2014-06-23 9:33 Bob Biloxi
2014-06-23 12:00 ` Or Gerlitz
0 siblings, 1 reply; 5+ messages in thread
From: Bob Biloxi @ 2014-06-23 9:33 UTC (permalink / raw)
To: linux-rdma@vger.kernel.org, linux-pci@vger.kernel.org
Hi All,
I was going through the Mellanox driver (mlx4) and then I had
difficulty understanding which portion of code corresponds to the one
executed by the PF(Physical Function Driver) and which portion of code
by (Virtual Function Driver) in the SRIOV mode.
My confusion is because, I was of the understanding that the QPs, CQs
(and their creation, state mgmt commands) etc are to be performed by
the virtual function driver(VF driver).
And the role of the physical function driver(PF driver) is to just
take care of the resource_tracker.c and ICM allocation.
But of late, I think I may have understood wrong. This is because
there is code that is specifically executed when mlx4_is_master is
true/false( indicating PF or VF).
And then, there is code which is not surrounded by this test, which
indicates it is executed in both cases(PF driver as well as VF
driver).
Is my understanding correct? If yes, then are the QPs, CQs and
ethernet tx, rx related functionality is executed both by master and
slave?
Is there any way we can clearly separate the files that are used by PF
vs the files that are used by VF in the (drivers/net/ethernet/mlx4
sub-directory)?
I would be really thankful and really appreciate all the
help/clarification I can get in understanding this.
Thank you so much.
Best Regards,
Bob
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mlx4 - query regarding PF VF functionality division
2014-06-23 9:33 mlx4 - query regarding PF VF functionality division Bob Biloxi
@ 2014-06-23 12:00 ` Or Gerlitz
2014-06-24 13:42 ` Bob Biloxi
0 siblings, 1 reply; 5+ messages in thread
From: Or Gerlitz @ 2014-06-23 12:00 UTC (permalink / raw)
To: Bob Biloxi; +Cc: linux-rdma@vger.kernel.org, linux-pci@vger.kernel.org
On Mon, Jun 23, 2014 at 12:33 PM, Bob Biloxi <iambobbiloxi@gmail.com> wrote:
[...]
> Is there any way we can clearly separate the files that are used by PF
> vs the files that are used by VF in the (drivers/net/ethernet/mlx4
> sub-directory)?
[...]
Not really, but let's take EIM approach, what's your goal/mission?
Or.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mlx4 - query regarding PF VF functionality division
2014-06-23 12:00 ` Or Gerlitz
@ 2014-06-24 13:42 ` Bob Biloxi
2014-06-25 20:43 ` Or Gerlitz
0 siblings, 1 reply; 5+ messages in thread
From: Bob Biloxi @ 2014-06-24 13:42 UTC (permalink / raw)
To: Or Gerlitz; +Cc: linux-rdma@vger.kernel.org, linux-pci@vger.kernel.org
> Not really, but let's take EIM approach, what's your goal/mission?
Let's say I am going through code to understand only the PF related
functionality without bothering about VF, what are the things I need
to keep in mind.
I mean do i need to :
a. Go through all the files in mlx4
b. If the code is not specifically under mlx4_is_master, I still need
to understand it because it is also part of PF driver
c. I can ignore the logic which executes if mlx4_is_master is false,
because that would be the VF code
Thanks for the help!!
On Mon, Jun 23, 2014 at 5:30 PM, Or Gerlitz <or.gerlitz@gmail.com> wrote:
> On Mon, Jun 23, 2014 at 12:33 PM, Bob Biloxi <iambobbiloxi@gmail.com> wrote:
> [...]
>> Is there any way we can clearly separate the files that are used by PF
>> vs the files that are used by VF in the (drivers/net/ethernet/mlx4
>> sub-directory)?
> [...]
>
> Not really, but let's take EIM approach, what's your goal/mission?
>
> Or.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mlx4 - query regarding PF VF functionality division
2014-06-24 13:42 ` Bob Biloxi
@ 2014-06-25 20:43 ` Or Gerlitz
2014-06-26 9:03 ` Bob Biloxi
0 siblings, 1 reply; 5+ messages in thread
From: Or Gerlitz @ 2014-06-25 20:43 UTC (permalink / raw)
To: Bob Biloxi
Cc: linux-rdma@vger.kernel.org, linux-pci@vger.kernel.org,
Jack Morgenstein
On Tue, Jun 24, 2014 at 4:42 PM, Bob Biloxi <iambobbiloxi@gmail.com> wrote:
>
> > Not really, but let's take EIM approach, what's your goal/mission?
> Let's say I am going through code to understand only the PF related
> functionality without bothering about VF, what are the things I need
> to keep in mind.
I see, by the nature of the mlx4 SRIOV architecture under which
there's no dedicated/separated PF vs VF driver, this is indeed a
non-trivial task, need to think how to make it easier for you
Or.
>
> I mean do i need to :
>
> a. Go through all the files in mlx4
> b. If the code is not specifically under mlx4_is_master, I still need
> to understand it because it is also part of PF driver
> c. I can ignore the logic which executes if mlx4_is_master is false,
> because that would be the VF code
>
> Thanks for the help!!
>
>
>
>
> On Mon, Jun 23, 2014 at 5:30 PM, Or Gerlitz <or.gerlitz@gmail.com> wrote:
> > On Mon, Jun 23, 2014 at 12:33 PM, Bob Biloxi <iambobbiloxi@gmail.com> wrote:
> > [...]
> >> Is there any way we can clearly separate the files that are used by PF
> >> vs the files that are used by VF in the (drivers/net/ethernet/mlx4
> >> sub-directory)?
> > [...]
> >
> > Not really, but let's take EIM approach, what's your goal/mission?
> >
> > Or.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mlx4 - query regarding PF VF functionality division
2014-06-25 20:43 ` Or Gerlitz
@ 2014-06-26 9:03 ` Bob Biloxi
0 siblings, 0 replies; 5+ messages in thread
From: Bob Biloxi @ 2014-06-26 9:03 UTC (permalink / raw)
To: Or Gerlitz
Cc: linux-rdma@vger.kernel.org, linux-pci@vger.kernel.org,
Jack Morgenstein
> I see, by the nature of the mlx4 SRIOV architecture under which
> there's no dedicated/separated PF vs VF driver, this is indeed a
> non-trivial task, need to think how to make it easier for you
Thanks for considering. It would be really helpful. I actually
appreciate the mlx4 architecture wherein 3 separate drivers are part
of 1 integrated code base which I think is really difficult to
accomplish. I mean the dedicated driver, VF driver, PF driver are all
part of single code base which i think is good.
The only thing is when one wants to understand these pieces (VF or PF)
separately, it takes some effort(as in my case)
For e.g
there is this flow:
mlx4_en_get-qp()->mlx4_register_mac()->mlx4_slave_cmd()
after this the wrapper function gets called be it either for
master(PF) or for slave(VF)
Till now I was assuming that this makes sense only for the slave(VF)
because register_mac is supposed to be called by VF. But from the code
even the PF makes the call. So i was somewhat confused.
It would be of immense help if I could understand this somehow..
On Thu, Jun 26, 2014 at 2:13 AM, Or Gerlitz <or.gerlitz@gmail.com> wrote:
> On Tue, Jun 24, 2014 at 4:42 PM, Bob Biloxi <iambobbiloxi@gmail.com> wrote:
>>
>> > Not really, but let's take EIM approach, what's your goal/mission?
>> Let's say I am going through code to understand only the PF related
>> functionality without bothering about VF, what are the things I need
>> to keep in mind.
>
>
>
> I see, by the nature of the mlx4 SRIOV architecture under which
> there's no dedicated/separated PF vs VF driver, this is indeed a
> non-trivial task, need to think how to make it easier for you
>
> Or.
>
>
>>
>> I mean do i need to :
>>
>> a. Go through all the files in mlx4
>> b. If the code is not specifically under mlx4_is_master, I still need
>> to understand it because it is also part of PF driver
>> c. I can ignore the logic which executes if mlx4_is_master is false,
>> because that would be the VF code
>>
>> Thanks for the help!!
>>
>>
>>
>>
>> On Mon, Jun 23, 2014 at 5:30 PM, Or Gerlitz <or.gerlitz@gmail.com> wrote:
>> > On Mon, Jun 23, 2014 at 12:33 PM, Bob Biloxi <iambobbiloxi@gmail.com> wrote:
>> > [...]
>> >> Is there any way we can clearly separate the files that are used by PF
>> >> vs the files that are used by VF in the (drivers/net/ethernet/mlx4
>> >> sub-directory)?
>> > [...]
>> >
>> > Not really, but let's take EIM approach, what's your goal/mission?
>> >
>> > Or.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-06-26 9:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-23 9:33 mlx4 - query regarding PF VF functionality division Bob Biloxi
2014-06-23 12:00 ` Or Gerlitz
2014-06-24 13:42 ` Bob Biloxi
2014-06-25 20:43 ` Or Gerlitz
2014-06-26 9:03 ` Bob Biloxi
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).