From mboxrd@z Thu Jan 1 00:00:00 1970 From: Willem de Bruijn Subject: Re: [RFC PATCH 3/7] net: add option to get information about timestamped packets Date: Thu, 13 Apr 2017 10:37:07 -0400 Message-ID: References: <20170412141737.5881-1-mlichvar@redhat.com> <20170412141737.5881-4-mlichvar@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Network Development , Richard Cochran , Willem de Bruijn , Soheil Hassas Yeganeh , "Keller, Jacob E" , Denny Page , Jiri Benc To: Miroslav Lichvar Return-path: Received: from mail-qt0-f182.google.com ([209.85.216.182]:36093 "EHLO mail-qt0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752446AbdDMOhy (ORCPT ); Thu, 13 Apr 2017 10:37:54 -0400 Received: by mail-qt0-f182.google.com with SMTP id v3so47222842qtd.3 for ; Thu, 13 Apr 2017 07:37:48 -0700 (PDT) In-Reply-To: <20170412141737.5881-4-mlichvar@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, Apr 12, 2017 at 10:17 AM, Miroslav Lichvar wrote: > Extend the skb_shared_hwtstamps structure with the index of the > real interface which received or transmitted the packet and the length > of the packet at layer 2. The original packet is received along with the timestamp. Why is this L2 length needed? > Add a SOF_TIMESTAMPING_OPT_PKTINFO flag to > the SO_TIMESTAMPING option to allow applications to get this information > as struct scm_ts_pktinfo in SCM_TIMESTAMPING_PKTINFO control message. This patch saves skb->dev->ifindex, which is the same as existing SOF_TIMESTAMPING_OPT_CMSG. See also the bug fix for that feature I sent yesterday: http://patchwork.ozlabs.org/patch/750197/ If the intent is to return a different ifindex, I would still suggest using the existing pktinfo infrastructure, but changing the ifindex that is recorded.