From patchwork Tue Jul 3 22:42:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesus Sanchez-Palencia X-Patchwork-Id: 938987 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41KznS3R4qz9s29 for ; Wed, 4 Jul 2018 08:49:00 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753384AbeGCWsB (ORCPT ); Tue, 3 Jul 2018 18:48:01 -0400 Received: from mga14.intel.com ([192.55.52.115]:30727 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753179AbeGCWr7 (ORCPT ); Tue, 3 Jul 2018 18:47:59 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jul 2018 15:47:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,305,1526367600"; d="scan'208";a="51801386" Received: from darjeeling.jf.intel.com ([10.24.15.98]) by fmsmga007.fm.intel.com with ESMTP; 03 Jul 2018 15:47:58 -0700 From: Jesus Sanchez-Palencia To: netdev@vger.kernel.org Cc: tglx@linutronix.de, jan.altenberg@linutronix.de, vinicius.gomes@intel.com, kurt.kanzenbach@linutronix.de, henrik@austad.us, richardcochran@gmail.com, ilias.apalodimas@linaro.org, ivan.khoronzhuk@linaro.org, mlichvar@redhat.com, willemb@google.com, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, eric.dumazet@gmail.com, jeffrey.t.kirsher@intel.com Subject: [PATCH v2 net-next 01/14] net: Clear skb->tstamp only on the forwarding path Date: Tue, 3 Jul 2018 15:42:47 -0700 Message-Id: <20180703224300.25300-2-jesus.sanchez-palencia@intel.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180703224300.25300-1-jesus.sanchez-palencia@intel.com> References: <20180703224300.25300-1-jesus.sanchez-palencia@intel.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This is done in preparation for the upcoming time based transmission patchset. Now that skb->tstamp will be used to hold packet's txtime, we must ensure that it is being cleared when traversing namespaces. Also, doing that from skb_scrub_packet() before the early return would break our feature when tunnels are used. Signed-off-by: Jesus Sanchez-Palencia --- net/core/skbuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 1357f36c8a5e..c4e24ac27464 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -4898,7 +4898,6 @@ EXPORT_SYMBOL(skb_try_coalesce); */ void skb_scrub_packet(struct sk_buff *skb, bool xnet) { - skb->tstamp = 0; skb->pkt_type = PACKET_HOST; skb->skb_iif = 0; skb->ignore_df = 0; @@ -4912,6 +4911,7 @@ void skb_scrub_packet(struct sk_buff *skb, bool xnet) ipvs_reset(skb); skb->mark = 0; + skb->tstamp = 0; } EXPORT_SYMBOL_GPL(skb_scrub_packet);