2013-02-07 06:41:14

by 기상원 (SW Ki)

[permalink] [raw]
Subject: Question: how can i applay IP/TCP/UDP checksum offload H/W Engine to our softmac driver on mac80211 ?

hello everyone.

i would like to use our hardware TCP/IP Checksum logic on the mac80211 driver.
but, i can see the IP Checksum in Tx skb_buffer on mac80211 tx handler after "g_ieee80211_hw->netdev_features = NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | NETIF_F_HW_CSUM;"

you can find the IP checksum value that is 0x26, 0x42.
[ 40.970000] queue_skb: IP protocol: 0x00000008
0xC042382E: 88 01 00 00 00 50 43 21 22 2B 00 01 02 03 04 05 .....PC!"+......
0xC042392E: 00 19 B9 79 2D 7E 90 00 00 00 AA AA 03 00 00 00 ...y-~..........
0xC0423A2E: 08 00 45 00 00 54 00 00 40 00 40 01 [26 42] 0A 00 [email protected]@.&B..
0xC0423B2E: 00 04 0A 00 00 64 08 00 CB C5 CB 02 00 01 F0 33 .....d.........3
0xC0423C2E: 71 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 q...............
0xC0423D2E: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0xC0423E2E: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0xC0423F2E: 00 00 00 00 00 00

how can I remove the IP checksum field calculation by software generation on mac80211 stack?

thanks & best regards
Sangwon, Ki




2013-02-07 07:55:23

by Krishna Chaitanya

[permalink] [raw]
Subject: Re: Question: how can i applay IP/TCP/UDP checksum offload H/W Engine to our softmac driver on mac80211 ?

On Thu, Feb 7, 2013 at 12:11 PM, 기상원 (SW Ki) <[email protected]> wrote:
> hello everyone.
>
> i would like to use our hardware TCP/IP Checksum logic on the mac80211 driver.
> but, i can see the IP Checksum in Tx skb_buffer on mac80211 tx handler after "g_ieee80211_hw->netdev_features = NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | NETIF_F_HW_CSUM;"
>
> you can find the IP checksum value that is 0x26, 0x42.
> [ 40.970000] queue_skb: IP protocol: 0x00000008
> 0xC042382E: 88 01 00 00 00 50 43 21 22 2B 00 01 02 03 04 05 .....PC!"+......
> 0xC042392E: 00 19 B9 79 2D 7E 90 00 00 00 AA AA 03 00 00 00 ...y-~..........
> 0xC0423A2E: 08 00 45 00 00 54 00 00 40 00 40 01 [26 42] 0A 00 [email protected]@.&B..
> 0xC0423B2E: 00 04 0A 00 00 64 08 00 CB C5 CB 02 00 01 F0 33 .....d.........3
> 0xC0423C2E: 71 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 q...............
> 0xC0423D2E: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> 0xC0423E2E: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> 0xC0423F2E: 00 00 00 00 00 00
>
> how can I remove the IP checksum field calculation by software generation on mac80211 stack?
>
> thanks & best regards
> Sangwon, Ki
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html


The TCP/IP checksum is calcualted by linux network stack. It does the
below check and decides to go for checksum or not.
skb->ip_summed= CHECKSUM_UNNECESSARY will disable the checksum
calculation by linux stack.

Your HW can appends its own checksum. Good detailed info on
http://www.mail-archive.com/[email protected]/msg17044.html


==============
static inline int skb_csum_unnecessary(const struct sk_buff *skb)
{
return skb->ip_summed & CHECKSUM_UNNECESSARY;
}