From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1297AA0C41; Wed, 15 Sep 2021 18:26:21 +0200 (CEST) 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.