<html><body>
<p><tt>Eli Cohen <eli@dev.mellanox.co.il> wrote on 12/02/2007 05:45:59 AM:<br>
<br>
> On Fri, 2007-11-30 at 15:28 -0800, Shirley Ma wrote:<br>
> > I just touch tested ofed-1.3 beta IPoIB. And found there was a kernel <br>
> > parameter hw_csum being added in IPoIB. I have several questions here:<br>
> > 1. Why not using ethtool to set up these HW_CSUM flags?<br>
> There is no adequate interface in Ethtool for doing it so we use a<br>
> module parameter. This is because we see this as a static configuration<br>
> per host.<br>
</tt><br>
<tt>Ethtool does support rx csum and tx csum:</tt><br>
<tt>#define ETHTOOL_GRXCSUM 0x00000014 /* Get RX hw csum enable (ethtool_value) */</tt><br>
<tt>#define ETHTOOL_SRXCSUM 0x00000015 /* Set RX hw csum enable (ethtool_value) */</tt><br>
<tt>#define ETHTOOL_GTXCSUM 0x00000016 /* Get TX hw csum enable (ethtool_value) */</tt><br>
<tt>#define ETHTOOL_STXCSUM 0x00000017 /* Set TX hw csum enable (ethtool_value) */</tt><br>
<br>
<tt>We should use ethtool here.</tt><br>
<tt><br>
> > 2. I haven't looked at the detailed code yet, is that possible with this <br>
> > flag, TCP/IP will not do CSUM for HCA which has no TCP/IP offload support? <br>
> Yes, the HCA need not have checksum offload support. the idea is the IB<br>
> ICRC provides the insurance that the packets are not corrupt.<br>
</tt><br>
<tt>That's something we discussed long time ago when we wanted GSO to avoid extra copy by using ICRC to enable SG feature. I remembered Roland rejected this idea since there could be potenical data corruption. And even if we do prove that ICRC is 100% accurate, then we should have some codes here to limit the IP destination within IB subnet when using ICRC. Otherwise, if the packets routing out to ehthernet IP subnet, these packets will be dropped.</tt><br>
<br>
<tt>thanks</tt><br>
<tt>Shirley</tt></body></html>