Skip to contentSkip to conversation

MKISS DRIVER PATCH - for layer 3 longword alignment in m68000

DISCUSSION Sriram Chadalavada 3 participants 4 messages Apr 24, 2005 – Apr 26, 2005

lore
Share & tools
lore
#0 lore raw

Hi Mr. Albas,
I am porting AX25 applications/tools to Arcturus
Networks uCdimm (Motorola MC68VZ328) as part of my masters project (www.engr.ku.edu/~kutesat).

I tried to get TCP/IP applications(uClinux) such as FTP, SSH working over an AX.25 link but faced kernel panics due to memory alignment issues in the mkiss driver, whenever (ICMP, TCP) packets were received on the relevant 'kiss' interface.

In consultation with David McCollough (Snapgear/cyberguard.com), I have come up with a patch(see attachment) to solve the above problem in architectures such as m68000 where alignment issues are not handled in hardware.

The solution lies in increasing skbuf size by 1 and aligning the layer 3 header by using skb_reserve(skb,1). This approach has been used in several ethernet drivers to make them work on these architectures.

This change is not yet a part of the mkiss driver (2.6.11 kernel). PLease let me know if my patch can be incorporated into your driver code. The patched driver works on both x86 and m68000.

Kindly reply soon and let me know if you have any questions.

Thank you,
Sriram C.
(University of Kansas, USA)

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

#1 lore raw
Quoted 7 lines · Sriram Chadalavada

In consultation with David McCollough (Snapgear/cyberguard.com), I have come up with a patch(see attachment) to solve the above problem in architectures such as m68000 where alignment issues are not handled in hardware.

Quoted 5 lines

The solution lies in increasing skbuf size by 1 and aligning the layer 3 header by using skb_reserve(skb,1). This approach has been used in several ethernet drivers to make them work on these architectures.

I'm sorry, but it looks like the attachment wasn't included or was stripped off, could you please send it again or feel free to mail it to me, and I will make it available on my webserver.

-ve3tix

#2 lore raw
In reply to Sriram Chadalavada
Quoted 10 lines · Sriram Chadalavada

FTP, SSH working over an AX.25 link but faced kernel panics due to memory alignment issues in the mkiss driver, whenever (ICMP, TCP) packets were received on the relevant 'kiss' interface.

In consultation with David McCollough (Snapgear/cyberguard.com), I have come up with a patch(see attachment) to solve the above problem in architectures such as m68000 where alignment issues are not handled in hardware.

http://www.privacy.nb.ca/~mctylr/uClinux/mkiss-skb-align.patch

#3 lore raw
Quoted 16 lines · M Taylor
Quoted 5 lines · Sriram Chadalavada

FTP, SSH working over an AX.25 link but faced kernel panics due to memory alignment issues in the mkiss driver, whenever (ICMP, TCP) packets were received on the relevant 'kiss' interface.

Quoted 7 lines

In consultation with David McCollough (Snapgear/cyberguard.com), I have come up with a patch(see attachment) to solve the above problem in architectures such as m68000 where alignment issues are not handled in hardware.

Quoted 3 lines

http://www.privacy.nb.ca/~mctylr/uClinux/mkiss-skb-align.patch

It looks ok, but there are some unneeded whitespace changes in your patch...
And on a personal note I like comments in C style more than the C++ style you use. /* ... */ instead of // ... But that might be just me :)

Jeroen