Re: porting cipe from 2.2.x to 2.3.x (questions on net changes)

Alan Cox (alan@lxorguk.ukuu.org.uk)
Wed, 3 Nov 1999 00:56:53 +0000 (GMT)


> __dev_get_by_name. I am not sure I totally understand what they do and
> if they are needed (cipe doesn't use the older ones currently).
>
> I see the addition of dev_put. I have NO clue what it does even though
> I have looked at the source.

When you get a device handle (ie pointer to a device) the reference count
is also bumped since this is now running without a single lock. dev_put is
just handing back your reference. Its basically SMP safe garbage collection,
a driver wont evaporate on you.

> described to me, a brief description of how and when to use the spin
> locks, and any other info I might not know I need, I would GREATLY
> appreciate it.

Whenever you have two paths through your code you don't wish to execute
in parallel - eg updating a table and routing a packet via it

> Legalities: Is there any thing wrong with me sending patches to him if
> there is NO crypto and NO crypto hooks (hoping to remove all references,
> even if it makes the patch only appliable by hand)? I am a US citizen
> living inside the US.
>
> RTNL: assertion failed at devinet.c(784):inetdev_event
> RTNL: assertion failed at devinet.c(165):inetdev_destroy
> RTNL: assertion failed at igmp.c(578):ip_mc_destroy_dev
> RTNL: assertion failed at devinet.c(209):inet_del_ifa

Take a look at the source listed. It normally means you called a routine
when it thinks you should have a lock held.

> That happens on the removal of the cipe module. Similar happen on
> insert of the module (first one is line 786 I think). What do I need to
> do to fix this?

Take the lock, do all the shutdown then drop it.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/