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 4D22543347 for ; Thu, 16 Nov 2023 19:39:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3EA47402CD; Thu, 16 Nov 2023 19:39:28 +0100 (CET) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mails.dpdk.org (Postfix) with ESMTP id E98C2402CB for ; Thu, 16 Nov 2023 19:39:26 +0100 (CET) Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1cc5b7057d5so10047495ad.2 for ; Thu, 16 Nov 2023 10:39:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1700159966; x=1700764766; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=7NqvcktqzEP5S/WrAzl9Qq3ObPn+HPaANmySCuyvXSw=; b=ccjooWj7yl4Me3rkBLqtyAIxziv/Mf89k7NaU/oA+DIRWTa1DY8D2zAR4IHpDpzDRj 6Eixt1i2dU2RZwppFeiifdRxzFYxn7geUky3pmTuP1kGxlmi03vx8OwJSaFWVeBnQeoQ NezUxm5VBleK3d8b3IvRF0ke+LxQ4zgBptvFF4GOarZgtAfE/V8RdlrfzwB9h3y8rI46 43TD2cHtTBjgAhYHjsbgz/dNVBHmrfLhc6qMcEwzzTLoja0P/b/Emn+yVOI5CXifw6vt anhfAOrPZnC+QrM0lLoNm0pD8qOR8CEEln6LjOOYITfsnJpw8wf5HR7GKCo6/lAt2Hf4 g1ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700159966; x=1700764766; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7NqvcktqzEP5S/WrAzl9Qq3ObPn+HPaANmySCuyvXSw=; b=pO86Ot4oxqDxAmMbUEPLW872S5q9gJ4m9v0G+dUqyN8VhJ2E9VKPoZpmWKLjYfeypt XBIBu3CrZ+lI5zBmH1d2qUh3iy2cJPUtI2umhew5oIulZi+VeeThEgQloTFO2iMXu+lb 9xqtp9gEzzWlVkvUOypiV9X1k+3w1X/i+YwkUqAU0IPW5Y6Rwsmwq7X7081ouShKGnqa /GBcFSK3/LsKEnX/yGQMEMkWlic8QAe71wnG/Z7lNOLt5RTQb3oPovmBHTy5nNnXyiQ0 f3u6F3WrE1sXnGW087WIqC32xDAZnMnyLJLQPA0qHBEMK3O9gdk3hdvdoF+T3IRP9VG0 jgAg== X-Gm-Message-State: AOJu0YyrFxmzeakReusOYneOJ3dNcXXzxY0wPjn5MRRIjPZofsMj0Ib8 Nl5UCe1j6cqdT80OT4fZNJREvg== X-Google-Smtp-Source: AGHT+IGF2Tca8t89oRh3cQNV1KN+xV2ozchp957OJE1cRjqdjmkjAMHk4w04CVut7GTO5MI7bu+91w== X-Received: by 2002:a17:903:1cd:b0:1ca:abd:1c1a with SMTP id e13-20020a17090301cd00b001ca0abd1c1amr11752143plh.61.1700159965930; Thu, 16 Nov 2023 10:39:25 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id j10-20020a170902da8a00b001c613b4aa33sm9500463plx.287.2023.11.16.10.39.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 10:39:25 -0800 (PST) Date: Thu, 16 Nov 2023 10:39:24 -0800 From: Stephen Hemminger To: madhukar mythri Cc: users Subject: Re: Failed to load eBPF byte-code on TAP device Message-ID: <20231116103924.137be051@hermes.local> In-Reply-To: References: <20231115071923.6c550190@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org On Thu, 16 Nov 2023 13:41:27 +0530 madhukar mythri wrote: > Hi Stephen, >=20 > I had added some logs in the BPF verifier of Kernel code, to print the > number of instructions processed and error-code returned as follows: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > logs # dmesg |tail -n 20 > [ 76.318101] #### do_check: instructions Processed 999989 insn > [ 76.318102] #### do_check: instructions Processed 999990 insn > [ 76.318103] #### do_check: instructions Processed 999991 insn > [ 76.318104] #### do_check: instructions Processed 999992 insn > [ 76.318105] #### do_check: instructions Processed 999993 insn > [ 76.318106] #### do_check: instructions Processed 999994 insn > [ 76.318107] #### do_check: instructions Processed 999995 insn > [ 76.318108] #### do_check: instructions Processed 999996 insn > [ 76.318109] #### do_check: instructions Processed 999997 insn > [ 76.318110] #### do_check: instructions Processed 999998 insn > [ 76.318111] #### do_check: instructions Processed 999999 insn > [ 76.318112] #### do_check: instructions Processed 1000000 insn > [ 76.318113] BPF program is too large. Processed 1000001 insn > [ 76.318209] ########## bpf_check: do_check_main done..: ret: -7 > [ 76.318210] ########## bpf_check: bpf_prog_offload_finalize done..: > ret: -7 > [ 76.318212] ########## bpf_check: check_max_stack_depth done..: ret: = -7 > [ 76.318212] ########## bpf_check: fixup_call_args done..: ret: -7 > [ 76.318224] ########## bpf_check: end..: ret: -7 > [ 76.318224] ########## BPF bpf_check return err: -7..: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D >=20 > Only these logs which I add in the Kernel-code were printed and do not see > any other Kernel-logs. >=20 > Thanks, > Madhuker. >=20 > On Wed, Nov 15, 2023 at 8:49=E2=80=AFPM Stephen Hemminger < > stephen@networkplumber.org> wrote: =20 >=20 > > On Wed, 15 Nov 2023 15:38:55 +0530 > > madhukar mythri wrote: > > =20 > > > Hi all, > > > > > > On the RHEL9.2 with DPDK 22.11.1 version, DPDK primary application fa= iled > > > to add RSS flow on TAP sub-device, when loading the TAP BPF byte-code > > > instructions. > > > > > > This "struct bpf_insn l3_l4_hash_insns[]" array(from file: > > > drivers/net/tap/tap_bpf_insns.h) is in eBPF bytecode instructions for= mat, > > > this eBPF failed to load on TAP PMD with the following error: > > > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > rss_add_actions(): Failed to load BPF section 'l3_l4' (7): Argument l= ist > > > too long. > > > net_failsafe: Failed to create a flow on sub_device 1." > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > On Kernel-version: 5.15.0 #9 SMP PREEMPT > > > Arch: x86_64 GNU/Linux > > > > > > When added some debug logs on Kernel BPF verifier code, we could see = that > > > instruction processed were reached to 1 Million. > > > But, the Byte code has only 1698 instructions only. Why the Kernel BPF > > > verifier is processing beyond 1,698 instructions ? > > > > > > The same byte-code(with DPDK-22.11.1) worked well with RHEL8.x and not > > > working in RHEL-9.x version. > > > > > > Does anybody faced such issues ? > > > Please let me know how to debug such issues on Byte-code. > > > > > > Thanks, > > > Madhukar. =20 > > > > Is there anything in the kernel log? I suspect a kernel bug. The kernel BPF API is not stable, and RHEL can and does modify the kernel. Likely a Redhat bug. Try with recent TAP fixes (in 23.11-rc3).=20