From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756695AbaCZWi6 (ORCPT ); Wed, 26 Mar 2014 18:38:58 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:15059 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756353AbaCZWix (ORCPT ); Wed, 26 Mar 2014 18:38:53 -0400 X-IronPort-AV: E=Sophos;i="4.97,738,1389744000"; d="scan'208";a="113959114" Message-ID: <533356F8.7070307@citrix.com> Date: Wed, 26 Mar 2014 22:38:48 +0000 From: Zoltan Kiss User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: David Miller CC: , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v4] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors References: <1395397894-9493-1-git-send-email-zoltan.kiss@citrix.com> <20140326.155958.1928261590856069753.davem@davemloft.net> <20140326.161242.576245997077162750.davem@davemloft.net> In-Reply-To: <20140326.161242.576245997077162750.davem@davemloft.net> Content-Type: text/plain; charset="ISO-8859-7"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.80.2.133] X-DLP: MIA2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26/03/14 20:12, David Miller wrote: > From: David Miller > Date: Wed, 26 Mar 2014 15:59:58 -0400 (EDT) > >> From: Zoltan Kiss >> Date: Fri, 21 Mar 2014 10:31:34 +0000 >> >>> skb_zerocopy can copy elements of the frags array between skbs, but it doesn't >>> orphan them. Also, it doesn't handle errors, so this patch takes care of that >>> as well, and modify the callers accordingly. skb_tx_error() is also added to >>> the callers so they will signal the failed delivery towards the creator of the >>> skb. >>> >>> Signed-off-by: Zoltan Kiss >> >> Applied, thanks Zoltan. > > Actually, Zoltan, you have to fix this: > > net/core/skbuff.c: In function ¡skb_zerocopy¢: > net/core/skbuff.c:2172:2: warning: passing argument 1 of ¡skb_orphan_frags¢ discards ¡const¢ qualifi > er from pointer target type [enabled by default] > In file included from include/linux/tcp.h:21:0, > from net/core/skbuff.c:50: > include/linux/skbuff.h:1904:19: note: expected ¡struct sk_buff *¢ but argument is of type ¡const str > uct sk_buff *¢ > net/core/skbuff.c:2173:3: warning: passing argument 1 of ¡skb_tx_error¢ discards ¡const¢ qualifier f > rom pointer target type [enabled by default] > net/core/skbuff.c:642:6: note: expected ¡struct sk_buff *¢ but argument is of type ¡const struct sk_ > buff *¢ > Ok, resubmitted. 'from' is now not a const parameter, because skb->pfmemalloc might change. Zoli