From patchwork Wed Mar 7 01:12:21 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: 882335 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@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=none (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 3zwwgR6khrz9sYX for ; Wed, 7 Mar 2018 12:15:31 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933445AbeCGBPE (ORCPT ); Tue, 6 Mar 2018 20:15:04 -0500 Received: from mga09.intel.com ([134.134.136.24]:56498 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933362AbeCGBPC (ORCPT ); Tue, 6 Mar 2018 20:15:02 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Mar 2018 17:15:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,433,1515484800"; d="scan'208";a="23096799" Received: from darjeeling.jf.intel.com ([10.24.15.164]) by orsmga008.jf.intel.com with ESMTP; 06 Mar 2018 17:15:00 -0800 From: Jesus Sanchez-Palencia To: netdev@vger.kernel.org Cc: jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, vinicius.gomes@intel.com, richardcochran@gmail.com, intel-wired-lan@lists.osuosl.org, anna-maria@linutronix.de, henrik@austad.us, tglx@linutronix.de, john.stultz@linaro.org, levi.pearson@harman.com, edumazet@google.com, willemb@google.com, mlichvar@redhat.com, Jesus Sanchez-Palencia Subject: [RFC v3 net-next 09/18] net: ipv4: raw: Handle remaining txtime parameters Date: Tue, 6 Mar 2018 17:12:21 -0800 Message-Id: <20180307011230.24001-10-jesus.sanchez-palencia@intel.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180307011230.24001-1-jesus.sanchez-palencia@intel.com> References: <20180307011230.24001-1-jesus.sanchez-palencia@intel.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Initialize clockid to CLOCKID_INVALID instead of 0 (i.e. CLOCK_REALTIME), and copy both drop_if_late and clockid from CMSG cookie into skb. Signed-off-by: Jesus Sanchez-Palencia --- net/ipv4/raw.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 8e05970ba7c4..61b6acccc72b 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c @@ -79,6 +79,7 @@ #include #include #include +#include struct raw_frag_vec { struct msghdr *msg; @@ -382,6 +383,8 @@ static int raw_send_hdrinc(struct sock *sk, struct flowi4 *fl4, skb->priority = sk->sk_priority; skb->mark = sk->sk_mark; skb->tstamp = sockc->transmit_time; + skb->txtime_clockid = sockc->clockid; + skb->tc_drop_if_late = sockc->drop_if_late; skb_dst_set(skb, &rt->dst); *rtp = NULL; @@ -564,6 +567,8 @@ static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) ipc.sockc.tsflags = sk->sk_tsflags; ipc.sockc.transmit_time = 0; + ipc.sockc.drop_if_late = 0; + ipc.sockc.clockid = CLOCKID_INVALID; ipc.addr = inet->inet_saddr; ipc.opt = NULL; ipc.tx_flags = 0;