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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/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 ============================== _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
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 > ==============================>_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Konrad Rzeszutek Wilk
2010-Feb-16 18:14 UTC
Re: [Xen-devel] Q on ioctl support in netfront/netback
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. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Daniel Stodden
2010-Feb-17 03:26 UTC
Re: [Xen-devel] Q on ioctl support in netfront/netback
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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
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 > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
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. >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Pasi Kärkkäinen
2010-Feb-17 16:27 UTC
Re: [Xen-devel] Q on ioctl support in netfront/netback
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_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Konrad Rzeszutek Wilk
2010-Feb-17 16:40 UTC
Re: [Xen-devel] Q on ioctl support in netfront/netback
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 networkThat 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. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
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. >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel