[openib-general] Re: [PATCH] IPoIB: Add API to retrieve ib device, port, and pkey

Hal Rosenstock halr at voltaire.com
Thu Oct 6 12:23:19 PDT 2005


On Thu, 2005-10-06 at 15:08, Sean Hefty wrote:
> Roland Dreier wrote:
> >     Sean> Is it possible to retrieve the pkey using
> >     Sean> net_device->class_dev?
> > 
> > Maybe, but even more direct would be taking it from net_device->broadcast.
> 
> Okay - this is starting to make more sense to me now:
> 
> 	priv->dev->broadcast[8] = priv->pkey >> 8;
> 	priv->dev->broadcast[9] = priv->pkey & 0xff;
> 
> I assume that the broadcast address is well defined, and there's no issue 
> reading it from there?  If so, then I think it's a simple change to addr.c to 
> extract it.

What stops the net_device from being pulled from underneath this ? Seems
like a similar issue to me. The difference I see is that only
net_devices need to be tracked rather than perhaps net_devices and
ib_devices.

-- Hal




More information about the general mailing list