On Aug 25, 2009, at 12:24 PM, Russell Mitchell wrote:
I know this thread is old, but It directly relates to my problem.
I'm using ILL_START_WALK_ALL() in my driver, and it is now causing a
kernel panic with S10 U5. More specifically, my driver works fine
with the base installation of S10 U5, but there is a patch (I'm not
sure which one yet) that enables the failure. I realize now that I
shouldn't be using ILL_START_WALK_ALL now, but need help in figuring
out the 'right' way to do it. Currently, I'm doing the following:
ill_t *il;
ip_stack_t *ipst;
ill_walk_context_t ctx;
ipst= netstack_find_by_stackid(GLOBAL_NETSTACKID)->netstack_ip;
for (il=ILL_START_WALK_ALL( &ctx, ipst ); il!=NULL;
il=ill_next( &ctx, il )) {
Can this be done using the ldi_xxx routines, and if so, how?
Russ, the OpenAFS project ran into the same issue with the OpenAFS
kernel driver back with the advent of update 4. The reason (iirc) is
that the ILL_START_WALK_ALL macro, not being a Public interface, had a
3rd argument added. Lack of that 3rd argument is likely what made your
kernel go boom.
The solution is to use the ldi_ioctl() calls to get the interface
parameters you need.
Here's the patch I made that went into fixing this in OpenAFS. The
afsifinfo struct, which is used to store an interface's info such as
mtu and whatnot, is global, What basically happens is that a taskq
runs every 30 seconds or so and calls osi_NetIfPoller(). That func
does the needed ldi_ioctl() calls to populate that struct with the
needed info.
http://elektronkind.org/outbox/afs/openafs-s10u4-compat.patch
This code will work across all Solaris 10 kernels and uses committed
interfaces to do its thing.
HTH
/dale
_______________________________________________
networking-discuss mailing list
[email protected]