All of lore.kernel.org
 help / color / mirror / Atom feed
* Q on ioctl support in netfront/netback
@ 2010-02-15  2:23 ravi kerur
  2010-02-15  9:40 ` Paul Durrant
  0 siblings, 1 reply; 10+ messages in thread
From: ravi kerur @ 2010-02-15  2:23 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 660 bytes --]

Hello!!!

Our network driver support ioctl calls from applications for register
reads/writes. I am wondering can ioctl calls be supported from domU to dom0?
i.e call flow will be

application invokes ioctl ---> netfront ioctl ----->via xenbus ------>
netback ioctl ------> to actual driver in dom0

with the return path in similar fashion.

Looked at the existing netfront and netback drivers and with my
understanding it seems it is not possible. I looked at scsifront and
scsiback, assuming storage drivers should be supporting ioctls, didn't see
anything related to it. Wanted to know what's the mechanism to support
ioctls. Inputs appreciated.

Thanks
-RK

[-- Attachment #1.2: Type: text/html, Size: 728 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Q on ioctl support in netfront/netback
  2010-02-15  2:23 Q on ioctl support in netfront/netback ravi kerur
@ 2010-02-15  9:40 ` Paul Durrant
  2010-02-15 15:54   ` ravi kerur
  0 siblings, 1 reply; 10+ messages in thread
From: Paul Durrant @ 2010-02-15  9:40 UTC (permalink / raw)
  To: ravi kerur; +Cc: xen-devel

ravi kerur wrote:
> 
> Our network driver support ioctl calls from applications for register 
> reads/writes. I am wondering can ioctl calls be supported from domU to 
> dom0? i.e call flow will be
> 
> application invokes ioctl ---> netfront ioctl ----->via xenbus ------> 
> netback ioctl ------> to actual driver in dom0
> 
> with the return path in similar fashion.
> 

I'm wondering precisely what register in netback you wish to access?

-- 
===============================
Paul Durrant, Software Engineer

Citrix Systems (R&D) Ltd.
First Floor, Building 101
Cambridge Science Park
Milton Road
Cambridge CB4 0FY
United Kingdom
===============================

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Q on ioctl support in netfront/netback
  2010-02-15  9:40 ` Paul Durrant
@ 2010-02-15 15:54   ` ravi kerur
  2010-02-16 18:14     ` Konrad Rzeszutek Wilk
  2010-02-17  3:26     ` Daniel Stodden
  0 siblings, 2 replies; 10+ messages in thread
From: ravi kerur @ 2010-02-15 15:54 UTC (permalink / raw)
  To: Paul Durrant; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 984 bytes --]

Paul,

Registers are not in netback, they are h/w registers on NIC and the driver
supports reads/writes via ioctl calls. Driver is in dom0 and application
which reads/writes registers is run in domU.

-RK

On Mon, Feb 15, 2010 at 1:40 AM, Paul Durrant <paul.durrant@citrix.com>wrote:

> ravi kerur wrote:
>
>>
>> Our network driver support ioctl calls from applications for register
>> reads/writes. I am wondering can ioctl calls be supported from domU to dom0?
>> i.e call flow will be
>>
>> application invokes ioctl ---> netfront ioctl ----->via xenbus ------>
>> netback ioctl ------> to actual driver in dom0
>>
>> with the return path in similar fashion.
>>
>>
> I'm wondering precisely what register in netback you wish to access?
>
> --
> ===============================
> Paul Durrant, Software Engineer
>
> Citrix Systems (R&D) Ltd.
> First Floor, Building 101
> Cambridge Science Park
> Milton Road
> Cambridge CB4 0FY
> United Kingdom
> ===============================
>

[-- Attachment #1.2: Type: text/html, Size: 1504 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Q on ioctl support in netfront/netback
  2010-02-15 15:54   ` ravi kerur
@ 2010-02-16 18:14     ` Konrad Rzeszutek Wilk
  2010-02-17 16:19       ` ravi kerur
  2010-02-17  3:26     ` Daniel Stodden
  1 sibling, 1 reply; 10+ messages in thread
From: Konrad Rzeszutek Wilk @ 2010-02-16 18:14 UTC (permalink / raw)
  To: ravi kerur; +Cc: Paul Durrant, xen-devel

On Mon, Feb 15, 2010 at 07:54:02AM -0800, ravi kerur wrote:
> Paul,
> 
> Registers are not in netback, they are h/w registers on NIC and the driver
> supports reads/writes via ioctl calls. Driver is in dom0 and application
> which reads/writes registers is run in domU.

You could use PCI passthrough. This way the NIC would be visible in your
DomU and you could fiddle with the registers.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Q on ioctl support in netfront/netback
  2010-02-15 15:54   ` ravi kerur
  2010-02-16 18:14     ` Konrad Rzeszutek Wilk
@ 2010-02-17  3:26     ` Daniel Stodden
  2010-02-17 15:44       ` ravi kerur
  1 sibling, 1 reply; 10+ messages in thread
From: Daniel Stodden @ 2010-02-17  3:26 UTC (permalink / raw)
  To: ravi kerur; +Cc: Paul Durrant, xen-devel

On Mon, 2010-02-15 at 10:54 -0500, ravi kerur wrote:
> Paul,
> 
> Registers are not in netback, they are h/w registers on NIC and the
> driver supports reads/writes via ioctl calls. Driver is in dom0 and
> application which reads/writes registers is run in domU. 

Why do you want to map or preserve some register interface? 

Is this some sort of hardware multiplex? As Konrad pointed out, in that
case a PV driver is probably the wrong approach altogether.

If what you want is just a bunch of extended control plane attributes,
rather consider mapping them to xenstore. 

That's slightly more asynchronous and probably not a great option if you
need a synchronous interface. Especially if you need individual return
values, not just a bunch of fields to write into.

If the latter case, next option would be some dedicated shared memory
structure. But it's hard to imagine something like that to make
sense. :}

Daniel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Q on ioctl support in netfront/netback
  2010-02-17  3:26     ` Daniel Stodden
@ 2010-02-17 15:44       ` ravi kerur
  0 siblings, 0 replies; 10+ messages in thread
From: ravi kerur @ 2010-02-17 15:44 UTC (permalink / raw)
  To: Daniel Stodden; +Cc: Paul Durrant, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1591 bytes --]

Hi Daniel,

These registers are(DMA, statistics, and other h/w related to NIC), I just
want to read those registers and in very few cases write to them. Currently,
I can run those applications in dom0 and access directly but I wanted to
check if anything is possible from domU? Other thing I tried using sockets
from domU to dom0(albeit I had clear firewall settings in dom0) but Citrix
support forum mentioned it is not the recommended way. I am not sure whether
I answered your question, let me know if you need additional info.

Thanks
-RK

On Tue, Feb 16, 2010 at 7:26 PM, Daniel Stodden
<daniel.stodden@citrix.com>wrote:

> On Mon, 2010-02-15 at 10:54 -0500, ravi kerur wrote:
> > Paul,
> >
> > Registers are not in netback, they are h/w registers on NIC and the
> > driver supports reads/writes via ioctl calls. Driver is in dom0 and
> > application which reads/writes registers is run in domU.
>
> Why do you want to map or preserve some register interface?
>
> Is this some sort of hardware multiplex? As Konrad pointed out, in that
> case a PV driver is probably the wrong approach altogether.
>
> If what you want is just a bunch of extended control plane attributes,
> rather consider mapping them to xenstore.
>
> That's slightly more asynchronous and probably not a great option if you
> need a synchronous interface. Especially if you need individual return
> values, not just a bunch of fields to write into.
>
> If the latter case, next option would be some dedicated shared memory
> structure. But it's hard to imagine something like that to make
> sense. :}
>
> Daniel
>
>

[-- Attachment #1.2: Type: text/html, Size: 2065 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Q on ioctl support in netfront/netback
  2010-02-16 18:14     ` Konrad Rzeszutek Wilk
@ 2010-02-17 16:19       ` ravi kerur
  2010-02-17 16:27         ` Pasi Kärkkäinen
  2010-02-17 16:40         ` Konrad Rzeszutek Wilk
  0 siblings, 2 replies; 10+ messages in thread
From: ravi kerur @ 2010-02-17 16:19 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: Paul Durrant, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 728 bytes --]

Hi Konrad,

Using PCI passthrough(I believe it is via config file changes) prevents
other domU's accessing the NIC correct? If I use it, would the network
transmit/receive still happen via netfront/netback drivers?

Thanks
-RK

On Tue, Feb 16, 2010 at 10:14 AM, Konrad Rzeszutek Wilk <
konrad.wilk@oracle.com> wrote:

> On Mon, Feb 15, 2010 at 07:54:02AM -0800, ravi kerur wrote:
> > Paul,
> >
> > Registers are not in netback, they are h/w registers on NIC and the
> driver
> > supports reads/writes via ioctl calls. Driver is in dom0 and application
> > which reads/writes registers is run in domU.
>
> You could use PCI passthrough. This way the NIC would be visible in your
> DomU and you could fiddle with the registers.
>

[-- Attachment #1.2: Type: text/html, Size: 1071 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Q on ioctl support in netfront/netback
  2010-02-17 16:19       ` ravi kerur
@ 2010-02-17 16:27         ` Pasi Kärkkäinen
  2010-02-17 16:40         ` Konrad Rzeszutek Wilk
  1 sibling, 0 replies; 10+ messages in thread
From: Pasi Kärkkäinen @ 2010-02-17 16:27 UTC (permalink / raw)
  To: ravi kerur; +Cc: Paul Durrant, xen-devel, Konrad Rzeszutek Wilk

On Wed, Feb 17, 2010 at 08:19:14AM -0800, ravi kerur wrote:
>    Hi Konrad,
> 
>    Using PCI passthrough(I believe it is via config file changes) prevents
>    other domU's accessing the NIC correct? If I use it, would the network
>    transmit/receive still happen via netfront/netback drivers?
> 

No. If you use PCI passthrough then the domU uses the real driver for the nic
that would also be used on baremetal or in dom0.

PCI passthrough for a NIC is only possible to one/single domU, per PCI device.

(Some multiport NICs show up as a multiple PCI devices, which allows you to 
passthrough different ports to different domUs).

-- Pasi

>    Thanks
>    -RK
> 
>    On Tue, Feb 16, 2010 at 10:14 AM, Konrad Rzeszutek Wilk
>    <[1]konrad.wilk@oracle.com> wrote:
> 
>      On Mon, Feb 15, 2010 at 07:54:02AM -0800, ravi kerur wrote:
>      > Paul,
>      >
>      > Registers are not in netback, they are h/w registers on NIC and the
>      driver
>      > supports reads/writes via ioctl calls. Driver is in dom0 and
>      application
>      > which reads/writes registers is run in domU.
> 
>      You could use PCI passthrough. This way the NIC would be visible in your
>      DomU and you could fiddle with the registers.
> 
> References
> 
>    Visible links
>    1. mailto:konrad.wilk@oracle.com

> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Q on ioctl support in netfront/netback
  2010-02-17 16:19       ` ravi kerur
  2010-02-17 16:27         ` Pasi Kärkkäinen
@ 2010-02-17 16:40         ` Konrad Rzeszutek Wilk
  2010-02-17 20:00           ` ravi kerur
  1 sibling, 1 reply; 10+ messages in thread
From: Konrad Rzeszutek Wilk @ 2010-02-17 16:40 UTC (permalink / raw)
  To: ravi kerur; +Cc: Paul Durrant, xen-devel

On Wed, Feb 17, 2010 at 08:19:14AM -0800, ravi kerur wrote:
> Hi Konrad,
> 
> Using PCI passthrough(I believe it is via config file changes) prevents
> other domU's accessing the NIC correct? If I use it, would the network

That is correct.

> transmit/receive still happen via netfront/netback drivers?

If you have two NICs, where one of them is PCI passthrough and
the other dedicated to the guests, then the second can serve as
netback/netfront.

Thought I wonder if you can have the netback in the guest. This
way you could fiddle with your registers in one domain, and export
a network interface (vif) to the other guests from the domain that
owns the PCI device.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Q on ioctl support in netfront/netback
  2010-02-17 16:40         ` Konrad Rzeszutek Wilk
@ 2010-02-17 20:00           ` ravi kerur
  0 siblings, 0 replies; 10+ messages in thread
From: ravi kerur @ 2010-02-17 20:00 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: Paul Durrant, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1017 bytes --]

Hi Konrad, Pasi

Thanks for your inputs. Looks like we(our team) needs to take a step back
and evaluate this and other things we have discovered in the past few days.
We will get back to you with more questions.

Thanks
-RK

On Wed, Feb 17, 2010 at 8:40 AM, Konrad Rzeszutek Wilk <
konrad.wilk@oracle.com> wrote:

> On Wed, Feb 17, 2010 at 08:19:14AM -0800, ravi kerur wrote:
> > Hi Konrad,
> >
> > Using PCI passthrough(I believe it is via config file changes) prevents
> > other domU's accessing the NIC correct? If I use it, would the network
>
> That is correct.
>
> > transmit/receive still happen via netfront/netback drivers?
>
> If you have two NICs, where one of them is PCI passthrough and
> the other dedicated to the guests, then the second can serve as
> netback/netfront.
>
> Thought I wonder if you can have the netback in the guest. This
> way you could fiddle with your registers in one domain, and export
> a network interface (vif) to the other guests from the domain that
> owns the PCI device.
>

[-- Attachment #1.2: Type: text/html, Size: 1436 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-02-17 20:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-15  2:23 Q on ioctl support in netfront/netback ravi kerur
2010-02-15  9:40 ` Paul Durrant
2010-02-15 15:54   ` ravi kerur
2010-02-16 18:14     ` Konrad Rzeszutek Wilk
2010-02-17 16:19       ` ravi kerur
2010-02-17 16:27         ` Pasi Kärkkäinen
2010-02-17 16:40         ` Konrad Rzeszutek Wilk
2010-02-17 20:00           ` ravi kerur
2010-02-17  3:26     ` Daniel Stodden
2010-02-17 15:44       ` ravi kerur

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.