[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1366385681.2716.1.camel@bwh-desktop.uk.solarflarecom.com>
Date: Fri, 19 Apr 2013 16:34:41 +0100
From: Ben Hutchings <bhutchings@...arflare.com>
To: Jim Baxter <jim_baxter@...tor.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 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.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
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