Netgraph ISR conflict with HARP ISR

Vincent Jardin vjardin at wanadoo.fr
Sat Apr 19 07:53:27 PDT 2003


Hi,

My kernel is compiled with the HARP stack (ie ATM) support. When I load the 
Netgraph module, the HARP stack is not able anymore to process the incoming 
packets.

It is due to the HARP's netisrs entry that is replaced by the Netgraph's ISR 
one !!!. For example, see on the enclosed log, netisrs[AF_ATM] is pointed on 
ngintr.

In fact, it looks like there is a wrong comment within the source code about 
AF_NETGRAPH and NETISR_NETGRAPH,
$ grep AF_NETGRAPH */*h    
net/netisr.h:#define    NETISR_NETGRAPH 30              /* same as AF_NETGRAPH 
*/
sys/socket.h:#define    AF_NETGRAPH     32              /* Netgraph sockets */
sys/socket.h:#define    PF_NETGRAPH     AF_NETGRAPH

It means that NETISR_NETGRAPH is not AF_NETGRAPH. In fact it would be 
impossible because netisrs can contain only 32 entry. 
netisrs[NETISR_NETGRAPH] would be the 33th one !

whereas
netatm/atm_if.h:#define NETISR_ATM      AF_ATM
sys/socket.h:#define    AF_ATM          30              /* ATM */

That's ok, but Netgraph has stolen the ATM ISR entry ;-(

What could be the clean solution ?

Vincent

PS:
I get this issue on FreeBSD 4.7:

# gdb -k kernel.debug

(kgdb) add-symbol-file netgraph.ko 0xc11ee000+0x2a64
add symbol table from file "netgraph.ko" at text_addr = 0xc11f0a64?
(y or n) y

Reading symbols from netgraph.ko...done.
(kgdb) p ngintr
$5 = {void ()} 0xc11f26b8 <ngintr>
(kgdb) p atm_intr
$6 = {void ()} 0xc01d35bc <atm_intr>
(kgdb)

netisrs[AF_ATM] 0xc11f26b8 ie ngintr !!



More information about the freebsd-net mailing list