[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51716DE5.1070605@mentor.com>
Date: Fri, 19 Apr 2013 17:16:37 +0100
From: Jim Baxter <jim_baxter@...tor.com>
To: Ben Hutchings <bhutchings@...arflare.com>
CC: "David S. Miller" <davem@...emloft.net>,
Fabio Estevam <fabio.estevam@...escale.com>,
Frank Li <Frank.Li@...escale.com>,
Fugang Duan <B38611@...escale.com>, <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v4 1/1] net: fec: Enable imx6 enet checksum acceleration.
On 19/04/13 16:34, Ben Hutchings wrote:
> On Fri, 2013-04-19 at 16:10 +0100, Jim Baxter wrote:
>> Enables hardware generation of IP header and
>> protocol specific checksums for transmitted
>> packets.
>>
>> Enabled hardware discarding of received packets with
>> invalid IP header or protocol specific checksums.
>>
>> The feature is enabled by default but can be
>> enabled/disabled by ethtool.
>>
>> Signed-off-by: Fugang Duan <B38611@...escale.com>
>> Signed-off-by: Jim Baxter <jim_baxter@...tor.com>
>> ---
>>
>> - Added IPV6 support.
> [...]
>> @@ -1439,6 +1496,14 @@ static int fec_enet_alloc_buffers(struct net_device *ndev)
>> if (fep->bufdesc_ex) {
>> struct bufdesc_ex *ebdp = (struct bufdesc_ex *)bdp;
>> ebdp->cbd_esc = BD_ENET_TX_INT;
>> +
>> + /* Enable protocol checksum flags
>> + * We do not bother with the IP Checksum bits as they
>> + * are done by the kernel
>> + */
>> + if (ndev->features &
>> + (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM))
>> + ebdp->cbd_esc |= BD_ENET_TX_PINS;
>> }
>>
>> bdp = fec_enet_get_nextdesc(bdp, fep->bufdesc_ex);
> [...]
>
> This condition needs to be based on skb->ip_summed.
>
> Ben.
>
These buffers are setup when the network driver is opened
(fec_enet_open), with the same settings as the transmit buffers.
Thinking about it, they should probably not be set here and only set
during the fec_enet_start_xmit() function.
Jim
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists