Forum Topic - my io-pkt-v4 driver overwrites the en0 interface in ifconfig: (8 Items)
   
my io-pkt-v4 driver overwrites the en0 interface in ifconfig  
Hi,

I am currently writing an ethernet driver which basically works fine.
Before loading my driver, I already have an smsc9500 ethernet driver loaded which is displayed as en0 in ifconfig.
The problem is that as soon as I load my driver via io-pkt-v4, en0 disappears from ifconfig and my interface is shown 
instead.
The smsc driver is still working, but I just can't see it in ifconfig anymore.
As soon as I kill io-pkt-v4 for the new driver, en0 appears again.

Is there a kind of index or something else I am missing?

Thanks,
Clemens
Re: my io-pkt-v4 driver overwrites the en0 interface in ifconfig  
Are you running 2 instances of io-pkt? If so, then the second instance
should be started with ³-ptcpip prefix=/alt² command line argument. To
interact with the second instance of io-pkt, you need to prefix all
commands with ³SOCK=/alt ifconfig в etc.




On 2014/2/5, 11:47 AM, "Clemens Fischer" <community-noreply@qnx.com> wrote:

>Hi,
>
>I am currently writing an ethernet driver which basically works fine.
>Before loading my driver, I already have an smsc9500 ethernet driver
>loaded which is displayed as en0 in ifconfig.
>The problem is that as soon as I load my driver via io-pkt-v4, en0
>disappears from ifconfig and my interface is shown instead.
>The smsc driver is still working, but I just can't see it in ifconfig
>anymore.
>As soon as I kill io-pkt-v4 for the new driver, en0 appears again.
>
>Is there a kind of index or something else I am missing?
>
>Thanks,
>Clemens
>
>
>
>_______________________________________________
>
>Technology
>http://community.qnx.com/sf/go/post108616
>To cancel your subscription to this discussion, please e-mail
>technology-networking-unsubscribe@community.qnx.com

Re: my io-pkt-v4 driver overwrites the en0 interface in ifconfig  
If you want them in the same io-pkt:

# mount -T io-pkt /fullpath/to/your_driver.so

Running two instances may be easier for debugging initially.

On Wed, Feb 05, 2014 at 04:54:17PM +0000, Hugh Brown wrote:
> Are you running 2 instances of io-pkt? If so, then the second instance
> should be started with ³-ptcpip prefix=/alt² command line argument. To
> interact with the second instance of io-pkt, you need to prefix all
> commands with ³SOCK=/alt ifconfig в etc.
> 
> 
> 
> 
> On 2014/2/5, 11:47 AM, "Clemens Fischer" <community-noreply@qnx.com> wrote:
> 
> >Hi,
> >
> >I am currently writing an ethernet driver which basically works fine.
> >Before loading my driver, I already have an smsc9500 ethernet driver
> >loaded which is displayed as en0 in ifconfig.
> >The problem is that as soon as I load my driver via io-pkt-v4, en0
> >disappears from ifconfig and my interface is shown instead.
> >The smsc driver is still working, but I just can't see it in ifconfig
> >anymore.
> >As soon as I kill io-pkt-v4 for the new driver, en0 appears again.
> >
> >Is there a kind of index or something else I am missing?
> >
> >Thanks,
> >Clemens
> >
> >
> >
> >_______________________________________________
> >
> >Technology
> >http://community.qnx.com/sf/go/post108616
> >To cancel your subscription to this discussion, please e-mail
> >technology-networking-unsubscribe@community.qnx.com
> 
> 
> 
> 
> 
> _______________________________________________
> 
> Technology
> http://community.qnx.com/sf/go/post108618
> To cancel your subscription to this discussion, please e-mail technology-networking-unsubscribe@community.qnx.com
Re: my io-pkt-v4 driver overwrites the en0 interface in ifconfig  
I have chosen the mount version and it works fine.
Thanks guys for the fast and helpful resonse.

Regards,
Clemens

> 
> If you want them in the same io-pkt:
> 
> # mount -T io-pkt /fullpath/to/your_driver.so
> 
> Running two instances may be easier for debugging initially.
> 
> On Wed, Feb 05, 2014 at 04:54:17PM +0000, Hugh Brown wrote:
> > Are you running 2 instances of io-pkt? If so, then the second instance
> > should be started with ³-ptcpip prefix=/alt² command line argument. To
> > interact with the second instance of io-pkt, you need to prefix all
> > commands with ³SOCK=/alt ifconfig в etc.
> > 
> > 
> > 
> > 
> > On 2014/2/5, 11:47 AM, "Clemens Fischer" <community-noreply@qnx.com> wrote:
> > 
> > >Hi,
> > >
> > >I am currently writing an ethernet driver which basically works fine.
> > >Before loading my driver, I already have an smsc9500 ethernet driver
> > >loaded which is displayed as en0 in ifconfig.
> > >The problem is that as soon as I load my driver via io-pkt-v4, en0
> > >disappears from ifconfig and my interface is shown instead.
> > >The smsc driver is still working, but I just can't see it in ifconfig
> > >anymore.
> > >As soon as I kill io-pkt-v4 for the new driver, en0 appears again.
> > >
> > >Is there a kind of index or something else I am missing?
> > >
> > >Thanks,
> > >Clemens
> > >
> > >
> > >
> > >_______________________________________________
> > >
> > >Technology
> > >http://community.qnx.com/sf/go/post108616
> > >To cancel your subscription to this discussion, please e-mail
> > >technology-networking-unsubscribe@community.qnx.com
> > 
> > 
> > 
> > 
> > 
> > _______________________________________________
> > 
> > Technology
> > http://community.qnx.com/sf/go/post108618
> > To cancel your subscription to this discussion, please e-mail technology-
> networking-unsubscribe@community.qnx.com


Re: my io-pkt-v4 driver overwrites the en0 interface in ifconfig  
I am still facing an issue with the mount version.
Mounting the driver works fine and the interface is visible with ifconfig.
As soon as I try to associate an IP-Address with the device, ifconfig hangs and does not return.
It also seems as if the other active ethernet connections are disconnected, as I can't connect to the target through 
qconn anymore.
I have tracked down the issue to the init function of the driver and this instruction:

ifp->if_flags_tx |= IFF_RUNNING;

I took this instruction from the speedo implementation. I assume it enables transmission?
When I remove this, mount works and I can assign an IP-address just fine, but I can't transmit any data.
When using a second io-pkt-v4 instance I don't face this issue.

Any ideas?

Regards,
Clemens

> I have chosen the mount version and it works fine.
> Thanks guys for the fast and helpful resonse.
> 
> Regards,
> Clemens
> 
> > 
> > If you want them in the same io-pkt:
> > 
> > # mount -T io-pkt /fullpath/to/your_driver.so
> > 
> > Running two instances may be easier for debugging initially.
> > 
> > On Wed, Feb 05, 2014 at 04:54:17PM +0000, Hugh Brown wrote:
> > > Are you running 2 instances of io-pkt? If so, then the second instance
> > > should be started with ³-ptcpip prefix=/alt² command line argument. To
> > > interact with the second instance of io-pkt, you need to prefix all
> > > commands with ³SOCK=/alt ifconfig в etc.
> > > 
> > > 
> > > 
> > > 
> > > On 2014/2/5, 11:47 AM, "Clemens Fischer" <community-noreply@qnx.com> wrote:
> > > 
> > > >Hi,
> > > >
> > > >I am currently writing an ethernet driver which basically works fine.
> > > >Before loading my driver, I already have an smsc9500 ethernet driver
> > > >loaded which is displayed as en0 in ifconfig.
> > > >The problem is that as soon as I load my driver via io-pkt-v4, en0
> > > >disappears from ifconfig and my interface is shown instead.
> > > >The smsc driver is still working, but I just can't see it in ifconfig
> > > >anymore.
> > > >As soon as I kill io-pkt-v4 for the new driver, en0 appears again.
> > > >
> > > >Is there a kind of index or something else I am missing?
> > > >
> > > >Thanks,
> > > >Clemens
> > > >
> > > >
> > > >
> > > >_______________________________________________
> > > >
> > > >Technology
> > > >http://community.qnx.com/sf/go/post108616
> > > >To cancel your subscription to this discussion, please e-mail
> > > >technology-networking-unsubscribe@community.qnx.com
> > > 
> > > 
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > 
> > > Technology
> > > http://community.qnx.com/sf/go/post108618
> > > To cancel your subscription to this discussion, please e-mail technology-
> > networking-unsubscribe@community.qnx.com
> 
> 


Re: my io-pkt-v4 driver overwrites the en0 interface in ifconfig  
You say this is an io-pkt driver and yet it is coming up as en0, are you actually passing in "en" on the dev_attach() 
call? You need to pass in a string that is unique for your driver, typically a 2 or 3 letter abbreviation for the type 
of hardware your driver controls. The string "en" is used by the shim driver for io-net drivers running within io-pkt.
Re: my io-pkt-v4 driver overwrites the en0 interface in ifconfig  
No, I am loading a driver for a smsc chip which comes up as en0.
In addition I am loading a second self written driver via mount which comes up with a user defined three character 
string which I have defined.

The problem now is that when I load the self written driver via mount, assigning an ip with ifconfig fails. Ifconfig 
just does not return.
If I load my driver with io-pkt-v4, i.e. not mounting it, assigning an ip with ifconfig works fine.

> You say this is an io-pkt driver and yet it is coming up as en0, are you 
> actually passing in "en" on the dev_attach() call? You need to pass in a 
> string that is unique for your driver, typically a 2 or 3 letter abbreviation 
> for the type of hardware your driver controls. The string "en" is used by the 
> shim driver for io-net drivers running within io-pkt.


Re: my io-pkt-v4 driver overwrites the en0 interface in ifconfig  
Ah sorry for the misunderstanding.

When it locks up, CTRL-Z the ifconfig and use dumper to grab a core of io-pkt. The backtrace usually has a good clue as 
to what is going on.