[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1366385398.16391.19.camel@edumazet-glaptop>
Date: Fri, 19 Apr 2013 08:29:58 -0700
From: Eric Dumazet <eric.dumazet@...il.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,
Ben Hutchings <bhutchings@...arflare.com>
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:
>
> +static int
> +fec_enet_clear_csum(struct sk_buff *skb, struct net_device *ndev)
> +{
> + /* Only run for packets requiring a checksum. */
> + if (skb->ip_summed != CHECKSUM_PARTIAL)
> + return 0;
> +
> + if (unlikely(skb_cow_head(skb, 0)))
> + return -1;
> +
> + *(__sum16 *)(skb->head + skb->csum_start + skb->csum_offset) = 0;
> +
> + return 0;
> +}
> + /* HW acceleration for ICMP TCP UDP checksum */
> + if (fec_enet_clear_csum(skb, ndev))
> + return NETDEV_TX_BUSY;
No : You must drop the packet and return NETDEV_TX_OK
--
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