On Thursday 15 July 2004 00:01, Adrian Bunk wrote: > /** > + * e1000_rx_checksum - Receive Checksum Offload for 82543 > + * @adapter: board private structure > + * @rx_desc: receive descriptor > + * @sk_buff: socket buffer with received data > + **/ > + > +static inline void > +e1000_rx_checksum(struct e1000_adapter *adapter, > + struct e1000_rx_desc *rx_desc, > + struct sk_buff *skb) > +{ > + /* 82543 or newer only */ > + if((adapter->hw.mac_type < e1000_82543) || > + /* Ignore Checksum bit is set */ > + (rx_desc->status & E1000_RXD_STAT_IXSM) || > + /* TCP Checksum has not been calculated */ > + (!(rx_desc->status & E1000_RXD_STAT_TCPCS))) { > + skb->ip_summed = CHECKSUM_NONE; > + return; > + } > + > + /* At this point we know the hardware did the TCP checksum */ > + /* now look at the TCP checksum error bit */ > + if(rx_desc->errors & E1000_RXD_ERR_TCPE) { > + /* let the stack verify checksum errors */ > + skb->ip_summed = CHECKSUM_NONE; > + adapter->hw_csum_err++; > + } else { > + /* TCP checksum is good */ > + skb->ip_summed = CHECKSUM_UNNECESSARY; > + adapter->hw_csum_good++; > + } > +} > + > +/** > * e1000_clean_rx_irq - Send received data up the network stack, > * @adapter: board private structure > **/ As you go thru them, consider removing inline keyword for such large functions. > @@ -2580,41 +2616,6 @@ > return E1000_SUCCESS; > } > > -/** > - * e1000_rx_checksum - Receive Checksum Offload for 82543 > - * @adapter: board private structure > - * @rx_desc: receive descriptor > - * @sk_buff: socket buffer with received data > - **/ > - > -static inline void > -e1000_rx_checksum(struct e1000_adapter *adapter, > - struct e1000_rx_desc *rx_desc, > - struct sk_buff *skb) > -{ > - /* 82543 or newer only */ > - if((adapter->hw.mac_type < e1000_82543) || > - /* Ignore Checksum bit is set */ > - (rx_desc->status & E1000_RXD_STAT_IXSM) || > - /* TCP Checksum has not been calculated */ > - (!(rx_desc->status & E1000_RXD_STAT_TCPCS))) { > - skb->ip_summed = CHECKSUM_NONE; > - return; > - } > - > - /* At this point we know the hardware did the TCP checksum */ > - /* now look at the TCP checksum error bit */ > - if(rx_desc->errors & E1000_RXD_ERR_TCPE) { > - /* let the stack verify checksum errors */ > - skb->ip_summed = CHECKSUM_NONE; > - adapter->hw_csum_err++; > - } else { > - /* TCP checksum is good */ > - skb->ip_summed = CHECKSUM_UNNECESSARY; > - adapter->hw_csum_good++; > - } > -} > - -- vda - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html