Hi Daren;

this is the information from the panic trace when calling net_inject(netdata, NI_DIRECT_OUT,...) without cloning and without deep copy , and when returning 1 after net_inject() ,

I get the following crash: packet->mp->b_next == 0L.

I see it in the kernel logs and I made 3 trials.

The info from ::msgbuf and ::panicinfo is this:

::msgbuf
=========

panic[cpu0]/thread=fffffe80000b9c80:
assertion failed: packet->mp->b_next == 0L, file: ../../common/io/e1000g/e1000g_tx.c, line: 972


fffffe80000b9b20 genunix:assfail+83 ()
fffffe80000b9ba0 e1000g:e1000g_recycle+37c ()
fffffe80000b9bf0 e1000g:e1000g_intr+1e8 ()
fffffe80000b9c60 unix:av_dispatch_autovect+97 ()
fffffe80000b9c70 unix:intr_thread+50 ()

syncing file systems...
done
dumping to /dev/dsk/c1d0s1, offset 125042688, content: kernel

===

> ::panicinfo
          cpu                0
       thread fffffe80000b9c80
      message
assertion failed: packet->mp->b_next == 0L, file: ../../common/io/e1000g/e1000g_tx.c, line: 972
          rdi fffffffffbb7c870
          rsi fffffe80000b9aa8
          rdx fffffffff40538f8
          rcx              3cc
           r8 fffffe80000b9ae0
           r9 ffffffff8fac1100
          rax                0
          rbx              3cc
          rbp fffffe80000b9ad0
          r10 fffffe80000b99f0
          r10 fffffe80000b99f0
          r11             5d00
          r12 fffffffff40538f8
          r13 fffffffff4053920
          r14 ffffffff85c73280
          r15                0
       fsbase ffffffff80000000
       gsbase fffffffffbc27b90
           ds               43
           es               43
           fs                0
           gs              1c3
       trapno                0
          err                0
          rip fffffffffb83cba0
           cs               28
       rflags              246
          rsp fffffe80000b99e8
           ss               30
       gdt_hi                0
       gdt_lo         defacedd
       idt_hi                0
       idt_lo         83700fff
          ldt                0
         task               60
          cr0         8005003b
          cr2 fffffd7fff2f1000
          cr3         11652000



Regards
Diego B


Diego B wrote:
Hi;
Thanks again.
I will try to reproduce the panic to send more info.

Another question.
I saw b50 yesterday but without the packet filter code. I was told here in SUN Isreal that b50
will include the packet filter hook code.
There is any new ipfhook code comming for b50? I saw also in a blog that
ipfhook will be part of the Solaris 10 3 beta ( 11/06 beta ), is this correct ?

Thanks
Diego B


Darren Reed wrote:
Diego B wrote:

Hi Darren

Pls see inline.

Thanks for your help.

Darren Reed wrote:

Diego B wrote:

Hi;
We are implementing a module based on the early packet filtering hooks API.
This module is ported from the netfilter Linux API.

Now my question;

We are trying to put packets on the net as soon as we got them and change some parameters to the IP and UDP
headers.
So we catch them in the pre-routing hook (PHYSCAL_IN), change some fields
and we want to put it on the wire ASAP.

My question is: What is the bes way to do that ?
We tried doing net_inject(DIRECT) with the modified packet but the system panic all the time. Can I get any sample code on how to use net_inject ? It is full implemented ?
Or doing net_inject(DIRECT) is not the best way ?



How do you want the system to treat the packet?
If you know the exact interface to send it out and you do not want
to see it again with PHYSICAL_OUT, then you can use DIRECT.

Yes, that is exactly what I want. The packet has to go out from the same interface it comes in. I actually change the source IP address, the Dst IP address, the source UDP port and the dst UDP port. And want the packet to go out. There is any extra field I have to add/change in order to send this packet ?


If you are just swapping fields around, there should be no need to change anything.

And nothing you are doing, by changing the packet in this way, should make a panic.

Do I need to set any routing parameters ? checksums or others ?


I don't believe you need to do any of these.

Do I need to clone ( make a deep copy ) the packet I got as parameter of the hook
to send in net_inject?


No.

Or I can just modify it an send it in net_inject ?


That is the intention, yes.

Darren





_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to