Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933673AbbFJR4O (ORCPT ); Wed, 10 Jun 2015 13:56:14 -0400 Received: from mail-ig0-f179.google.com ([209.85.213.179]:33726 "EHLO mail-ig0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754088AbbFJR4F (ORCPT ); Wed, 10 Jun 2015 13:56:05 -0400 Message-ID: <1433958961.27504.15.camel@edumazet-glaptop2.roam.corp.google.com> Subject: Re: [RFC,v3 02/10] dpaa_eth: add support for DPAA Ethernet From: Eric Dumazet To: madalin.bucur@freescale.com Cc: netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Date: Wed, 10 Jun 2015 10:56:01 -0700 In-Reply-To: <1430319405-31280-1-git-send-email-madalin.bucur@freescale.com> References: <1430319405-31280-1-git-send-email-madalin.bucur@freescale.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1225 Lines: 38 On Wed, 2015-04-29 at 17:56 +0300, Madalin Bucur wrote: > This introduces the Freescale Data Path Acceleration Architecture > (DPAA) Ethernet driver (dpaa_eth) that builds upon the DPAA QMan, > BMan, PAMU and FMan drivers to deliver Ethernet connectivity on > the Freescale DPAA QorIQ platforms. ... > + /* We're going to store the skb backpointer at the beginning > + * of the data buffer, so we need a privately owned skb > + */ > + > + /* Code borrowed from skb_unshare(). */ > + if (skb_cloned(skb)) { > + struct sk_buff *nskb = skb_copy(skb, GFP_ATOMIC); > + > + /* Finally, create a contig FD from this skb */ > + skb_to_contig_fd(priv, skb, &fd, countptr, &offset); > + > + kfree_skb(skb); > + skb = nskb; > + /* skb_copy() has now linearized the skbuff. */ > + } > + You know that TCP packets are clones, right ? This code is killing performance. TCP allows the headers part being modified by a driver if needed. You should use skb_header_cloned() instead. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/