From patchwork Thu May 23 06:49:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 798507 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7955D13C838; Thu, 23 May 2024 06:50:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716447033; cv=none; b=NEjOZNtTHB37z+JwTIqa2TuMlwSZRQq0r4br+fsHr66T8ysekJRv8JBnE5eNmwxrhEF6tLl1nlXKmD51wJbFOQ1ai0/Wvxb9ymx9vOvx4JWgU08NzMBS3eQI7N85EdO4PAhOY6YUlDUQRZwxz6MLes8qpVwCqG+BYqD8tUsNRZY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716447033; c=relaxed/simple; bh=42iO5udp2Ibn41SCzR7Waf2A6G0d38SJCLI0k7E2p9c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qwqwGHAmxdjqrJ2SvsYD4WDLzYcVmqXsTum0F4lEHFi0FEbpHj5vfoIqruYdIHH0CMou5hMYjBdtezUAwLe6tUEGnFTIRbvPTZQhOpKKDiWUikhXFXw6YmOVpNM1YIKtUMAoemLiCcM6lS5FLyVTlNDZ7IlOdimVt2TLgpJ4uIk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rfC1r6kG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rfC1r6kG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D083C2BD10; Thu, 23 May 2024 06:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716447033; bh=42iO5udp2Ibn41SCzR7Waf2A6G0d38SJCLI0k7E2p9c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rfC1r6kGtHRqIpoIVkdw8w355iSN31tdhJ5/4cnHIakh2Y/fIHVpFgS/efrk9SOD1 EiC7x21WWKCZmW8n+bL8eOyEXvWF09I8U41Kh0HCsJ4AIBx9wDejfLglz87lSDm6Iv 646TusHdPuc/eK0e95q7Y+I1eRdwmeAdZiiW8KhXNLAeC+uXD+FyjKe8Kf+IedBimM yFs3A6hLTM6QVPZTrY07ozqJcM3VSEQk67DaD1zk1TzVkSR+Ey+bgtYZtfXefOZxiv se1wC688HbQFx0NCZCDqe3UQw4Y3uaqNkwKCuiI81xnJqpPTl6mNQcIrnAC0h4SAp7 8b3yB/7aR+tTg== From: Geliang Tang To: Andrii Nakryiko , Eduard Zingerman , Mykola Lysenko , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Shuah Khan , Jakub Sitnicki Cc: Geliang Tang , bpf@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH bpf-next 2/8] selftests/bpf: Drop duplicate definition of i in test_sockmap Date: Thu, 23 May 2024 14:49:58 +0800 Message-ID: <8d690682330a59361562bca75d6903253d16f312.1716446893.git.tanggeliang@kylinos.cn> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Geliang Tang There's already a definition of i in run_options() at the beginning, no need to define a new one in "if (tx_prog_fd > 0)" block. Signed-off-by: Geliang Tang Acked-by: John Fastabend --- tools/testing/selftests/bpf/test_sockmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/test_sockmap.c b/tools/testing/selftests/bpf/test_sockmap.c index fde0dd741e69..e7dbf49a2ca6 100644 --- a/tools/testing/selftests/bpf/test_sockmap.c +++ b/tools/testing/selftests/bpf/test_sockmap.c @@ -1030,7 +1030,7 @@ static int run_options(struct sockmap_options *options, int cg_fd, int test) tx_prog_fd = -1; if (tx_prog_fd > 0) { - int redir_fd, i = 0; + int redir_fd; err = bpf_prog_attach(tx_prog_fd, map_fd[1], BPF_SK_MSG_VERDICT, 0); @@ -1041,6 +1041,7 @@ static int run_options(struct sockmap_options *options, int cg_fd, int test) goto out; } + i = 0; err = bpf_map_update_elem(map_fd[1], &i, &c1, BPF_ANY); if (err) { fprintf(stderr, From patchwork Thu May 23 06:50:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 798506 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8913213C838; Thu, 23 May 2024 06:50:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716447045; cv=none; b=Owni4GA15IZtKqjjljdIAWFCjma4/pZ7C3wy4Yo+nIASuEZs7jZcxwX8DTx2ZPbpAMD2aWVbJJTlVA8RUbLfrBi948zfz5EwF5Q5K6T9+Ixs29uF8iGMqJzjmjY3EFiT4XvA3Xv7F4cGOkZc3Pu2C+KrVtHpchy05VwtoRxdOkg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716447045; c=relaxed/simple; bh=EsgKr2+15JU23386C02AiaPX82NABHkp3oBufrNJeLE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Q7lvGqR0NqcSsCFWAwQrylhZ/EXdHSN2XSZFcx/XO011yMKgmbFQ6iMS7KmYzIAKkeDEBNpMgge5v3aNIpHZHcoC97TU/nbBnM48YZIRq0ONDiJ9aYoT3680MwFQKZseem0927Xu6p/lcryslloFuvLzCx/0mMtU0H2ghMBU0mA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aOB1RTw6; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aOB1RTw6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 220D3C2BD10; Thu, 23 May 2024 06:50:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716447045; bh=EsgKr2+15JU23386C02AiaPX82NABHkp3oBufrNJeLE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aOB1RTw63RqL0BbGW60bu5BO0B7L9tVOMackeER5+2CY4tKejCceupNgyj32hn5cp niqoR3j5B8bz6FZQZKAXhhL/hUQ3mzn2s0E0TyapXxvnWEi/VHDwmB8YBABkkiUnA6 uuZHlkb4qBTRJZwN0zy0b0XNxnldrLFR9uxM4emOKjvsHCgTszWrdLwQSXIjN8f5P8 fOr7c0if/bF3y/+xikF+CLjEwG5ix2Se2NN8fAXozza/T6bODy+STmFULgPV0iOhXh so4kE+4kXOV/OEMNRos+nitdmA9nYDCmc8Iba9j3lYTxlfb0EbpviMJrs6Au/xxp33 jqm3NiY5Au5Bw== From: Geliang Tang To: Andrii Nakryiko , Eduard Zingerman , Mykola Lysenko , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Shuah Khan , Jakub Sitnicki Cc: Geliang Tang , bpf@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH bpf-next 4/8] selftests/bpf: Replace tx_prog_fd with tx_prog in test_sockmap Date: Thu, 23 May 2024 14:50:00 +0800 Message-ID: <23b37f932c547dd1ebfe154bbc0b0e957be21ee6.1716446893.git.tanggeliang@kylinos.cn> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Geliang Tang bpf_program__attach_sockmap() needs to take a parameter of type bpf_program instead of an fd, so tx_prog_fd becomes useless. This patch uses a pointer tx_prog to point to an item in progs[] array. Signed-off-by: Geliang Tang --- tools/testing/selftests/bpf/test_sockmap.c | 30 ++++++++++------------ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/tools/testing/selftests/bpf/test_sockmap.c b/tools/testing/selftests/bpf/test_sockmap.c index d7581bbbc473..8e32d157bac0 100644 --- a/tools/testing/selftests/bpf/test_sockmap.c +++ b/tools/testing/selftests/bpf/test_sockmap.c @@ -954,7 +954,8 @@ enum { static int run_options(struct sockmap_options *options, int cg_fd, int test) { - int i, key, next_key, err, tx_prog_fd = -1, zero = 0; + int i, key, next_key, err, zero = 0; + struct bpf_program *tx_prog; /* If base test skip BPF setup */ if (test == BASE || test == BASE_SENDPAGE) @@ -1015,27 +1016,27 @@ static int run_options(struct sockmap_options *options, int cg_fd, int test) /* Attach txmsg program to sockmap */ if (txmsg_pass) - tx_prog_fd = prog_fd[4]; + tx_prog = progs[4]; else if (txmsg_redir) - tx_prog_fd = prog_fd[5]; + tx_prog = progs[5]; else if (txmsg_apply) - tx_prog_fd = prog_fd[6]; + tx_prog = progs[6]; else if (txmsg_cork) - tx_prog_fd = prog_fd[7]; + tx_prog = progs[7]; else if (txmsg_drop) - tx_prog_fd = prog_fd[8]; + tx_prog = progs[8]; else - tx_prog_fd = -1; + tx_prog = NULL; - if (tx_prog_fd > 0) { + if (tx_prog) { int redir_fd; - err = bpf_prog_attach(tx_prog_fd, - map_fd[1], BPF_SK_MSG_VERDICT, 0); - if (err) { + links[4] = bpf_program__attach_sockmap(tx_prog, map_fd[1]); + if (!links[4]) { fprintf(stderr, - "ERROR: bpf_prog_attach (txmsg): %d (%s)\n", - err, strerror(errno)); + "ERROR: bpf_program__attach_sockmap (txmsg): (%s)\n", + strerror(errno)); + err = -1; goto out; } @@ -1285,9 +1286,6 @@ static int run_options(struct sockmap_options *options, int cg_fd, int test) bpf_link__detach(links[i]); } - if (tx_prog_fd > 0) - bpf_prog_detach2(tx_prog_fd, map_fd[1], BPF_SK_MSG_VERDICT); - for (i = 0; i < 8; i++) { key = next_key = 0; bpf_map_update_elem(map_fd[i], &key, &zero, BPF_ANY); From patchwork Thu May 23 06:50:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 798505 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26DF013C8F2; Thu, 23 May 2024 06:50:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716447058; cv=none; b=Oqse2sHhVocI1tJI0JXg8Z/1nbPSC2Mf/B/sSrOELFHPqZAmH3yV/FbIlGhiQcVUamVFOYMaFF5Cu2JXMM75o+qTiS/n2eW6d0Kw02WbiwEsCKDJO4X5o/pFdB4FRUtW7U6H25VndI8D6A4sRJzf9A546jXAPuEvjEXFM3Zz8s0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716447058; c=relaxed/simple; bh=icBCMYv8O7EZO08xGmk+z3plQf8DdXeJ7xlVNI+eUg8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gItQKgnynlp8Pc5VQu6zCG/GE+aIUqPlEqI75RP+PTXTjHLMaLe7PkAQwiKOk2cAmzGtItrbKzmy9kKT486clcjwK52ERgzr8pijTH5UT3X5CmjdYWINUgpPaVL/5TGthwmMmOo9T4BM7fmivkF/QhmNXNmya4e5V9znHIIZy6w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=N5JTXCuk; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="N5JTXCuk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20EBBC3277B; Thu, 23 May 2024 06:50:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716447057; bh=icBCMYv8O7EZO08xGmk+z3plQf8DdXeJ7xlVNI+eUg8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N5JTXCukGzZwBFu63kpWcjZa9lIhGnvdH6ee7TC/8LFPVu3JMRcm4UpWoJnKgyMK4 yftbDFVUcHAyDeREJwQM5CfdJmE07k9Glf+oqJ2Ckes9uKb22SFI/1ubktHfZQaGwY HvSe+jCYWSMzbVdCVgiU85dmUDLWYX9LgaUEex7LaBd4hHOLqGvRSW4bCLDiXGPxo4 s3/SHicJCh/VpyqIO2bi+4QkH1kaXXLKHo+y4SEhZoogljXlhNVmBysbjNNIa/QM8i YIbQvwtPSFi1bE54RNEQg58G87r3plgjNJ+Srtu6wUwJ1CYgfwc2+6d4q4fcJoNBnj Lfiinq436IS8Q== From: Geliang Tang To: Andrii Nakryiko , Eduard Zingerman , Mykola Lysenko , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Shuah Khan , Jakub Sitnicki Cc: Geliang Tang , bpf@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH bpf-next 6/8] selftests/bpf: Fix size of map_fd in test_sockmap Date: Thu, 23 May 2024 14:50:02 +0800 Message-ID: <0972529ee01ebf8a8fd2b310bdec90831c94be77.1716446893.git.tanggeliang@kylinos.cn> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Geliang Tang The array size of map_fd[] is 9, not 8. This patch changes it as a more general form: ARRAY_SIZE(map_fd). Signed-off-by: Geliang Tang Acked-by: John Fastabend --- tools/testing/selftests/bpf/test_sockmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/test_sockmap.c b/tools/testing/selftests/bpf/test_sockmap.c index e83ca0005721..3654babfac59 100644 --- a/tools/testing/selftests/bpf/test_sockmap.c +++ b/tools/testing/selftests/bpf/test_sockmap.c @@ -1285,7 +1285,7 @@ static int run_options(struct sockmap_options *options, int cg_fd, int test) bpf_link__detach(links[i]); } - for (i = 0; i < 8; i++) { + for (i = 0; i < ARRAY_SIZE(map_fd); i++) { key = next_key = 0; bpf_map_update_elem(map_fd[i], &key, &zero, BPF_ANY); while (bpf_map_get_next_key(map_fd[i], &key, &next_key) == 0) { From patchwork Thu May 23 06:50:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 798504 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 539F813C8F8; Thu, 23 May 2024 06:51:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716447069; cv=none; b=U1fOPt6J+GV8SZ9fTO2g0ZyV1XBgtBP0n6FkpTL1kLBRhZc6H3n0k7U+h/QqBP5jYxrJHkErBmiSHOA93yLrrrDXmHJebH3vxzH4R30QDVn9qXX8WHwuqEjwtvsm0JMwVepHt9WaSXhIFTCy0bbqjqPjbQo6QhKOFaR6eJXp1Sk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716447069; c=relaxed/simple; bh=5wDxYXK13L3RuBy8KDQkEjCCur0RuR4zEdgfgA9ZV3k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KPNV/O4qx8p1frbcKf3WZw5HcIE6/lVbS0hLF9rgMWwCrvWHdNugbhGh6S0mczd21gdIhuYXPa4oFyTdwariQLlQLxylGlXf77cwBfDs4uWRLljrKnYOWeGCpOlg1ArW62Z1Id5Zh4dqJG/soon0M9WeQCKqp/g5dmFbpWPVEMs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EOBX6h3a; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EOBX6h3a" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F962C32782; Thu, 23 May 2024 06:51:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716447069; bh=5wDxYXK13L3RuBy8KDQkEjCCur0RuR4zEdgfgA9ZV3k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EOBX6h3alzW886v/NBWBo/WBdLR1K0pDyyI+lMNvqQ9OaNyjmmm6CGl+VxUWf8c2d jQ+FEQ0GONgss55K4lhVIM9Pq9lAWbKwU+Nw1ig51o9DVRdCmvhAtbhQqU428JZYPS DSk+q/smJOzU/l73KEa88GauGOjqMwhKhsYz5+COTBB9UVANPGGWNMzuz6alHmlaWU 1A+F7GrKvTFuiSTljYjZLy8m7RXkF3XJycoECfmvKKXpIURLEIRd7aDfxNprIz+BGA 3nXsbG4YRPMghg6/dASBjDtj5Iu/bekiTUIImml9m/teLJKfjGnaGQC4d/STYxOwR5 phCK31J3EbfBw== From: Geliang Tang To: Andrii Nakryiko , Eduard Zingerman , Mykola Lysenko , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Shuah Khan , Jakub Sitnicki Cc: Geliang Tang , bpf@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH bpf-next 8/8] selftests/bpf: Drop duplicate bpf_map_lookup_elem in test_sockmap Date: Thu, 23 May 2024 14:50:04 +0800 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Geliang Tang bpf_map_lookup_elem is invoked in bpf_prog3() already, no need to invoke it again. This patch drops it. Signed-off-by: Geliang Tang Acked-by: John Fastabend --- tools/testing/selftests/bpf/progs/test_sockmap_kern.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/testing/selftests/bpf/progs/test_sockmap_kern.h b/tools/testing/selftests/bpf/progs/test_sockmap_kern.h index 99d2ea9fb658..2399958991e7 100644 --- a/tools/testing/selftests/bpf/progs/test_sockmap_kern.h +++ b/tools/testing/selftests/bpf/progs/test_sockmap_kern.h @@ -177,9 +177,6 @@ int bpf_prog3(struct __sk_buff *skb) return bpf_sk_redirect_hash(skb, &tls_sock_map, &ret, flags); #endif } - f = bpf_map_lookup_elem(&sock_skb_opts, &one); - if (f && *f) - ret = SK_DROP; err = bpf_skb_adjust_room(skb, 4, 0, 0); if (err) return SK_DROP;