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=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,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 09622C3A59F for ; Mon, 26 Aug 2019 16:41:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CE600206BA for ; Mon, 26 Aug 2019 16:41:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="LrOoB8mx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732900AbfHZQlv (ORCPT ); Mon, 26 Aug 2019 12:41:51 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:35932 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732627AbfHZQlv (ORCPT ); Mon, 26 Aug 2019 12:41:51 -0400 Received: by mail-ed1-f68.google.com with SMTP id g24so43400edu.3 for ; Mon, 26 Aug 2019 09:41:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=sUOyFBT2+8QqNk5UJQIBj6nCxO+4SHMbLqF7J7W/NhI=; b=LrOoB8mx7pwy349C38sVSk3ZgMzTc/zFD3rmQww2ovzBa6mV9c48mAMHVruoePFfKI YJOdX2aAgJBsD5nlz/or/tNH/F1Cd/tOVg9g+CC44sh0taWQ0IhbrkDtz6BEe/K9M56p Zh129KoOT3usmeT2/UgmpEsyO3f8OcTUKB1qx0nuNSqK42UbAHyAp7UbQ/VmDVqr0vnO f+trBL1Awdu3i2+4DBzzDsqP5ZVbYzwR6aQ8e58L3q7XGQE1J+94ixPNyCor552hInGn RfA9dln1blHWPuMyea1MJ2+OerKUjaY/86qEu7OZTO+KJYBi9mHt5Ns6NgaJjmX7cTdG NNWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=sUOyFBT2+8QqNk5UJQIBj6nCxO+4SHMbLqF7J7W/NhI=; b=APc2p+cQU8yjO1hCqeRQRX/PZc/b+hIQXTNOQMceN6ti5sSSQvwQw/E2YO3O1iHfLz EsY2Ju1zI94UmK/FSO5RDaFjLXJJojrDRZb47aWv7VjOATlz4G8qUtGgV4djR1E2pNL+ POrl6HezgC2O98zzb/4SSwh0HHarfvVMX5uM0cyzsEQnsjmKVAAtm87ydJxxf8di+xeK PrEx7BrxGWZu8vEugq4kjb7OBttdHi87Pt2m5LC4JwB/9Pww+4OyZceNHaBVtIzogAVC D96h0W0+SvWf3ZvAFdxTP45XEhJMKQ36HhvHUGFuP3cHG8somRs8bf7M191GYsfDNRok EhWQ== X-Gm-Message-State: APjAAAU93A52irUJrZ0J/H4Msun3BMRqutLYAOERdihPC1nbKi9o+iCz +VuUwzC3yUI8US9DKBszvoDLnw== X-Google-Smtp-Source: APXvYqzY4N30xw3vQHFEyJ5Xq6qPEyBfCSuJzko5PdbB5tOoObXrkYkezylbeknuj0Tf8aF0qs31tA== X-Received: by 2002:a05:6402:8c9:: with SMTP id d9mr19437197edz.154.1566837710037; Mon, 26 Aug 2019 09:41:50 -0700 (PDT) Received: from cakuba.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id f6sm1405942edn.63.2019.08.26.09.41.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2019 09:41:49 -0700 (PDT) Date: Mon, 26 Aug 2019 09:41:29 -0700 From: Jakub Kicinski To: Daniel Borkmann Cc: Alexei Starovoitov , Song Liu , bpf , Networking , OSS Drivers , Jiong Wang Subject: Re: [PATCH bpf] nfp: bpf: fix latency bug when updating stack index register Message-ID: <20190826094129.3d28ce64@cakuba.netronome.com> In-Reply-To: <1417962c-e63d-6c46-bf07-9284f5332583@iogearbox.net> References: <20190824020028.6242-1-jakub.kicinski@netronome.com> <1417962c-e63d-6c46-bf07-9284f5332583@iogearbox.net> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Mon, 26 Aug 2019 18:25:10 +0200, Daniel Borkmann wrote: > On 8/26/19 6:18 PM, Alexei Starovoitov wrote: > > On Mon, Aug 26, 2019 at 8:57 AM Jakub Kicinski > > wrote: > >> On Sun, Aug 25, 2019 at 10:37 PM Song Liu wrote: > >>> On Fri, Aug 23, 2019 at 7:04 PM Jakub Kicinski wrote: > >>>> From: Jiong Wang > >>>> > >>>> NFP is using Local Memory to model stack. LM_addr could be used as base of > >>>> a 16 32-bit word region of Local Memory. Then, if the stack offset is > >>>> beyond the current region, the local index needs to be updated. The update > >>>> needs at least three cycles to take effect, therefore the sequence normally > >>>> looks like: > >>>> > >>>> local_csr_wr[ActLMAddr3, gprB_5] > >>>> nop > >>>> nop > >>>> nop > >>>> > >>>> If the local index switch happens on a narrow loads, then the instruction > >>>> preparing value to zero high 32-bit of the destination register could be > >>>> counted as one cycle, the sequence then could be something like: > >>>> > >>>> local_csr_wr[ActLMAddr3, gprB_5] > >>>> nop > >>>> nop > >>>> immed[gprB_5, 0] > >>>> > >>>> However, we have zero extension optimization that zeroing high 32-bit could > >>>> be eliminated, therefore above IMMED insn won't be available for which case > >>>> the first sequence needs to be generated. > >>>> > >>>> Fixes: 0b4de1ff19bf ("nfp: bpf: eliminate zero extension code-gen") > >>>> Signed-off-by: Jiong Wang > >>>> Reviewed-by: Jakub Kicinski > >>> I haven't looked into the code yet. But ^^^ should be > >>> > >>> Signed-off-by: Jakub Kicinski > >>> > >>> right? > >> > >> I prefer Review on code I review, ack on code I ack, and sign-off on > >> code I co-author. > > > > I believe if you're sending somebody else patch you have to add your SOB > > in addition to their 'Author:' and their SOB fields. > > +1, for co-authoring there's a 'Co-authored-by:' tag which seems to be frequently > used these days. Ack, there is a difference between co-author of code, and co-author as step by step guidance. I've been doing this for 6 years now, and nobody ever complained :) Signed-off-by: Jakub Kicinski Is that enough or should I repost?