From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E91EC433DF for ; Sat, 27 Jun 2020 01:27:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1408C20720 for ; Sat, 27 Jun 2020 01:27:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726411AbgF0B1B (ORCPT ); Fri, 26 Jun 2020 21:27:01 -0400 Received: from smtprelay0248.hostedemail.com ([216.40.44.248]:60636 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726101AbgF0B1A (ORCPT ); Fri, 26 Jun 2020 21:27:00 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id D6152180A7FE6; Sat, 27 Jun 2020 01:26:59 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: soup87_3502c0226e5a X-Filterd-Recvd-Size: 2709 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf08.hostedemail.com (Postfix) with ESMTPA; Sat, 27 Jun 2020 01:26:57 +0000 (UTC) Message-ID: <552ee6083623bb7fe5e11f33cff654deed8e0982.camel@perches.com> Subject: Re: [net-next v3 11/15] iecm: Add splitq TX/RX From: Joe Perches To: Jakub Kicinski , Jeff Kirsher Cc: davem@davemloft.net, Alice Michael , netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com, Alan Brady , Phani Burra , Joshua Hay , Madhu Chittim , Pavan Kumar Linga , Donald Skidmore , Jesse Brandeburg , Sridhar Samudrala Date: Fri, 26 Jun 2020 18:26:56 -0700 In-Reply-To: <20200626125806.0b1831a1@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> References: <20200626020737.775377-1-jeffrey.t.kirsher@intel.com> <20200626020737.775377-12-jeffrey.t.kirsher@intel.com> <20200626125806.0b1831a1@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.2-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, 2020-06-26 at 12:58 -0700, Jakub Kicinski wrote: > On Thu, 25 Jun 2020 19:07:33 -0700 Jeff Kirsher wrote: > > @@ -1315,7 +1489,18 @@ iecm_tx_splitq_clean(struct iecm_queue *tx_q, u16 end, int napi_budget, > > */ > > static inline void iecm_tx_hw_tstamp(struct sk_buff *skb, u8 *desc_ts) > > Pretty sure you don't need the inline here. It's static function with > one caller. > > > { > > - /* stub */ > > + struct skb_shared_hwtstamps hwtstamps; > > + u64 tstamp; > > + > > + /* Only report timestamp to stack if requested */ > > + if (!likely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) > > + return; Is this supposed to be unlikely? > > + tstamp = (desc_ts[0] | (desc_ts[1] << 8) | (desc_ts[2] & 0x3F) << 16); btw: there are inconsistent parentheses for the ORs vs shifts here. I think this might read better as tstamp = desc_ts[0] | (desc_ts[1] << 8) | ((desc_ts[2] & 0x3F) << 16); This is a u64 result, but the ORs are int 23 bits of timestamp isn't very many at 100Gb. > > + hwtstamps.hwtstamp = > > + ns_to_ktime(tstamp << IECM_TW_TIME_STAMP_GRAN_512_DIV_S); > > + > > + skb_tstamp_tx(skb, &hwtstamps); > > } > > Why is there time stamp reading support if you have no ts_info > configuration on ethtool side at all and no PHC support?