2013-01-24 12:02:22

by 기상원 (SW Ki)

[permalink] [raw]
Subject: [question] how can i make to 32bit aligned address for the 'data' field of sk_buff structure ?

hello everyone.

i have question. i want to use DMA for the 'data' field of sk_buff structure.
but sometimes, the 'data' field of sk_buff structure is not 32bit aligned.
so, how can i make to 32bit aligned address for the 'data' field of sk_buff structure ?

best regards.
sangwon,ki




2013-01-25 01:44:10

by 기상원 (SW Ki)

[permalink] [raw]
Subject: RE: [question] how can i make to 32bit aligned address for the 'data' field of sk_buff structure ?

hi Larry Finger.

below log message show the our problem for detailed.
you can find the our DMA address 32bit align problem in 2nd paragraph after association packet dump of 1st paragraph.
in authentication packet dump log message, skb->data address is 0xC0A5E580 that is aligned of 32bit.
but, in association packet dump log message, skb->data address is 0xC098800E that is not aligned of 32bit.
just aligned of 16bit.

our dma controller can accept the only 32bit aligned address for transferring.
I'd like to know a good way to solve my problem.

wlan0: SME: Trying to authenticate with 00:50:43:21:22:2b (SSID='MarvellAP' freq=2442 MHz)
0xC0A5E580: B0 00 00 00 00 50 43 21 22 2B 00 01 02 03 04 05 .....PC!"+......
0xC0A5E680: 00 50 43 21 22 2B 00 00 00 00 01 00 00 00 01 00 .PC!"+..........
0xC0A5E780: 00 00


wlan0: Trying to associate with 00:50:43:21:22:2b (SSID='MarvellAP' freq=2442 MHz)
0xC098800E: 00 00 00 00 00 50 43 21 22 2B 00 01 02 03 04 05 .....PC!"+......
0xC098810E: 00 50 43 21 22 2B F0 02 21 04 05 00 00 09 4D 61 .PC!"+..!.....Ma
0xC098820E: 72 76 65 6C 6C 41 50 01 08 02 04 0B 16 0C 12 18 rvellAP.........
0xC098830E: 24 32 04 30 48 60 6C 2D 1A 2C 00 1B FF 00 00 00 $2.0H`l-.,......
0xC098840E: 00 00 00 00


thanks, best regards,
sangwon,ki

-----Original Message-----
From: Larry Finger [mailto:[email protected]] On Behalf Of Larry Finger
Sent: Friday, January 25, 2013 1:28 AM
To: ?????? (SW Ki)
Cc: [email protected]
Subject: Re: [question] how can i make to 32bit aligned address for the 'data' field of sk_buff structure ?

On 01/24/2013 05:58 AM, ?????? (SW Ki) wrote:
> hello everyone.
>
> i have question. i want to use DMA for the 'data' field of sk_buff structure.
> but sometimes, the 'data' field of sk_buff structure is not 32bit aligned.
> so, how can i make to 32bit aligned address for the 'data' field of sk_buff structure ?

A standard sk_buff should meet all the alignment requirements for your architecture. Could you provide more details about your architecture and an example where the sk_buff does not have the correct alignment?

Larry







2013-01-24 16:27:41

by Larry Finger

[permalink] [raw]
Subject: Re: [question] how can i make to 32bit aligned address for the 'data' field of sk_buff structure ?

On 01/24/2013 05:58 AM, ?????? (SW Ki) wrote:
> hello everyone.
>
> i have question. i want to use DMA for the 'data' field of sk_buff structure.
> but sometimes, the 'data' field of sk_buff structure is not 32bit aligned.
> so, how can i make to 32bit aligned address for the 'data' field of sk_buff structure ?

A standard sk_buff should meet all the alignment requirements for your
architecture. Could you provide more details about your architecture and an
example where the sk_buff does not have the correct alignment?

Larry