Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3186224rwl; Sun, 9 Apr 2023 09:41:08 -0700 (PDT) X-Google-Smtp-Source: AKy350ZFIbsa8dOt9pDGuID40LYEzEQ/E3epN6Re3qTxveqoiwVip/mfki5ENNQCspCdKNzYLm75 X-Received: by 2002:a17:906:58:b0:8b1:7ae9:647 with SMTP id 24-20020a170906005800b008b17ae90647mr4658386ejg.76.1681058468609; Sun, 09 Apr 2023 09:41:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681058468; cv=none; d=google.com; s=arc-20160816; b=UrNP6y9qwrvSuRWPngjisL4fyIm1B+cNAVmGQ7UXWOujVmh/1/oQj9Q4ELfDJlBupZ 1QbKeKreGevIJGORaomIWOSm//3I/Y+OGYK95aUvaBdmljjHW0HRoD113VxPbJgkmd3l ePpU/f5iOg3O4P2WVs5GZgIsLvgNUm4xhvwvx8n7an94KMHj4WC37fb5FCSaNL3tquhD G+1Mjc/v9MnO3MSpJ5hkwJqqAmdld4qQiEWwSrRtZIOkl33zhDZ06oJTledfcrAY0rCY v88k3UZJJmBQaYrQPpnnUQ0SLBm2Q85v6frffXR0BD3/D63fCY/Ir82WRk7TqNG5YKor zRDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=65LSbWKUrmCArl+LXVPE7dMWtbfbmdZlWVztuN2QWX0=; b=aahJENTEXnnndrB/I7FZ4spm7rUhke8G3gIr0dQsE1s/8sg2ONsm57CvnSBh4Cus+X RUXgsqaQ2PcNvHF8q9z0J2IGjDUKhFLtoYreYe+I/lQKkq8f5vEQIiTNo6RbAFQhwNIp XBSVR06PpnzRsBMfmP3yNtjfRBzBEwEzB28GxvbW3g6aVusPp8fCh8MlY0pfcpn/ar62 Byq1N8ZyCJVxX42g6ktI+ASam7MhCsWQe/cukJq9UdYZ/S8uPsHl4N7omkUFuSlcoxC6 +oWIUcQ+rhBhrkON4/fq9FYKhGarWTv9mG6b03hf6XPBhRilgLYTOYmCB5VGf4TA0x2a 8NpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dectris.com header.s=google header.b=b0gnqKuP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dectris.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qb6-20020a1709077e8600b0094a5bae87b2si2913715ejc.481.2023.04.09.09.40.44; Sun, 09 Apr 2023 09:41:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@dectris.com header.s=google header.b=b0gnqKuP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dectris.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229589AbjDIOt2 (ORCPT + 99 others); Sun, 9 Apr 2023 10:49:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229548AbjDIOt1 (ORCPT ); Sun, 9 Apr 2023 10:49:27 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CD1535AC for ; Sun, 9 Apr 2023 07:49:25 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id sg7so18591502ejc.9 for ; Sun, 09 Apr 2023 07:49:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dectris.com; s=google; t=1681051764; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=65LSbWKUrmCArl+LXVPE7dMWtbfbmdZlWVztuN2QWX0=; b=b0gnqKuPzGxBDzcrGs8eDqLRGoQBwJSNtdIQW7jdBZj187QJuJhpCg5slpnkGD2r1g JBtHIXOz0t36TBewgWRcItyvOujSFDwZ4lsvBJxvlDfbjOAzNYSah373BzCo29W5s/mJ zqP+1d9/mJ0YA/jQzKcOVnEmCysltQfFGuw2M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681051764; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=65LSbWKUrmCArl+LXVPE7dMWtbfbmdZlWVztuN2QWX0=; b=K7mIhFHfhCLL+6gvlf4WwGJM75X10gixjT420hY046vo5rs0sMD7AlyqoQ+cKmMJ6F 0lv6Q5TEXo+D8g001K0ViA2NpzELQ4KB5vb5H/skCq8qEoSmJNxHNw/8OFU1y6viBecy +aEeEW5BFWdbun36R+z4Hkv6l5QRRBi+tIh3xWs3R0mkdYctydHx/ElFK0904ox+705h E4j/4K59SMyYaO4LACvvb5gLCVqtGq2Xvel1BeiEsgKLOLekT9Nn+8UVJpYyGRoHUjP7 LIMmA4Ja/h771CWf8FOReKCG/SjCCS1DLbCn/rdJNkCY8FLbYLfG36SIGDo5npLQmDuO pxYg== X-Gm-Message-State: AAQBX9cVWWsWrra6HWEy70Rs7L7zLBLA6joie5keH9919ycCP8+92gN+ hlzndxmFMijgjw2U8w9xYfV5OYi+h05XidA7SbNRCQ== X-Received: by 2002:a17:907:a68a:b0:92e:7a67:668a with SMTP id vv10-20020a170907a68a00b0092e7a67668amr2381028ejc.0.1681051763891; Sun, 09 Apr 2023 07:49:23 -0700 (PDT) MIME-Version: 1.0 References: <20230406212136.19716-1-kal.conley@dectris.com> In-Reply-To: <20230406212136.19716-1-kal.conley@dectris.com> From: Kal Cutter Conley Date: Sun, 9 Apr 2023 16:54:05 +0200 Message-ID: Subject: Re: [PATCH bpf-next] xsk: Elide base_addr comparison in xp_unaligned_validate_desc To: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Magnus Karlsson , Maciej Fijalkowski , Jonathan Lemon , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + addr = xp_unaligned_add_offset_to_addr(desc->addr); > + I guess this assignment should simply be combined with the variable declaration. This will shorten the function by an additional two lines of code.