On Tue, Nov 29, 2011 at 11:03:00PM +0000, yong...@freebsd.org wrote: ! You can find the patch at the following URL. ! http://people.freebsd.org/~yongari/ed.pf.diff
! Let me know whether this patch works for you. Negative. It does not work. It seems You left away the pointer-arithmetics on src side, and copy the FIRST byte to the LAST position. Putting that right makes it working. *(mtod(m, uint8_t *)) should be *(mtod(m, uint8_t *) + m->m_len - 1) (Possibly there is a way to write this construct more beautiful - I didn't care.) ! since your patch may still invoke bus_space_write_1(9) if mbuf ! length is even bytes. Yes, it does. Deliberately. ;) The original idea seemed to be: "copy byte-pairs of AT LEAST mbuf-size" - on uneven buffers tjat led to copying one byte that doesnt belong. My idea was "copy byte-pairs of AT MOST mbuf-size" which leads to the last byte missing on uneven buffers - and therefore I did ALWAYS copy the LAST byte extra. (Shouldn't hurt copying it twice.) Please understand: it's 20 years ago that I coded C. I don't have all the niceties handy - but I'll find some way to get it do what I want. It looks not always beautiful. ;) Today I did reproduce the panic on 7.4-STABLE with the original code. Then I tried Your patch - and it did what was to be expected: no panic, but when setting "ifconfig ed0 mtu 1499", filetransfers would not proceed at all - the wrong byte obviousely breaks the packet checksum. rgds, PMc _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"