From patchwork Sat Jun 10 14:54:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 774243 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3wlMg646Kdz9s7C for ; Sun, 11 Jun 2017 00:56:18 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="skHG/9Zj"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752117AbdFJOy0 (ORCPT ); Sat, 10 Jun 2017 10:54:26 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:32984 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751958AbdFJOyY (ORCPT ); Sat, 10 Jun 2017 10:54:24 -0400 Received: by mail-pf0-f193.google.com with SMTP id w12so1632789pfk.0 for ; Sat, 10 Jun 2017 07:54:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=aKe5OR686Q0a0cupUxWnraaPT5iecSIWOMuTGVNJ4wE=; b=skHG/9ZjhpdXIfLbcf/6ZwgBsR5XeNZvJwQE7oappqMjVcc0jrntWQjAsi3pWwKk58 f9vYc0MHak4OKpU55xmd16aPbAnTHsWCFfwYb35zWwG+3KhHbS4Ams1aFNA4S82/F4dm AAJBP4TbYd6ly4f2bBMOhHGcj61f6mTllE0kNByQXXdx9yWRTCCl47iCG3jLwuvx8dCp OpGjKjkptkDmeMwalKkwWZd964bWmTRKksJZPZQfFVXfBCtT11lI/gqco1qJ2vQhNiXd j10qC+k0AV4vW12w+xyb7xQoRrg+EvyWw3JAdZ7FFOU16UtbpmNMZLwYau+Z9i14MxIg eI2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=aKe5OR686Q0a0cupUxWnraaPT5iecSIWOMuTGVNJ4wE=; b=O2dek4IBrfJMNA85TEo+LeXNYpZ7plr/4GgyvvMCcS5xvfI/rRsq/5ofZksqdwDny5 840kVWCfg+8XR5bxEYdcd5UK571RGuvC4yTpGkDsqa3uJbD7Vf4uWVaodZvrPRbjcHA0 JSeFgVqBG2Fn0uqnNRoA9QxfPcE4Oe+NyQKXXryseIoRcaPOklysrFubpvgm5rVNdu+F a/aRP2jPp2u5deOVke6l/CErGOchrZ05V7/CmtGahU7ecJmOEp6Wx7BJpU62eWUaWaav IEZd8LywiBbi8DcxJCPXwFwhKMmUW4vXwS1eoIHkXmawTVec0PFWurJrL5JPY2/Lnhm/ v3mA== X-Gm-Message-State: AODbwcAAmYiy07LPOddbvyHn1HhYoYosRG9BnYeDF76AL6vgHD58DWAP riY/RhrIEGbUlw== X-Received: by 10.101.73.135 with SMTP id r7mr30771347pgs.224.1497106464159; Sat, 10 Jun 2017 07:54:24 -0700 (PDT) Received: from [192.168.86.171] (c-73-231-122-98.hsd1.ca.comcast.net. [73.231.122.98]) by smtp.googlemail.com with ESMTPSA id j6sm12085523pgc.1.2017.06.10.07.54.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Jun 2017 07:54:22 -0700 (PDT) Message-ID: <1497106461.736.102.camel@edumazet-glaptop3.roam.corp.google.com> Subject: Re: [PATCH net-next] ipv6: Initial skb->dev and skb->protocol in ip6_output From: Eric Dumazet To: Chenbo Feng Cc: David Miller , netdev@vger.kernel.org, lorenzo@google.com, edumazet@google.com, fengc@google.com Date: Sat, 10 Jun 2017 07:54:21 -0700 In-Reply-To: <3e187bb4-df36-1791-aa92-03a348b68b14@gmail.com> References: <1497035168-9093-1-git-send-email-chenbofeng.kernel@gmail.com> <20170609.150836.1427149901008136163.davem@davemloft.net> <3270a030-2608-1629-07d6-7fdeee9e98cc@gmail.com> <20170609.153937.1403217696199851743.davem@davemloft.net> <3e187bb4-df36-1791-aa92-03a348b68b14@gmail.com> X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, 2017-06-09 at 16:12 -0700, Chenbo Feng wrote: > > On 06/09/2017 12:39 PM, David Miller wrote: > > From: Chenbo Feng > > Date: Fri, 9 Jun 2017 12:13:57 -0700 > > > >> > >> On 06/09/2017 12:08 PM, David Miller wrote: > >>> From: Chenbo Feng > >>> Date: Fri, 9 Jun 2017 12:06:07 -0700 > >>> > >>>> From: Chenbo Feng > >>>> > >>>> Move the initialization of skb->dev and skb->protocol from > >>>> ip6_finish_output2 to ip6_output. This can make the skb->dev and > >>>> skb->protocol information avalaible to the CGROUP eBPF filter. > >>>> > >>>> Signed-off-by: Chenbo Feng > >>>> Acked-by: Eric Dumazet > >>> Applied, thanks. > >>> > >>> This makes ipv6 consistent with ipv4. > >>> > >>> I am surprised this wasn't noticed, for example, in netfilter. > >>> . > >>> > >> Hi David, > >> > >> This patch is still under working since it may have problem with > >> ip_fragment() call, did you applied it already? Should I send a revert > >> patch to you then? > > A revert is necessary or a relative fixup. > > > > Thank you. > > > Hi David, > > The revert is uploaded here: http://patchwork.ozlabs.org/patch/774136/ > > Thanks and sorry for the trouble caused > > Chenbo Feng No worries ! It seems the revert is not needed, after further analysis. One of the point I raised was this no longer needed chunk, that can be added as a separate patch : diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 02cd44f0953900108701895108b2fdaa9f9980e5..0d6f3b6345de26c329ae1d6f25dde652a5452d4b 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -869,7 +869,6 @@ int ip6_fragment(struct net *net, struct sock *sk, struct sk_buff *skb, if (skb->sk && dst_allfrag(skb_dst(skb))) sk_nocaps_add(skb->sk, NETIF_F_GSO_MASK); - skb->dev = skb_dst(skb)->dev; icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); err = -EMSGSIZE;