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=-8.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 EA9C5C433F5 for ; Wed, 15 Sep 2021 16:26:21 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id 895F96103C for ; Wed, 15 Sep 2021 16:26:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 895F96103C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=networkplumber.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dpdk.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 004754068F; Wed, 15 Sep 2021 18:26:20 +0200 (CEST) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mails.dpdk.org (Postfix) with ESMTP id F13284014F for ; Wed, 15 Sep 2021 18:26:19 +0200 (CEST) Received: by mail-pf1-f176.google.com with SMTP id j6so3161114pfa.4 for ; Wed, 15 Sep 2021 09:26:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3Bx1ycisetx8ET6f2UjuT49s5K6g6XO4F0xdhq9en9o=; b=T/OscQ0OZtKckNLmmmYPk3xxP9HgFzecF7fkbjcidTjxu5NAxaxnCZcIDinK1x63ig UFYTKmUf3LJMobP+C/jFYJ53m3BpuAZekVll1DyBv1EFL035YCBgZ2VXovAT8SBUe49B 8IBzWDLYg74qH1uMUJUA050iz4/CkU73VaxvtFzuF/dTRfknl3Mq7vrIsEGf7LG0UCD9 zYHsaZLq7iGq5DuIM5qreUnAI3oWxvN+cPg11GTWwXJUC7HvrdaPbCUAyhkQng8Lke+x KC+AwrNEqSP0e95Pxdt41O/3uYjFxevFiNbzgCQW76s4Fx6dHkDmmcWV/AN8M4WpI+zT rF2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3Bx1ycisetx8ET6f2UjuT49s5K6g6XO4F0xdhq9en9o=; b=d48ziuUaVs9pUhdvbxa8XA6InnIdGRxfHP9mG+alaXEirOWjsbYXQDgjM3uuT63t60 4CIZECqEbDruTjYO+1rslH0BDJUMx/bxhA34ya7hcCTe6eNDkrfoPXiJ054kFofvuytE C0/s9a9FQWQtktMROhQUT7C3RAb5Rf+aVHHSbFmHQheGNzj3noLgvqezdN6+6FUyIP7+ 4GhwAGV7H/psrwf8DqDnrvp1U7OMlUzgMSPF7fDPfEtjZ8gxEkn1ARa5t8QFllRy0iO2 /1Ux/bkIyqhOYHe3sFMqU2f51VFt7DuSdkBggqPtiC9QP04yrbgK60rGst0pTyg9cffl D/mA== X-Gm-Message-State: AOAM531w/OFJn0eFwhU2gAtx/ftXSOfnyj3No6d927ExKSfMnjwGlZ2u bBizc6hdAig5BTb4l8SqhZB+8w== X-Google-Smtp-Source: ABdhPJzLUKsbmKefoXwSVf4m3b4ylA5maeMQjSzbAwrHk4C3A7fiJ3pgYXdEMj+JWef1o/7I9yz4Jg== X-Received: by 2002:a63:b448:: with SMTP id n8mr558610pgu.31.1631723179264; Wed, 15 Sep 2021 09:26:19 -0700 (PDT) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id m2sm432160pgd.70.2021.09.15.09.26.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Sep 2021 09:26:19 -0700 (PDT) Date: Wed, 15 Sep 2021 09:26:16 -0700 From: Stephen Hemminger To: "Ananyev, Konstantin" Cc: "dev@dpdk.org" Message-ID: <20210915092616.1b6dc359@hermes.local> In-Reply-To: References: <20210903004732.109023-1-stephen@networkplumber.org> <20210913181510.46058-1-stephen@networkplumber.org> <20210913181510.46058-6-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v8 05/12] bpf: add function to dump eBPF instructions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, 15 Sep 2021 11:04:41 +0000 "Ananyev, Konstantin" wrote: > > diff --git a/lib/bpf/bpf_convert.c b/lib/bpf/bpf_convert.c > > index a46ffeb067dd..db84add7dcce 100644 > > --- a/lib/bpf/bpf_convert.c > > +++ b/lib/bpf/bpf_convert.c > > @@ -331,7 +331,12 @@ static int bpf_convert_filter(const struct bpf_insn *prog, size_t len, > > case BPF_LD | BPF_IND | BPF_H: > > case BPF_LD | BPF_IND | BPF_B: > > /* All arithmetic insns map as-is. */ > > - *insn = BPF_RAW_INSN(fp->code, BPF_REG_A, BPF_REG_X, 0, fp->k); > > + insn->code = fp->code; > > + insn->dst_reg = BPF_REG_A; > > + bpf_src = BPF_SRC(fp->code); > > + insn->src_reg = bpf_src == BPF_X ? BPF_REG_X : 0; > > + insn->off = 0; > > + insn->imm = fp->k; > > break; > > Should it be part of that patch? > Looks like belongs to previous one, no? Yes, moved it in next bundle.