Thread (20 messages) flat view 20 messages, 4 authors, 2012-07-25

RE: [RFC] r8169 : why SG / TX checksum are default disabled

From: hayeswang <hidden>
Date: 2012-07-20 07:14:38

 Francois Romieu [off-list ref]
quoted
quoted
quoted
A NETDEV_TX_OK return means we accepted the SKB, it 
doesn't look like
quoted
quoted
quoted
that's what you are doing in the skb_padto() failure path.
?

- skb_padto fails
  (original skb is implicitely freed)
- skb_padto returns error status (!= 0)
- rtl8169_tso_csum returns false
- start_xmit returns NETDEV_TX_OK. 

I'll search the missing "!" after some sleep if that's 
what you are talking
quoted
quoted
about. Otherwise than that, I don't get it.

Yes, I believe your patch is fine.

In fact many drivers dont account the error in their stats.
My bad, I forgot that skb_padto() frees the SKB on failure.
I find that the total length field of IP header would be modified if the hw
checksum is enabled. Therefore, skb_padto + hw checksum wouldn't work. The
software checksum is necessary.
 
Best Regards,
Hayes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help