From patchwork Tue Jul 23 05:54:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Ambardar X-Patchwork-Id: 13739327 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF02413C8F5; Tue, 23 Jul 2024 05:55:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714127; cv=none; b=YHN2dQJnFKIFT5+YwCCFjLUHVgO2gqZDBNUGh6Vl8wFK7bEcEh7cwYk7pfnRZ96bLn74UkflOZhcCHKa2hjRZP/5L3d7Ly1rGOpgn6LenDC73pncxMj0J+sb92TIgWLljMMLodSA1ICaZId31zKqLuM/noS4FwQZxj5jrka5C3s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714127; c=relaxed/simple; bh=EOFGGSh/CdGTM4ZTodj/tKVj4mXB22If1uqXT2K79bE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=foD6cW1BFcxHZspZSbD9PmfRJt35SlgEzR7SPhJluvFotGBtu6FcrO0942lhYm/bRfy/4Cif5ecVCN12qPQYXvYwL+CpgdAXXffjKWasCvna9q9DAJcAG3vd279TFgR+vZtq+EYo666ojpmU+kOm9XB1P6ATbUjlKHn6dVAX1Ts= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=XgWwTqvw; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XgWwTqvw" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1fc569440e1so3174975ad.3; Mon, 22 Jul 2024 22:55:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721714125; x=1722318925; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CGYS1rUXoOuTM3rprISjfGYQaW5ybagqy7kbkfRMNRo=; b=XgWwTqvwjwQAbgT+NWeeZ/kbWanhlxXuB/8p6WDp80FCiQqcFgCAP0y5ePVZ6SK0JP psxAP0eHLf9RMdGCVgLxQPRRfQW96FB5LiTDc6v04K201XLQWtguD13UHD6TCJJjz0QD AmBSldh2ZhVKhAL/1/TmvCi7XUM72gM1P15sBqqBAljgBqKJXvME55BFrtQCzRhsCFod /9uBIZme9WJ4yO6RKC/OUk8SsxhDqgTTulkdGrHTwOAjWx1K59y4pfvR2kR/22Voba92 TRKGduKOfMcLSkmrB/ktIsqPjJ31EQKJAEW1sctiaUJ/pvUpKj2+VG/jWPfEbe0lMjaU IQcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721714125; x=1722318925; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CGYS1rUXoOuTM3rprISjfGYQaW5ybagqy7kbkfRMNRo=; b=CcA2QpJE8MotKq8/BfXoLjxvH9Vqp+K2X0S+ix4VEtrxAv2uYy56qw349n+cE0s+lq 6Uu2sxiuPohzUB7YVFvUHmE3Ap/S+/0/uscNV7gZoe/S1+PRpanfyQqqUklHwAku9K5V 9RghuwClsO7gyh8+3GrlihNr/9fXHirkvsQomrrWpxtb67EvHHGquRMEYyYKkSFfZ8nJ p0H2tjZsALV2EbuSdTI9JTV9R0VvVwJEPNbfJuCPjH5xFAF8jWIGcetSd34PMIUMm5kP Ul+Yc+B5ZeJGdoTPMR76n7NxEClKe4trhW54Q+7FpXVQTcxzNjvViOK5jp3ISgCmGO3I 4A6A== X-Forwarded-Encrypted: i=1; AJvYcCWIEgkx5fiiq0mavXaEGwA+6kBM6+PbvaqAJfeiCOl1EfX0U635lcDhg3T+uk397RxcO20PNsqFG9chGuaFHu8+keK6mn17Bk8oJOEHBEnz X-Gm-Message-State: AOJu0YzQwmyRVEx4Q1BBBTXtO33KiA8m/LKfE7B2xcKMg9QB22sZMq4T AEaYUTYg9sIag4VEBwuF2lfjSoaSDs5SmeyMJIr2/2df6hu/gEA/IkRyFyB3 X-Google-Smtp-Source: AGHT+IESBtppoiIyhYC2rcRc3ZayKUecAkckQmZIDFYC7ueHmYcIQEf0do88QBzuMPAmV3oaoBAMuQ== X-Received: by 2002:a17:902:e88f:b0:1f6:93a0:9a45 with SMTP id d9443c01a7336-1fdb5f9feb7mr17418495ad.36.1721714124778; Mon, 22 Jul 2024 22:55:24 -0700 (PDT) Received: from localhost.localdomain (69-172-146-21.cable.teksavvy.com. [69.172.146.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f469df5sm65724685ad.254.2024.07.22.22.55.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 22:55:24 -0700 (PDT) From: Tony Ambardar To: bpf@vger.kernel.org Cc: Tony Ambardar , linux-kselftest@vger.kernel.org, Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Yucong Sun , Eric Dumazet , Kuniyuki Iwashima , Jakub Sitnicki , Dave Marchevsky , David Vernet , Carlos Neira , Joanne Koong , Petar Penkov , Willem de Bruijn , Yan Zhai , Vadim Fedorenko , YiFei Zhu Subject: [PATCH bpf-next v1 01/19] selftests/bpf: Use pid_t consistently in test_progs.c Date: Mon, 22 Jul 2024 22:54:28 -0700 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Use pid_t rather than __pid_t when allocating memory for 'worker_pids' in 'struct test_env', as this is its declared type and also avoids compile errors seen building against musl libc on mipsel64: test_progs.c:1738:49: error: '__pid_t' undeclared (first use in this function); did you mean 'pid_t'? 1738 | env.worker_pids = calloc(sizeof(__pid_t), env.workers); | ^~~~~~~ | pid_t test_progs.c:1738:49: note: each undeclared identifier is reported only once for each function it appears in Fixes: 91b2c0afd00c ("selftests/bpf: Add parallelism to test_progs") Signed-off-by: Tony Ambardar Acked-by: Geliang Tang --- tools/testing/selftests/bpf/test_progs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/test_progs.c b/tools/testing/selftests/bpf/test_progs.c index 1677f6f1eaae..091b49bf671a 100644 --- a/tools/testing/selftests/bpf/test_progs.c +++ b/tools/testing/selftests/bpf/test_progs.c @@ -1738,7 +1738,7 @@ int main(int argc, char **argv) /* launch workers if requested */ env.worker_id = -1; /* main process */ if (env.workers) { - env.worker_pids = calloc(sizeof(__pid_t), env.workers); + env.worker_pids = calloc(sizeof(pid_t), env.workers); env.worker_socks = calloc(sizeof(int), env.workers); if (env.debug) fprintf(stdout, "Launching %d workers.\n", env.workers); From patchwork Tue Jul 23 05:54:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Ambardar X-Patchwork-Id: 13739328 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE50713D28D; Tue, 23 Jul 2024 05:55:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714131; cv=none; b=cCfYLVXxVBH0rGL2ti8JCYJ2OeQ5PepCFOKHQG08HjVToiQRTz/b2K10oJBxBxYkGrgCb2hWirFOkAYcu08C+BtmyFpQGnGglNP+PYtSUe+TdH0K3FM/JXv3RqlSgNJD6rklKnRmHau8kErGcjbgKla3zl4eeVtAptNd0rdx8SI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714131; c=relaxed/simple; bh=U6PSJHHsdoHQeuBdbe1AqOJi7Op40WqZje2dI0wkV7Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BayBelGpQrApV5gNntTsTrqYwSFSVSpLwabqI+LadjKmy0XgyFV1GteqWqTLdya06N5DJ3kiU69fCGFnCgUErrR34gq+QA5A2ZKnbZPSHx69VwR25BR/FU1wncqWahs0zUoVvvg5Z4zA3C14PSoS1f5XOISfxiP+08tHh+SxF6Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=lr8AjGOm; arc=none smtp.client-ip=209.85.214.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lr8AjGOm" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1fc6ee64512so26738955ad.0; Mon, 22 Jul 2024 22:55:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721714129; x=1722318929; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=E2BWuZk7cm8HTXBQSy2mvZgxSz8YUm7gyJDVbc+WOMQ=; b=lr8AjGOmlRmL1f03oNIxatF4WnpV6iAIh04fDbaQ8bfXKn/doRMtJTYghnmwIPUsnQ gUHP0ehWJ4u/akWbdATd66DwAdPC1dikKhhkxR7EergKOdfxalTWOkIZMmgkLTqH7nW3 zEkLSJIqQXv14r+APqjZg0unMSl2L471qOvPetk94WVf55IMefXesuxzdXkinjzDdhvF QKaQyG5Cv6E1ohxUxXf7vc5NhLe/RI3Nzgs4mYPM8UbZFr8b3NgU2ERIkMzTPyQEcQGd Aq/MX84s0zHy9Tnfk4vcNcZysdwR+ie4Lr0m791UdJh0ch7uSldL+UdkW+Wp9ZhO53zY frfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721714129; x=1722318929; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E2BWuZk7cm8HTXBQSy2mvZgxSz8YUm7gyJDVbc+WOMQ=; b=vZ+bvIIA7n0MK48r2HF2nrkFC7e9uW5WLTckeScaUzE1HBkgD+fjHZ3DqVQ650Ux4M SaeKsQtfux99QsTSITxLsaIN8quYW99sZSkwk2hLN8r+1GFk1zgP+wp7TfdtQjjRBlCv 2VBVexbGiMiOtbuzOy7ggHet22fiMJCM7/j8ObOT1cTuIAh+O0P6zqvgLKA7973AYc9v 4H+LazEpcsyDKdgtg0ENC8R74zP8F9UAyhkpAPytk9pe5sXVQOv3Wrolg1vEgL6yabNM ptaIu237qYImnsBQVIyOg2vqZKCT960LqZKfrmSqG07C6zHCzAiHDH/OPgGzdS8i9s+F z0qA== X-Forwarded-Encrypted: i=1; AJvYcCXZbBp8V+krONUgaz4n+glzk8RBDd/7/AFMcsOR46Hq5IDMS1qu1GqiegvLIZgKrh4ZdvtqNbXf1quhDtKj64w83agPwgPhBTOhNII9RK4r X-Gm-Message-State: AOJu0YzP+EpeZ/xFy10COHKHsIaljoCvA4yuCozC1LjL4j0xHcC+jtBx WecSXaVk6I9NuqWnu5zDo7F9Esy2760LSUhUJD/FAIHWSkob7W+YC6EshnBk X-Google-Smtp-Source: AGHT+IFp7G/dlEx9FOB0bLBzldRTnkBU4OEkOzZmYC5r3/vwUR2cl2S4ZiXsvNo6Cqyc45HLdC/HBw== X-Received: by 2002:a17:902:ce8c:b0:1f9:c508:acd5 with SMTP id d9443c01a7336-1fd7457344fmr63321155ad.5.1721714129057; Mon, 22 Jul 2024 22:55:29 -0700 (PDT) Received: from localhost.localdomain (69-172-146-21.cable.teksavvy.com. [69.172.146.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f469df5sm65724685ad.254.2024.07.22.22.55.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 22:55:28 -0700 (PDT) From: Tony Ambardar To: bpf@vger.kernel.org Cc: Tony Ambardar , linux-kselftest@vger.kernel.org, Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Yucong Sun , Eric Dumazet , Kuniyuki Iwashima , Jakub Sitnicki , Dave Marchevsky , David Vernet , Carlos Neira , Joanne Koong , Petar Penkov , Willem de Bruijn , Yan Zhai , Vadim Fedorenko , YiFei Zhu Subject: [PATCH bpf-next v1 02/19] selftests/bpf: Fix compile error from rlim_t in sk_storage_map.c Date: Mon, 22 Jul 2024 22:54:29 -0700 Message-Id: <1e00a1fa7acf91b4ca135c4102dc796d518bad86.1721713597.git.tony.ambardar@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Cast 'rlim_t' argument to match expected type of printf() format and avoid compile errors seen building for mips64el/musl-libc: In file included from map_tests/sk_storage_map.c:20: map_tests/sk_storage_map.c: In function 'test_sk_storage_map_stress_free': map_tests/sk_storage_map.c:414:56: error: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'rlim_t' {aka 'long long unsigned int'} [-Werror=format=] 414 | CHECK(err, "setrlimit(RLIMIT_NOFILE)", "rlim_new:%lu errno:%d", | ^~~~~~~~~~~~~~~~~~~~~~~ 415 | rlim_new.rlim_cur, errno); | ~~~~~~~~~~~~~~~~~ | | | rlim_t {aka long long unsigned int} ./test_maps.h:12:24: note: in definition of macro 'CHECK' 12 | printf(format); \ | ^~~~~~ map_tests/sk_storage_map.c:414:68: note: format string is defined here 414 | CHECK(err, "setrlimit(RLIMIT_NOFILE)", "rlim_new:%lu errno:%d", | ~~^ | | | long unsigned int | %llu cc1: all warnings being treated as errors Fixes: 51a0e301a563 ("bpf: Add BPF_MAP_TYPE_SK_STORAGE test to test_maps") Signed-off-by: Tony Ambardar --- tools/testing/selftests/bpf/map_tests/sk_storage_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/map_tests/sk_storage_map.c b/tools/testing/selftests/bpf/map_tests/sk_storage_map.c index 18405c3b7cee..af10c309359a 100644 --- a/tools/testing/selftests/bpf/map_tests/sk_storage_map.c +++ b/tools/testing/selftests/bpf/map_tests/sk_storage_map.c @@ -412,7 +412,7 @@ static void test_sk_storage_map_stress_free(void) rlim_new.rlim_max = rlim_new.rlim_cur + 128; err = setrlimit(RLIMIT_NOFILE, &rlim_new); CHECK(err, "setrlimit(RLIMIT_NOFILE)", "rlim_new:%lu errno:%d", - rlim_new.rlim_cur, errno); + (unsigned long) rlim_new.rlim_cur, errno); } err = do_sk_storage_map_stress_free(); From patchwork Tue Jul 23 05:54:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Ambardar X-Patchwork-Id: 13739329 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DFB39634; Tue, 23 Jul 2024 05:55:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714134; cv=none; b=tUIWIJylfZEghILtgsLBkt4DbfZCq+DfximaCSl7sb8IO3WnJezYzm+kR4XldIZ5YE+G8a7ZpQ77VMGLcyIGW7n/7if1rpnNMNIbkFvXwdWQvVVsty6omU4Df7M2JMfTUTHaZ7ydOsHv7nYlLIICY39mmvn2h8ybYMmi4CPLqdg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714134; c=relaxed/simple; bh=4RFypAgwGmLTl4twjAhqkZ4m7+hePVxz52CGbCdNIfY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=T/rwjQw4FZBjevGNX3XB8zd1FZbk00BwKuBQNQhQcy0227uACArmTYdvcZjxihqtL7JXXsz5zZD4KZJNzd3Rt/tsfja3r+GrojTXd+pPdO8PqXVpHTnjUG9EVP1SkxJ1zdi0CaZQTCFtPfji5pRxetWmspuqjkyZH2XEdv9xaUM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=lN9Sli/0; arc=none smtp.client-ip=209.85.214.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lN9Sli/0" Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1fc587361b6so38477955ad.2; Mon, 22 Jul 2024 22:55:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721714132; x=1722318932; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SxK4doYdw1oB9sDNKsPLRlJ7hhIzVIy869hVVfkND8k=; b=lN9Sli/0Z2O6aDoeyL+0nra38Xs8N1gBzFVqrP2N00wwwy3Eg4I5rMXbXlX4QlFg7B 4s5Hv+ZALJOupQNc/J6imC6J88wsCWP7EdNdEZ6BuWeTyXZLUf/mq0+RaBxpdSY0mEea Hqo+b5oDPGPGVFep9u0M715ygPjyAByVY2rwX9vOHpJ3XClAbHYzpdj5EMykO5ILmDt0 sQnpeRhvMOp6z0aFLMKz0yxc72myaFCOyT3iHO5RJedW/6qu11O8p7er/WHeCd3JoJcI 2lhivCDuV21yjWb/KzlHwgQEMBGA7dYp8iFDP/hVB/2hlr5PJ/9QWC7syKBg6S9m4jOB HMqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721714132; x=1722318932; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SxK4doYdw1oB9sDNKsPLRlJ7hhIzVIy869hVVfkND8k=; b=lZkqcbDubop0rhvBMcgL72A0Kf16O9qVVgiP15K6hxdNAZ/3pfhGk9Vuzhyql1xuG9 UjC0ZONWkY91DYPmpSapS6CEbn+ma8A2ITFGRPpRIvO+CdrgVyRYwr78LN3p0ShlVkJV i9LnQon09gi8U3jlDXpIamDfCW81fzOSdIpKxDd0NVd58siNS/sepnlMNwZuRAOBN/4o RAYpSPxm1m6h86cICZvd234V5usCGPnUyMajpuY+Rd2kCX6R6WkPr7ixKsMjB6sNhbOh Gj4jTsMGOQ7YDdUpv5zw6+ealAI4kvtO7e3ealR3Rt92UM/CnGsi76GMlAItoa79qx97 TXvg== X-Forwarded-Encrypted: i=1; AJvYcCWExHHfsJcy+ffeC5wXZm6Pgg/6ZJGmoZjh7SVEuyG8WmWQbBAkCiS8dkhFFWC7r1DsBPDtzzdDXWtVlDQJwChLlJYnVqeGO3u2k+rGFn2X X-Gm-Message-State: AOJu0YzQ6h1AcoEZTGxfKqUyLv1vGaQqqzi9WBU71Ld7+Os/yiCAiBuj JTkorAFPXLPfyj2mkqKA0/p9mDB9xj0Ce06UDiV7lE/ZOWZWS18MvkTp2TN2 X-Google-Smtp-Source: AGHT+IGHqVCuDbg5s7IOSYDT/FJ30sgl/Yqdr9L6/cQCoQMTT7eVGh24AnmW1A4012tgZPS/qgaxng== X-Received: by 2002:a17:902:d2c6:b0:1fd:8f14:a109 with SMTP id d9443c01a7336-1fd8f14a474mr45905825ad.32.1721714131685; Mon, 22 Jul 2024 22:55:31 -0700 (PDT) Received: from localhost.localdomain (69-172-146-21.cable.teksavvy.com. [69.172.146.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f469df5sm65724685ad.254.2024.07.22.22.55.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 22:55:31 -0700 (PDT) From: Tony Ambardar To: bpf@vger.kernel.org Cc: Tony Ambardar , linux-kselftest@vger.kernel.org, Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Yucong Sun , Eric Dumazet , Kuniyuki Iwashima , Jakub Sitnicki , Dave Marchevsky , David Vernet , Carlos Neira , Joanne Koong , Petar Penkov , Willem de Bruijn , Yan Zhai , Vadim Fedorenko , YiFei Zhu Subject: [PATCH bpf-next v1 03/19] selftests/bpf: Fix error compiling bpf_iter_setsockopt.c with musl libc Date: Mon, 22 Jul 2024 22:54:30 -0700 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Existing code calls getsockname() with a 'struct sockaddr_in6 *' argument where a 'struct sockaddr *' argument is declared, yielding compile errors when building for mips64el/musl-libc: bpf_iter_setsockopt.c: In function 'get_local_port': bpf_iter_setsockopt.c:98:30: error: passing argument 2 of 'getsockname' from incompatible pointer type [-Werror=incompatible-pointer-types] 98 | if (!getsockname(fd, &addr, &addrlen)) | ^~~~~ | | | struct sockaddr_in6 * In file included from .../netinet/in.h:10, from .../arpa/inet.h:9, from ./test_progs.h:17, from bpf_iter_setsockopt.c:5: .../sys/socket.h:391:23: note: expected 'struct sockaddr * restrict' but argument is of type 'struct sockaddr_in6 *' 391 | int getsockname (int, struct sockaddr *__restrict, socklen_t *__restrict); | ^ cc1: all warnings being treated as errors This compiled under glibc only because the argument is declared to be a "funky" transparent union which includes both types above. Explicitly cast the argument to allow compiling for both musl and glibc. Fixes: eed92afdd14c ("bpf: selftest: Test batching and bpf_(get|set)sockopt in bpf tcp iter") Signed-off-by: Tony Ambardar Acked-by: Geliang Tang --- tools/testing/selftests/bpf/prog_tests/bpf_iter_setsockopt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/prog_tests/bpf_iter_setsockopt.c b/tools/testing/selftests/bpf/prog_tests/bpf_iter_setsockopt.c index b52ff8ce34db..35363b104dd2 100644 --- a/tools/testing/selftests/bpf/prog_tests/bpf_iter_setsockopt.c +++ b/tools/testing/selftests/bpf/prog_tests/bpf_iter_setsockopt.c @@ -95,7 +95,7 @@ static unsigned short get_local_port(int fd) struct sockaddr_in6 addr; socklen_t addrlen = sizeof(addr); - if (!getsockname(fd, &addr, &addrlen)) + if (!getsockname(fd, (struct sockaddr *) &addr, &addrlen)) return ntohs(addr.sin6_port); return 0; From patchwork Tue Jul 23 05:54:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Ambardar X-Patchwork-Id: 13739330 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD414634; Tue, 23 Jul 2024 05:55:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714137; cv=none; b=eFsKcCddHVMaXBbtv/iVxVs3l2uVp7xOlTtfNUhKnvH+i4V67wMxom5KM7yQf8B9iwa4YEQGXrZeIBWS8DxnoODhM4WqW+MDVRYWng8aXwLCIc6gaImYeHl1s+RXvC6VlNaQrPzE44XVoh7fP20QAuFZBMq3s5OnCk2V7OXXiIo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714137; c=relaxed/simple; bh=xiObBQ5jb7XnfGSH1kzdorxlvHdwcVFjY3UhapO2kNA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=M82m5yyT1BcIMKA9GQNhOQunjSnOoD+eztwxycODoLX4QEF/SfKrUTT045eiiA5kamSxAejJ5A+YXWKfmd/IMGaD7mq+0Y8/UToZr5uUTEBLn8lpgoLWckLDrTIQdFCAbBK79JGjUQOSIlBhxe5Sbqa7iuoaJd9lguKkJS9zbns= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=mZVqV2oV; arc=none smtp.client-ip=209.85.214.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mZVqV2oV" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1fc49c0aaffso35891765ad.3; Mon, 22 Jul 2024 22:55:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721714135; x=1722318935; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RuQrhWzd1UjXmeSYi5wTmCmvLJfO0MqDL+TpdjPdJ6c=; b=mZVqV2oVAPF6XqZlDwaiBugRWlKssQDZ7TXfyPQ3NsG/KgYc1ELFmg8o2c4dWzjrsT Atl/AUorFgmRoXz5RdLRQzh9Er9LzoaaCsxDWfr4FCdBNo4c10g6v2+8hK2MIIWgoPmA 9zOIdCbfIIRi8gg76wkmozyTsnE3x/6HD38YR+wPFHTy9iXAT3hWmNASX1ki6txhagKl 0bkjN3JbhD8UKgCLnnrSceSXHdFChgPCm/CA+/4yBIinp4xL7pWFjfvTRH1k5MrJlOhF P02Om1z+uGcSZUUKRKKzJ8G1U/WGWI216PMwRo8haXyIwmDc5tt+kSs/e/YJgaVgqoZK JDzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721714135; x=1722318935; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RuQrhWzd1UjXmeSYi5wTmCmvLJfO0MqDL+TpdjPdJ6c=; b=OixX57zWcTKYviMvFfxiGN360lvA8K0h+MssYjbd/FZZUNQTS5b8PmZg9/CfYFTaeZ /72VxPWKsYMXxD0g8B9PvwCmMEzTP85kQX+8MTAVJH+65DrwNBwXVyLObVkZ9tOhru2t mXivfkrtSykbipN3Zoa+wRfqx+Jlx8yhhmukXinDc3vOleU1zLO+GyhYxQR8CGUzFpln cFJVPlE4MVkSkfG1a7XihXCttU41wrJBdx5r8xshiT8RrSESJudmX1lKw8htHa3crJWe /TD8JX+uPdEkdiZcwczdZXj2LVtpef7asknqSxQrjYgpV+2ghKwTV74VxNj3tPqVo5Ud oO5w== X-Forwarded-Encrypted: i=1; AJvYcCULcRjVJmQSFFYrysM3WmpHvaa8kmYHcR8xyo0pmgAttQjP+xh0rNJvmF1gc68+IrzkAzrzZWpSp+V3X+c/xAjyh4CENiz797vkxpcjdN1V X-Gm-Message-State: AOJu0YwFAThXK1k8ww0gVy+U3SH9ABw/qNke+MzNkMX6O3AawsZwpBQh CtFuK9ZPqQe8kxRE0IV4IW0SxEcOOcalXN8e6Qgoo496CA67Tx62CLg87a/7 X-Google-Smtp-Source: AGHT+IEAQc0RzjkOrFcnZqABFAncPUK4CCaUUSy0LKjJZJVcKS1kDWYNe0ICwk/APOGy+IRGcBbmsA== X-Received: by 2002:a17:902:f685:b0:1fd:8c25:415d with SMTP id d9443c01a7336-1fd8c254f58mr31605635ad.36.1721714134709; Mon, 22 Jul 2024 22:55:34 -0700 (PDT) Received: from localhost.localdomain (69-172-146-21.cable.teksavvy.com. [69.172.146.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f469df5sm65724685ad.254.2024.07.22.22.55.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 22:55:34 -0700 (PDT) From: Tony Ambardar To: bpf@vger.kernel.org Cc: Tony Ambardar , linux-kselftest@vger.kernel.org, Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Yucong Sun , Eric Dumazet , Kuniyuki Iwashima , Jakub Sitnicki , Dave Marchevsky , David Vernet , Carlos Neira , Joanne Koong , Petar Penkov , Willem de Bruijn , Yan Zhai , Vadim Fedorenko , YiFei Zhu Subject: [PATCH bpf-next v1 04/19] selftests/bpf: Drop unneeded include in unpriv_helpers.c Date: Mon, 22 Jul 2024 22:54:31 -0700 Message-Id: <5664367edf5fea4f3f4b4aec3b182bcfc6edff9c.1721713597.git.tony.ambardar@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The addition of general support for unprivileged tests in test_loader.c breaks building test_verifier on non-glibc (e.g. musl) systems, due to the inclusion of glibc extension '' in 'unpriv_helpers.c'. However, the header is actually not needed, so remove it to restore building. Fixes: 1d56ade032a4 ("selftests/bpf: Unprivileged tests for test_loader.c") Signed-off-by: Tony Ambardar --- tools/testing/selftests/bpf/unpriv_helpers.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/bpf/unpriv_helpers.c b/tools/testing/selftests/bpf/unpriv_helpers.c index b6d016461fb0..220f6a963813 100644 --- a/tools/testing/selftests/bpf/unpriv_helpers.c +++ b/tools/testing/selftests/bpf/unpriv_helpers.c @@ -2,7 +2,6 @@ #include #include -#include #include #include #include From patchwork Tue Jul 23 05:54:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Ambardar X-Patchwork-Id: 13739331 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C15C313C8F5; Tue, 23 Jul 2024 05:55:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714144; cv=none; b=seAbNrS6jQ1znPR1GSuSn8E9Z1OcdP1wL8NkFQM5IPW9HHADAeQMbM7Kq1BmUc5auQOj+DGh699NbdvonFK3iXp788o/YV3nvwBAPnKXeDkfgwjZES7YjFUSHAcYH53nnguhrfeYaKUusrOcxULyYV40SFkkMxBZ18M4U6ugHZ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714144; c=relaxed/simple; bh=348kv5TYj77FY2oepxEjwLBdTShFg0FGVTQTHlTuuC4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=sh+Yt7JW8BcHprNlNm2QOKnok+gYaYLI7qNuw8PgoRtgf0D7O452oxI07qaKoQp5jH1Avq5zGdmAY6Nn5Xbs14APH8o17ina8vAeuHjrRR3aGuUap3GN6cUvKDX3w/muLPA6DbfCNwBYMmbqdKsAr7ZypiEHXfcpLP9TVEeIY3k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bDCkgNqw; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bDCkgNqw" Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1fc65329979so2067145ad.0; Mon, 22 Jul 2024 22:55:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721714141; x=1722318941; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1etmszcNBxjVhKCxwYCScQlTndWHwCT7LiuVHopK3AI=; b=bDCkgNqwjZLBkULI8mihmiIsOTKuge1uVHJGXgooe6bVNF4XyHrTi5DfxC9HBJxLLt unoUMe01Bj4lBNMyYxROxa2XHatEb/ZDlRMYDvw++SelGrh8SllP1YyasjVXmnZftS8/ nhP7/xHPr0hJoo3JEdGi9d/atVZvwFmKUhushmzaD89iNLVQ9M0tZvomByMi5kxhLo9Z 0Z58zo3RXOQ5BPTUhZ0vvSq4IApXhWEGto9yyI7H90x7Eec/indHRF9wZsNBKfCtwaPS AB/prPG8QyjQES9HScJ00FH+cB3C12prAdIEfZCRxoHfkiS/K8UWTQ9vuExLUC0CfJuS zrUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721714141; x=1722318941; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1etmszcNBxjVhKCxwYCScQlTndWHwCT7LiuVHopK3AI=; b=FFCoLFbk9IDpAKHpYXZmqL5A3u3kWrMEYUuv8NbldKYHXM9pRdScxHKfioM3p8CnSV POfgr4bUwFE3rrwa6o6Ab/mBF2nDbwtYLitocyYViZ9GHPbT5z0KRb0p0w3r3TpW1rr6 1gynFEo6OBK4FUtjBxqPUOHG02Dh8GenCisIRsnKvMCKvfnRqoMUUyi9P2IS9BEHl+p8 oqihofE9kbZ7Zhni4NK9BIesO4JIG67MRk1TnIbhv9uQKRaT2yOdqvKCD3nrlV7UOlXE dU4WlFIrCid8AlIkv3OE10qFRKVgySqiTKz1WQx6o19xWxKC2wBJMiYlvCsugxrKzADf 3/cw== X-Forwarded-Encrypted: i=1; AJvYcCVEBM2NHVomFluljd1YTeVqKasnjTMGiTO48S4bzp7UJQclsWCs1C+uYWLL5tlhJRc/Ao8Qs4FXYqlU6ZVgjZ78Ns/59DJkG9z5nQrZcTWL X-Gm-Message-State: AOJu0Yz6WkLaIKbq+KLEsnSKRkbPO2i+oaVg8+bVDbXzSthwqwn05gnn n0tvfCeoGuL4vE1SA+CL6sUaOOSbs0BEf4kWCPUJrn88VNvNa8ImEvYJND5S X-Google-Smtp-Source: AGHT+IHOEKKJNDMqMVAZh3MFFi3CH589ZryUTXLGiJCAeOmmC7E3XkLj9JAU1QPXFtSYZHKtGCg4SQ== X-Received: by 2002:a17:902:d4c9:b0:1fd:a360:443f with SMTP id d9443c01a7336-1fda360489emr35738695ad.24.1721714140803; Mon, 22 Jul 2024 22:55:40 -0700 (PDT) Received: from localhost.localdomain (69-172-146-21.cable.teksavvy.com. [69.172.146.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f469df5sm65724685ad.254.2024.07.22.22.55.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 22:55:40 -0700 (PDT) From: Tony Ambardar To: bpf@vger.kernel.org Cc: Tony Ambardar , linux-kselftest@vger.kernel.org, Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Yucong Sun , Eric Dumazet , Kuniyuki Iwashima , Jakub Sitnicki , Dave Marchevsky , David Vernet , Carlos Neira , Joanne Koong , Petar Penkov , Willem de Bruijn , Yan Zhai , Vadim Fedorenko , YiFei Zhu Subject: [PATCH bpf-next v1 05/19] selftests/bpf: Drop unneeded include in sk_lookup.c Date: Mon, 22 Jul 2024 22:54:32 -0700 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Test prog sk_lookup.c includes glibc extension '' and fails to build for non-glibc (i.e. musl) systems. However, the header is actually not needed, so remove it to allow more portable compilation. Fixes: 0ab5539f8584 ("selftests/bpf: Tests for BPF_SK_LOOKUP attach point") Signed-off-by: Tony Ambardar --- tools/testing/selftests/bpf/prog_tests/sk_lookup.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/bpf/prog_tests/sk_lookup.c b/tools/testing/selftests/bpf/prog_tests/sk_lookup.c index ae87c00867ba..dcb2f62cdec6 100644 --- a/tools/testing/selftests/bpf/prog_tests/sk_lookup.c +++ b/tools/testing/selftests/bpf/prog_tests/sk_lookup.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include From patchwork Tue Jul 23 05:54:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Ambardar X-Patchwork-Id: 13739332 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E29D5367; Tue, 23 Jul 2024 05:55:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714145; cv=none; b=MFSIDQVbEpsHbJsyEqp+mEnMDwHFxwQV8iWE1WzXzm70BCAsGybEl8DosSt36j4fiGcka5d0ZUwBTh9Y79fZZqIGQ8iDpeDLvVX8oeM3Jb0hmD/RjqA4pn8E1JcbBUxNh3dhk6sb5jgGF8DVSzWWcHJ1wW2LHWYBA2IZhN5/PZ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714145; c=relaxed/simple; bh=orjN7N45+/uSUw4tbpqsVXAphe9Gj4vBhZaUgHqwb0g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=s+PAGKoPUgeGmYtmjqonrqTUebJYjxfYUVotOLfQ+H9WycrbfPcVPE3qPMcnhoZwOoVM1gN3U/UKDTsupgFNuQuym84uLD+E7sHsYKl0kddjitB0Sq3/AP2p+gRZ3Lfz7/NemnKEWe9wk55dU+gh6EySpWypG14KzXdv6LZJ7bI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=FdMYbG55; arc=none smtp.client-ip=209.85.214.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FdMYbG55" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1fc587361b6so38479095ad.2; Mon, 22 Jul 2024 22:55:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721714143; x=1722318943; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qzLKMhq/i0ZyAtmvpqGuB9Le2Uf8ZZ76gVE1oOnUGq4=; b=FdMYbG55FVu9KpDULCdYTcP/6bVh4IZfm3YXxvx9kHt3BlUkrNVG9zpsWWPBvBZC79 zNDq5P/tDDpNTKGqLuiegvwbXKZsILmR9pg3ZZRVA9T7gBrpXT2WBmFfnOmehjyJ9iJO D/8ODq0HEESObM8jLHIz0wH/9m7V/S29fAdiBTiUT/lHmha3HmBJ2vUAinAE4fLmOcJe VP8dmSpss8vcCR6GCqsliX3UjYZyTKyytIAA4ZeSDp+2NJho5CEPE3VpwMA7l46pjK8U 7VpR9SpcXHSIw+thDii+7mOBQit9LgPo4Khu7cyYqVZpkEaVlEjVtYhfIicffBROEFWr bPvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721714143; x=1722318943; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qzLKMhq/i0ZyAtmvpqGuB9Le2Uf8ZZ76gVE1oOnUGq4=; b=QqyO8YKXvCdQqKJ2PCqVAgjzi1oRBKktb+UlpFI091YdJD7Bbzh5uexQFK/sH5x4gE QRd68egRYlx7XJTAZe8XHNr8JPtFZ1KpteTLZg+fFdV2L7meGBaQT1fyf8Nt9/pg/ACR 0K3eD+shgtd2ZXfDLWDxuqR4YjygidKS0OCDQWt/AjwWuzPX8/CCNvenAPYoY4a0Zd59 bNYnW3iGA/16XUcwpnhMbrgxcVG4SPv9ZAoAkPtowTlREELTNJo3A/cl51729m6WU369 W2c9UlA+QQI5ai8UmdRe5liaIMol2cK2E0AVmpIi+JXTX2D5zDw2ZkHTA12lzZXg69li SVnQ== X-Forwarded-Encrypted: i=1; AJvYcCWiLaPKrJG2y+88/9yQ0an9cCM+cadlMuAm/FsDFWIarJlxDIQt0yVdKetcKt8ZWU5jJLQJV2eV+qF7Pwew7W4wWEr+EARLYjkqI5Op0qJp X-Gm-Message-State: AOJu0YzSHECPGikSE3phE36d3K3Pn7W84B7UP45r0BgO9RBbIawCX3TG 0tzQ0HcGgCGyvyJx2X6/cBR5oQicmc8PXMPPGa2VA4rVXfw2TfeljDbYjQua X-Google-Smtp-Source: AGHT+IFEi9tn+WpGvX1s5XPxycwhrDJbDW+r35u/w7uuzaRmvB6yOSQmoFJGpNgvKL+njogBevZYFw== X-Received: by 2002:a17:903:234b:b0:1f6:f298:e50 with SMTP id d9443c01a7336-1fd74682b41mr58418855ad.58.1721714142976; Mon, 22 Jul 2024 22:55:42 -0700 (PDT) Received: from localhost.localdomain (69-172-146-21.cable.teksavvy.com. [69.172.146.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f469df5sm65724685ad.254.2024.07.22.22.55.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 22:55:42 -0700 (PDT) From: Tony Ambardar To: bpf@vger.kernel.org Cc: Tony Ambardar , linux-kselftest@vger.kernel.org, Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Yucong Sun , Eric Dumazet , Kuniyuki Iwashima , Jakub Sitnicki , Dave Marchevsky , David Vernet , Carlos Neira , Joanne Koong , Petar Penkov , Willem de Bruijn , Yan Zhai , Vadim Fedorenko , YiFei Zhu Subject: [PATCH bpf-next v1 06/19] selftests/bpf: Drop unneeded include in flow_dissector.c Date: Mon, 22 Jul 2024 22:54:33 -0700 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Test prog flow_dissector.c includes glibc extension '' and fails to build for non-glibc (i.e. musl) systems. However, the header is actually not needed, so remove it to allow more portable compilation. Fixes: 0905beec9f52 ("selftests/bpf: run flow dissector tests in skb-less mode") Signed-off-by: Tony Ambardar --- tools/testing/selftests/bpf/prog_tests/flow_dissector.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/bpf/prog_tests/flow_dissector.c b/tools/testing/selftests/bpf/prog_tests/flow_dissector.c index 9e5f38739104..9625e6d21791 100644 --- a/tools/testing/selftests/bpf/prog_tests/flow_dissector.c +++ b/tools/testing/selftests/bpf/prog_tests/flow_dissector.c @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include #include -#include #include #include From patchwork Tue Jul 23 05:54:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Ambardar X-Patchwork-Id: 13739333 Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C4F2367; Tue, 23 Jul 2024 05:55:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714147; cv=none; b=ublbc5NYv/nKwBrvxEIcpcJObvEEfsJMS5xv+75UbpohCXjtyLDwJvJO0pl92y4bWCEXuMNhFVzdZpn7knr9x0OfbS9aEe6lwmdfWlPOX20h2yB5queBn6ppQFtW+GLmA3osZOBv/R8RMwnELzlnHNCnDjJXzRpPndA12D0SYlU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714147; c=relaxed/simple; bh=/cmqZfrgReeBewXMWmHgSVeYjKwo7honBt9XJsxHT6c=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VaIZPhoqhfV0eC9ZfF0XuI5ArUZk+xdsA9HAuO1bx0oK7vzJo5nP6/03+q3fchtVZ8Xu68JMTwpHGljexqe7bINxt/bOuRZusv62zWziTtNTvZD1LWJwuJTX6IJKoeY442Vk9JReRBpBgdrU38wcQ+6ADUzEoeRtdcnjGqTX34k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Is59cTEH; arc=none smtp.client-ip=209.85.216.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Is59cTEH" Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-2cb52e2cb33so2716013a91.0; Mon, 22 Jul 2024 22:55:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721714145; x=1722318945; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gv4InJDtHX2aTNNjGgaEfTodG9sY1/Fb2dykPRkWYds=; b=Is59cTEHJlzU36o6QvaNH551o1xgNgiafDKUr6UWUW1qHIBHGtJ80FtSlX6EAcl4TH GU5X3++yzhjE6JCUEfYoVkswrRhUHLl+9EiPdl/ji4RinnmRrbnGluMNyWGeUurDgC/f aqNc8RIawdDIPzMPzqITHOwU/AAQYPT0sulsmLenvGBVSnKE/ThLrSAX+ELvSDjZqpyb JoQjYs9/hNx8dolkbzNExGmEFKOl2fpVDrYlYYdhWzGt0yK143S6PULPycBab94Grt4f iGT2hbCOg+SgkFvZIgtBBYR+Q1gLJCOYuHKeq8GZxOSectvK3PPrBqFdjNIbN/B6ikcG qa/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721714145; x=1722318945; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gv4InJDtHX2aTNNjGgaEfTodG9sY1/Fb2dykPRkWYds=; b=qX6CGutzFFkJNWm7DhzvYRElVug/cQ5zgaQ4ArWKCHFMepWZMoI3ejFLMsG7M4S7uD U1apVi0/RKQyy6/Aq5su095ELUz76p1hwzPP2lVDz3bPUtGqeby1eEh8I4o0IIzht7KN BGDvLfYIRkcoD0vPNrXSxKuGa6S556WUrxjCpx7lznuMoEtvK91bQaw+rg7RzIPWent8 69Pc7CSDUKfVOTGEBu3HXwHXag8Sh/ahmPNl930An0XKp/4Ag/9QSt8R/Aa59KvN+bYx D8spNz/Y2ohcCNrYhNKztIFc4EiYpVMFY4PQq47wNWUgHzApJUZfhT9rpuI2YqEcXIHp MTOw== X-Forwarded-Encrypted: i=1; AJvYcCVPLM/8CxJAI9ckxT05eF3tovBkVqWYZt5dZGVH0TkZndURfx7ZoA/eewpu0Q+Cmr7OJhGEdqbkc36prjxH0nmJKIYGi/O1VXkhSnWsUd5N X-Gm-Message-State: AOJu0Ywv74E9DWS53Wdup3yndXWBA8jCCUuoJ8bIulJVBiM7nROCry/c cEjtw/l981qJWZY9sYVoAAhqDaiiCogDRDyaDLbsVRIaQHDis/jr4PEVYhbE X-Google-Smtp-Source: AGHT+IFvEVhGC9Qy4mZpt7sE244M6J1kp503e7DWYkph1zlx5j69pwgzBfJQOIxpO8VZS38p8gwhgA== X-Received: by 2002:a17:90b:1110:b0:2c8:da73:af82 with SMTP id 98e67ed59e1d1-2cd27412c23mr5180374a91.10.1721714145467; Mon, 22 Jul 2024 22:55:45 -0700 (PDT) Received: from localhost.localdomain (69-172-146-21.cable.teksavvy.com. [69.172.146.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f469df5sm65724685ad.254.2024.07.22.22.55.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 22:55:45 -0700 (PDT) From: Tony Ambardar To: bpf@vger.kernel.org Cc: Tony Ambardar , linux-kselftest@vger.kernel.org, Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Yucong Sun , Eric Dumazet , Kuniyuki Iwashima , Jakub Sitnicki , Dave Marchevsky , David Vernet , Carlos Neira , Joanne Koong , Petar Penkov , Willem de Bruijn , Yan Zhai , Vadim Fedorenko , YiFei Zhu Subject: [PATCH bpf-next v1 07/19] selftests/bpf: Fix missing ARRAY_SIZE() definition in bench.c Date: Mon, 22 Jul 2024 22:54:34 -0700 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add a "bpf_util.h" include to avoid the following error seen compiling for mips64el with musl libc: bench.c: In function 'find_benchmark': bench.c:590:25: error: implicit declaration of function 'ARRAY_SIZE' [-Werror=implicit-function-declaration] 590 | for (i = 0; i < ARRAY_SIZE(benchs); i++) { | ^~~~~~~~~~ cc1: all warnings being treated as errors Fixes: 8e7c2a023ac0 ("selftests/bpf: Add benchmark runner infrastructure") Signed-off-by: Tony Ambardar --- tools/testing/selftests/bpf/bench.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/bpf/bench.c b/tools/testing/selftests/bpf/bench.c index 627b74ae041b..90dc3aca32bd 100644 --- a/tools/testing/selftests/bpf/bench.c +++ b/tools/testing/selftests/bpf/bench.c @@ -10,6 +10,7 @@ #include #include #include "bench.h" +#include "bpf_util.h" #include "testing_helpers.h" struct env env = { From patchwork Tue Jul 23 05:54:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Ambardar X-Patchwork-Id: 13739334 Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5F63367; Tue, 23 Jul 2024 05:55:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714150; cv=none; b=FIugZ+aONrq1ofJsG9M+tnUrv6vLvZ/wwPXe7Qm7UqaDrCPStXXkaclTG6vkAxYXuEm4IhyWMn4VoWYhsNYJONvzU41VlhgKGYU4Mf7XL9iujj4s1PuiUVpNAVMs5Ko0roUkV4LXQcT4HDuabr1uWofgAT00I7fiI0Ejgaxo/DE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714150; c=relaxed/simple; bh=2ssllKaNronxEnB4vH8yEfLpTO61CTJZ1bgpHM3sayk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Qu64fJcWfaRiTO5kepGLuA/9BOrgEeMsmoSDLTe14VCWtp64enUVSFwTUXFz9PhcEL4DU6dyv7mb5DhqHTNxjn8eZFHga8IjlZWYKfw9v+gTf0CQk7G6KLw71HXwKda/OQhTDPFXnzYFy22Ljg+YV4y/qQsBGc4VtoT4N6ef9LE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=lyTUeAP0; arc=none smtp.client-ip=209.85.215.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lyTUeAP0" Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-79b530ba612so2696105a12.2; Mon, 22 Jul 2024 22:55:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721714148; x=1722318948; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8mRv7fxGm8wGDSLiyp9Dtkgu4XAwa13vX4fcz6gE0zE=; b=lyTUeAP0mjrC7uPOS9Oo5YL7WYizmqquF7omZ7wUETpo4fvJC+O3GQZBgo0mQhGdqS koJa/uNfS5v/hQv1nsYF6tV0ZiI0G0AJs9YdUcq10Tub+wUhGGgb7UJ46zaIaeVmxbgj nZM68bULxHtQvHOCqOJlLHeprEMpGKG77ApyqFqGAx1bPN5sLfOA+0Sb0JX8bxnaOMTw BN+j0iiJiKhyuI7qUj9G4KErkx3/72evoRjVPVipDiO80iLISmtAHKhQ/wxNY8An0YqY Oi4Qd4sQQ5w3Ckr3AQiV8H3+w17L42xwfn9lCogs1wbckT1Cf8jVYnSbe3aa4N8pkcaF 4DCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721714148; x=1722318948; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8mRv7fxGm8wGDSLiyp9Dtkgu4XAwa13vX4fcz6gE0zE=; b=WuXO1OWoj9jazJWNwbjAbLlCAP6rc3IHERmWmoH91NV/yZz7YzhEDzMntmtqPeRk7I bjv3Yjjy3yErB3SExgYXUtiYIh4oOoEOcSOhTggTAHqNVILddSmC6U4O3RnkiR0h0W8n enjdnLcZn25HqlJ6Y15N5eZ5X1aHBePhjV3Ue3PVEr+XiurkuI1rPxurJBbvtJXyQZt9 +QVgXHMGpAcQyQ2UOOlhMjtIbw49tHSj8XjBFBYxbts1YoWs7tWZVreyGi1g8XgD2CFU eEQvAQnP0iJTutQXkM2DtOuqGwZZBqK0fg7fQTaUyU6zLtQ/4jqJfFVCGhWbtGu5B0vm GXQw== X-Forwarded-Encrypted: i=1; AJvYcCXkjjLexLX29naDHxYWSWRo7/QaiI5po/BCDb9HYfFw6m8rj3+oOUl4tCPp8a6NMEwheoHhbRJnbOwk8vfEL1qxcb+vknqOcJMoYmf3HNSZ X-Gm-Message-State: AOJu0YxtUwol++rESWve9PVoQBtSFoWImjF5HBGI+t0qUdr9WmmU9NKQ +OqQgOL4h1JN3vxeLxC25AdDl3LBhOFF09/UsuRxiSTKWgtTzoZADA77RpqM X-Google-Smtp-Source: AGHT+IG2S8c7/eMss/LSzkOz87mSAGlZD/oxADnlBRju4cY9AXwPSj4cmDsB7hN2rwmE7jCr3epcYw== X-Received: by 2002:a05:6a20:72aa:b0:1c0:f080:ed51 with SMTP id adf61e73a8af0-1c42285defcmr9651578637.2.1721714147871; Mon, 22 Jul 2024 22:55:47 -0700 (PDT) Received: from localhost.localdomain (69-172-146-21.cable.teksavvy.com. [69.172.146.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f469df5sm65724685ad.254.2024.07.22.22.55.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 22:55:47 -0700 (PDT) From: Tony Ambardar To: bpf@vger.kernel.org Cc: Tony Ambardar , linux-kselftest@vger.kernel.org, Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Yucong Sun , Eric Dumazet , Kuniyuki Iwashima , Jakub Sitnicki , Dave Marchevsky , David Vernet , Carlos Neira , Joanne Koong , Petar Penkov , Willem de Bruijn , Yan Zhai , Vadim Fedorenko , YiFei Zhu Subject: [PATCH bpf-next v1 08/19] selftests/bpf: Fix missing UINT_MAX definitions in benchmarks Date: Mon, 22 Jul 2024 22:54:35 -0700 Message-Id: <8f64a9d9fcff40a7fca090a65a68a9b62a468e16.1721713597.git.tony.ambardar@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Include in 'bench.h' to provide a UINT_MAX definition and avoid multiple compile errors against mips64el/musl-libc like: benchs/bench_local_storage.c: In function 'parse_arg': benchs/bench_local_storage.c:40:38: error: 'UINT_MAX' undeclared (first use in this function) 40 | if (ret < 1 || ret > UINT_MAX) { | ^~~~~~~~ benchs/bench_local_storage.c:11:1: note: 'UINT_MAX' is defined in header ''; did you forget to '#include '? 10 | #include +++ |+#include 11 | seen with bench_local_storage.c, bench_local_storage_rcu_tasks_trace.c, and bench_bpf_hashmap_lookup.c. Fixes: 73087489250d ("selftests/bpf: Add benchmark for local_storage get") Signed-off-by: Tony Ambardar --- tools/testing/selftests/bpf/bench.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/bpf/bench.h b/tools/testing/selftests/bpf/bench.h index 68180d8f8558..005c401b3e22 100644 --- a/tools/testing/selftests/bpf/bench.h +++ b/tools/testing/selftests/bpf/bench.h @@ -10,6 +10,7 @@ #include #include #include +#include struct cpu_set { bool *cpus; From patchwork Tue Jul 23 05:54:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Ambardar X-Patchwork-Id: 13739335 Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0941367; Tue, 23 Jul 2024 05:55:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714152; cv=none; b=Y4HUjX5ZPsZPbAsK96B9nN5FiI2HWba/9yrMq7HXx5Id121K/itmDUVslw61JCB53QKTZTiAC9j5dWStt6VXekDMcybTTddf38KFpYx+5JcJxiE+Z8wwG0yGVqfLtvZWd+2jbX790wYO4tzIh2LPi7dT8PswnT4ijmBli4pogOU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714152; c=relaxed/simple; bh=Fvulvh0wRi63KXe+ClPk5X6wqiVaG05JHCmmwEQZS7M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=J4pWeGn7oixBe4cuXgRhU97BmB3ahcVypID5YSFhO0q77qJVcabpeOfz3J/T4roW9qIjq9tUEjxMojES+tJ7AH+WnvPEONXy3e/sgji9gMReXNmw+VslLPYc/9zKM8x2ekJYtdr0Z9gqh2s6zNcxzdaYpjJqJBZcZjC1Q0RMo2A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gI6SNWHd; arc=none smtp.client-ip=209.85.215.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gI6SNWHd" Received: by mail-pg1-f178.google.com with SMTP id 41be03b00d2f7-70b2421471aso172024a12.0; Mon, 22 Jul 2024 22:55:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721714150; x=1722318950; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PvN2vCmbbitXVsoz1GgGcqMKTbCHMV5QXlZU28fpyGQ=; b=gI6SNWHd3gQvyGJrDgNCAZB7P5UU70nuzIAKvOsjuL9jiejWBRH/rzYYX8HUqfXc3y VYQpqJbNawXZCTATOpIXuGb7AMgnqXVAUIl8an7ANEmh8+WYwVZUWl3Bx6G3JEGOY0uz YUoidFoTnMUz83YCWd29CsYHgsykUz0zQL1kIs1kLhZ8iBRdXTT+cB0a9Bw9S/t1N6Os x818YLq889V0ITfbbKCNMzJxqDBTQ1V/AfT68qC4LbKN76rY5lNs5nxqv0tFAAAG7PN4 TQ0KpdHfPhaeJSRoK4wGzvOgRvrzD7iiFgmIVkY1iAKbL5WDxWPIkE+gVV84uUWTkmiB csWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721714150; x=1722318950; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PvN2vCmbbitXVsoz1GgGcqMKTbCHMV5QXlZU28fpyGQ=; b=do5EawlawwDxEOS7q8Pe+x/+LuAa6jJvoilR70Z5UaObmlym60cfOODfdTwl7RoaLe r5giZMkNH+YsfccmeZwMWh7FXBq7wUvlJmw7eTuTTGdS0Uv8oMI0LgS5U5onf9TfTVZN wyKktZOS5kruWCZDY9LzWidQDh9rT7onjRWcnoNgJTULYPltyS1CIWm3YUtpKHa02IbM J4Ui5R4x/m9uKoucdnwJ5A5vLiqQCJTAmWOqcJAWQ1wEts6SoZnCoI7fOs1xUhoWBrLI 3qelRcMY4Px+oZwyw2T1KrrAdR85RZgl5gV9gFa1+qz9/rwv6Hv2Rn5xILnyYsdsUafP kPsQ== X-Forwarded-Encrypted: i=1; AJvYcCU7GiLDA6fM3pdtVJy4UIEk+vPhZHSJRUIRd+tl1rv+SSmAzSLo7R/2zkqSnLbyWHm5Hnfz6b6ltSwbVJkEg7gIVBWTnfafylto4F9FkyyP X-Gm-Message-State: AOJu0YwbuzAUQfi9lVV6WpOrWdDTOU6FUPkBEGPoOelNUNZ28JPblEqc ETCl+QK/eXbFCXeZH7/9FtQAMSnhR2WzmOYHYdlwBagt6DrVqpqdbKa7hJCl X-Google-Smtp-Source: AGHT+IH1b5r88+ekB7/iB+JZSSWMelEkDkH5IJbqwABrSZGDBCRuhCkjgIu0nu70oG7wzvDil6r2FQ== X-Received: by 2002:a17:902:e74d:b0:1fb:4f2e:8b7c with SMTP id d9443c01a7336-1fd74533ff5mr81345125ad.7.1721714149922; Mon, 22 Jul 2024 22:55:49 -0700 (PDT) Received: from localhost.localdomain (69-172-146-21.cable.teksavvy.com. [69.172.146.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f469df5sm65724685ad.254.2024.07.22.22.55.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 22:55:49 -0700 (PDT) From: Tony Ambardar To: bpf@vger.kernel.org Cc: Tony Ambardar , linux-kselftest@vger.kernel.org, Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Yucong Sun , Eric Dumazet , Kuniyuki Iwashima , Jakub Sitnicki , Dave Marchevsky , David Vernet , Carlos Neira , Joanne Koong , Petar Penkov , Willem de Bruijn , Yan Zhai , Vadim Fedorenko , YiFei Zhu Subject: [PATCH bpf-next v1 09/19] selftests/bpf: Fix missing BUILD_BUG_ON() declaration Date: Mon, 22 Jul 2024 22:54:36 -0700 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Explicitly include '' to fix errors seen compiling with gcc targeting mips64el/musl-libc: user_ringbuf.c: In function 'test_user_ringbuf_loop': user_ringbuf.c:426:9: error: implicit declaration of function 'BUILD_BUG_ON' [-Werror=implicit-function-declaration] 426 | BUILD_BUG_ON(total_samples <= c_max_entries); | ^~~~~~~~~~~~ cc1: all warnings being treated as errors Fixes: e5a9df51c746 ("selftests/bpf: Add selftests validating the user ringbuf") Signed-off-by: Tony Ambardar --- tools/testing/selftests/bpf/prog_tests/user_ringbuf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/bpf/prog_tests/user_ringbuf.c b/tools/testing/selftests/bpf/prog_tests/user_ringbuf.c index e51721df14fc..dfff6feac12c 100644 --- a/tools/testing/selftests/bpf/prog_tests/user_ringbuf.c +++ b/tools/testing/selftests/bpf/prog_tests/user_ringbuf.c @@ -4,6 +4,7 @@ #define _GNU_SOURCE #include #include +#include #include #include #include From patchwork Tue Jul 23 05:54:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Ambardar X-Patchwork-Id: 13739336 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CFAF013D62A; Tue, 23 Jul 2024 05:55:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714154; cv=none; b=SdOKXB1K79fBduutLIDXT1KEDLjgXMP2egikJRw1Cos/1dml0vmpF0TAzZsWteLLrW2zIPwIxaWdTAo9TpVSWTJERX8qa0eJOTU3txXWSE0LIfKkPm7DprRsYMkCgx0UpBpvn6ydJravlFuHzro4MOEI8MrQ/vy6DXG22ceYoqo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714154; c=relaxed/simple; bh=eRuII98XViD/0dSwBICuaSw1bvM26bbH0s8DROk7gjA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EK/QqGFHqUiZ8s4jgvv96gro5bFt3jmmYhiKIeejVpvcIRPDRgyKT0upmm9mxa+gz9ZUPlz6Rpk71gS3Ijt60GHWsJQetyM6VRo3lVBwy1x+H8pQJj7HfiUTLzVfgDZg44x7dkoquUBq/znKYVMOb3dDh9V7tq/3b/PtmImhYsU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IL4kaT/3; arc=none smtp.client-ip=209.85.214.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IL4kaT/3" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1fa9ecfb321so2814675ad.0; Mon, 22 Jul 2024 22:55:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721714152; x=1722318952; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AL4DPYZgYlDk/NnjGykoigyFpJLr7PWYohg34iZoO9Y=; b=IL4kaT/3klHGnH7sveMkli7wqLvV0WuDjL4eCrPzROtphlSe+izAYDERHOVLn/0djf Mdn6PFlVHCHFq0rCMjWqtN52Z+AY9TK9VVdBipONZKvo1R1zctZWNJjleLU6Hv0XtqU/ XOOTd/nimYsoRsx93H3DGeXlhjj+j4ugD/jUj2DeClJIBxKxsveSv5YdvEQ41VJtlkun HJjAB5j9WO2e2ZvjcGpdmBhMlL3Uu+NukH1F9KKqdojoAV2FW5w8XCWGGWv4s5yDbmAK 4nmJ2rVfdCx1ioK2tCz/RL4PeNqkja/3dIImNafTNCGkM+BdBSf77Kk6SC4347V+R1pd AJVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721714152; x=1722318952; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AL4DPYZgYlDk/NnjGykoigyFpJLr7PWYohg34iZoO9Y=; b=cvx99fgR5uYXJQMbmmuGCD9yoU6b5BrdrL1fm4RkFG7YE+KGclOb86EXJSoq6HtOzX wxEDKHp9HuNHr+UKuPaouEZrq4fbILLM/QA3O3Oc339L1sH1toDrIbiA5R+tbmFeisyd X0sPV1vFAUAtBN6MvyteHO6IWILeEyvcOCq4yDvlwlIeb+XsApXCgF9nOCkZB/D920nG GKPNKvLojBrkVhruya5p1KCRpyrl8Kq0ozQ/OaKzR9arLt/oO8wB1MaH3hyxzGc6liuh Awu8hW/fsxbXdC5ivOpWA/wMwU5dvLdUnP0vf2K2HOzveavYz398xBREyRSuKmGgOluS FQnw== X-Forwarded-Encrypted: i=1; AJvYcCX9xlWbcP6k4Sgfthhh9AtZSqL+00/jrW9u00Y9lBDHMI+1eI3knvDEWSb0mTlSYJ4+RMGjjJHqKNWiA0Qk/Kpp7sS2Thi1Lfu7/++szOza X-Gm-Message-State: AOJu0Yyx1J53K/uNMTullRd1eCiBtiTHJmQVK+QxOnZAOXRl/LAFxPNC /tKjDmdoUpez1MEtaU+SJuljDZ+oo9I7KOI/Ks9Etdo2Mqp8KDHovXH5hk+m X-Google-Smtp-Source: AGHT+IFJXgCrXg14DOLfGGc9zK9VKdvI9JTGxiNO2X/ubUh2bDZA5w+vUJgLgjDVFvWSqyGmTMUkZA== X-Received: by 2002:a17:902:c1c4:b0:1fb:58b8:2fbb with SMTP id d9443c01a7336-1fdb5ed65f8mr14409625ad.31.1721714151931; Mon, 22 Jul 2024 22:55:51 -0700 (PDT) Received: from localhost.localdomain (69-172-146-21.cable.teksavvy.com. [69.172.146.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f469df5sm65724685ad.254.2024.07.22.22.55.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 22:55:51 -0700 (PDT) From: Tony Ambardar To: bpf@vger.kernel.org Cc: Tony Ambardar , linux-kselftest@vger.kernel.org, Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Yucong Sun , Eric Dumazet , Kuniyuki Iwashima , Jakub Sitnicki , Dave Marchevsky , David Vernet , Carlos Neira , Joanne Koong , Petar Penkov , Willem de Bruijn , Yan Zhai , Vadim Fedorenko , YiFei Zhu Subject: [PATCH bpf-next v1 10/19] selftests/bpf: Fix include of Date: Mon, 22 Jul 2024 22:54:37 -0700 Message-Id: <8bdc869749177b575025bf69600a4ce591822609.1721713597.git.tony.ambardar@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Update ns_current_pid_tgid.c to use '#include ' and avoid compile error against mips64el/musl libc: In file included from .../prog_tests/ns_current_pid_tgid.c:14: .../include/sys/fcntl.h:1:2: error: #warning redirecting incorrect #include to [-Werror=cpp] 1 | #warning redirecting incorrect #include to | ^~~~~~~ cc1: all warnings being treated as errors Fixes: 09c02d553c49 ("bpf, selftests: Fold test_current_pid_tgid_new_ns into test_progs.") Signed-off-by: Tony Ambardar --- tools/testing/selftests/bpf/prog_tests/ns_current_pid_tgid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/prog_tests/ns_current_pid_tgid.c b/tools/testing/selftests/bpf/prog_tests/ns_current_pid_tgid.c index e72d75d6baa7..c29787e092d6 100644 --- a/tools/testing/selftests/bpf/prog_tests/ns_current_pid_tgid.c +++ b/tools/testing/selftests/bpf/prog_tests/ns_current_pid_tgid.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include "network_helpers.h" #define STACK_SIZE (1024 * 1024) From patchwork Tue Jul 23 05:54:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Ambardar X-Patchwork-Id: 13739337 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B72B413C8F6; Tue, 23 Jul 2024 05:55:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714156; cv=none; b=bR4O8U6IN58f96kOCa0J7ea+HtBExeqs4eXfQbk4FZXZgzy8ZTGHZoT6IWgMUZ2KbEPyNPjU9Y1Qy4VnjqUnq7SkSnHdB8h1KPufTD07zopL1HKeqZwbB8E+OfouobBF9yz0LXvv9j7Tfk9nQBGInQsGZAJQxRNv8GHGPsM79ns= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714156; c=relaxed/simple; bh=AVopjLmg6SFu1C1uyPpuLBVbYdpr2fMsys/diN35S9k=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=bFinMca1+K50H6in4tNLz6cR0vohvKwJMv360DJLcHLUwGz7rWJxLUxCQj3cesJuAXQna/pO9HRS4Ag5COM+6geKNy8s0uMd9neY9uSNxOoBIdIMTi40c9Ouyo7RudlF3AmZD2OZLxFYcIrLqXkKEeE6DZTCtAQiVZuGVtSMS7w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OrB/Q9jf; arc=none smtp.client-ip=209.85.214.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OrB/Q9jf" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1fc4fcbb131so2197015ad.3; Mon, 22 Jul 2024 22:55:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721714154; x=1722318954; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7hDw5eZyspSOvFS9xX81x6DvU6zOqkobsTxzJs34nkg=; b=OrB/Q9jfPixgTR6PZwmg4HTwS74eFY3+HXE+O71PCXI7SLun6Qffv4OVfifUAtWvjQ +xGXIBx3RXlrP/ZyOKfpxv3519Go2gAuPNnYy8mNDgRMReYeAjNTf+Jg/zZqw8PgxJlu /my6v6HX9b46ubCtO3EYF40Az4Gb/VtXkEtwkAgiyfcEbuztHM01D1eD26Mnkszc4aTn Gcv/cr41g6PVAwML4Da0kgJo7GhKBVDxGMCffJSeApB5mmi3m0g6v/NFXlfzl1n+7do4 Cyesqvb7kWsX0QUttu5C01vlijHUH5Czgkn6+W7i2e4ub9mqTqxkHdnJMZ1V8x7+vSQG n/Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721714154; x=1722318954; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7hDw5eZyspSOvFS9xX81x6DvU6zOqkobsTxzJs34nkg=; b=fWXDqwkdaxOQAz4kYJIqcfW+tRR04qqXSThYbudZ6JAY8TbKFwUWHTtA5v/T1/v6Y5 /y60hKTwTmO/89RCjEIHnxUpFSyj98e/meDH4mpgTc1vLyefmaD2y9MuQTWtLERhZi1H mtSzfMRyBqmhUG1p2JROrwpbWy0s79eo3iyAuU9iO6x0wPgz3BrFiFXJMX1wWRZDqvdi fyXkTn9BrU2TPDM07uK0HQ+W0Jx9gQSQjOYR5jknPPXBPRsMFrCVY3LkemvgN2TBAPU9 RusUoUBuCrTQVvzw9hsU7yvejLOXXRQ8NUa5BuSkI31Pvj6sBq+6TkjlzL4UsSsVLIAu soTg== X-Forwarded-Encrypted: i=1; AJvYcCWtLmvvm2V7BX0MIGj/6tRsX5bqbjbv0cT/xcki5uPvtFUn/jnzDgbQoHH7Vvm/ubiYLBhEzSebJHOb8/2iCbPDWs+CslmYLhvPtBQfjWXl X-Gm-Message-State: AOJu0Yw/0cyFde2ulyCeviUPUqWsQVAg+oUpt8Fw6T/8y0cU3kyXw5VJ zC7ALAs3uPPsH1uqN66bVbpdbF5brpGnQIQJQQTNRJ6x5JG2iLyucWaoLyCS X-Google-Smtp-Source: AGHT+IFHgFZ8QWn6QLe64h/dTxnRj2NJ+FoDrX6dtBeiZ+tL/jVib6uKXF8AyRVQ94hktCP/lbRapA== X-Received: by 2002:a17:902:d48f:b0:1f7:3a4:f66f with SMTP id d9443c01a7336-1fd7462125cmr106491395ad.43.1721714154062; Mon, 22 Jul 2024 22:55:54 -0700 (PDT) Received: from localhost.localdomain (69-172-146-21.cable.teksavvy.com. [69.172.146.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f469df5sm65724685ad.254.2024.07.22.22.55.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 22:55:53 -0700 (PDT) From: Tony Ambardar To: bpf@vger.kernel.org Cc: Tony Ambardar , linux-kselftest@vger.kernel.org, Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Yucong Sun , Eric Dumazet , Kuniyuki Iwashima , Jakub Sitnicki , Dave Marchevsky , David Vernet , Carlos Neira , Joanne Koong , Petar Penkov , Willem de Bruijn , Yan Zhai , Vadim Fedorenko , YiFei Zhu Subject: [PATCH bpf-next v1 11/19] selftests/bpf: Fix compiling parse_tcp_hdr_opt.c with musl-libc Date: Mon, 22 Jul 2024 22:54:38 -0700 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The GNU version of 'struct tcphdr', with members 'doff' and 'urg_ptr', is not exposed by musl headers unless _GNU_SOURCE is defined. Add this definition to fix errors seen compiling for mips64el/musl-libc: parse_tcp_hdr_opt.c:18:21: error: 'struct tcphdr' has no member named 'urg_ptr' 18 | .pk6_v6.tcp.urg_ptr = 123, | ^~~~~~~ parse_tcp_hdr_opt.c:19:21: error: 'struct tcphdr' has no member named 'doff' 19 | .pk6_v6.tcp.doff = 9, /* 16 bytes of options */ | ^~~~ Fixes: cfa7b011894d ("selftests/bpf: tests for using dynptrs to parse skb and xdp buffers") Signed-off-by: Tony Ambardar --- tools/testing/selftests/bpf/prog_tests/parse_tcp_hdr_opt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/bpf/prog_tests/parse_tcp_hdr_opt.c b/tools/testing/selftests/bpf/prog_tests/parse_tcp_hdr_opt.c index daa952711d8f..e9c07d561ded 100644 --- a/tools/testing/selftests/bpf/prog_tests/parse_tcp_hdr_opt.c +++ b/tools/testing/selftests/bpf/prog_tests/parse_tcp_hdr_opt.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 +#define _GNU_SOURCE #include #include #include "test_parse_tcp_hdr_opt.skel.h" From patchwork Tue Jul 23 05:54:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Ambardar X-Patchwork-Id: 13739338 Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 29FE713C8F6; Tue, 23 Jul 2024 05:55:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714159; cv=none; b=jFfz8qDVRzjs/4FNUAtsARFCG1WTUg2V8HCBP8bKPcPmnh6jSVQ4FUTJRjUQ7GJ3PMPlmAjsb7sgONHG/uqo2E6epuxYnToT3u2FHWfb5O0NSdeBwx6kfJ+snhiZsHYT+ykeQYtgLL9R5Pvwz3JFtSDWhkirhcZa/msQ6L0BwOY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714159; c=relaxed/simple; bh=EW2DH4rw9P1hXyVvvpPlJUkXeYjfh/hVonUvD+qOedc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pDRDsWqmR7dC2vJE1YmyY8f+ODxXPPUWrEOx78wKfWG+1DOa3Voprst5x8Y1vMSqZLGhCaeyB2KPdTw+p59+8GqdL8RrrXVwWFxxoLr7osgelcr31QKk0cO2GfJWO7eq2nz2s2b+gPjAwscF/bmDpM4/9H8IHPnN3e77rHWKspE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=m+dY1tq0; arc=none smtp.client-ip=209.85.214.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="m+dY1tq0" Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1fd78c165eeso22262105ad.2; Mon, 22 Jul 2024 22:55:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721714156; x=1722318956; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YirOn/8mFg8+FfZ2hOYhsi5cWrkxZXezo6GXBJXTZ74=; b=m+dY1tq09ZXNbFAOWt6ErtqyHuzvoA2guvRQVvJ66/U3qJc2uxumXeIek6LPLqBs1I BxniZzgQt4+zjfibgMK5nbBoNFWh6INymRWvx+gs9NYMSLL3P73d6lFVQ0i1vDvlvECN KuYWeaQY+cyheYgSqqJvTYhKF/eonqY41hCVwyP/hXmdLmReH80QjWLFNtBcFatwHmZ4 8tm/yEwYgliEeT1u1U5Sj0vSwxNWhlJZK/uACu/oiRVgVi9FykrkO9MuuUEYRAWuMA3c fNfMWNbfjPkchLbnBNEsr2qVv1F4XcDFjbV7m9Qi6uhzcPB6BYqy5PoZszxbvk0nxZ8x Ot4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721714156; x=1722318956; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YirOn/8mFg8+FfZ2hOYhsi5cWrkxZXezo6GXBJXTZ74=; b=j01RoLkG8I9nzVdEEZyGhTuSsKTLjLRbuXWrL717EbcMwxL/ZHrocZEEcQzw52qiWH bSGqdG+LUnTIVBMTwT0TxiM73FW11LPvIQCBbVmMBtrZN1yqe+C+YYCGCXxZouCXiH/t MF6U6TYPF25mQVld1494UIaYfXqI2mv6QPClzcLMVf73zmw/gdkvIR38wEAHxP2m62Oj kUzW/sRR/Tgo+on7r4QV8FBpUr76N/0DDQ2pGWuDLRNY2jytS6cmJRzail7zKe3ILM+n ABCeRjdYQtj+9orodUHbntJWdIrFc0lcao6/UDTxCye1OiqTpTiDwjCJCQ3w9eCnfgjF RR0g== X-Forwarded-Encrypted: i=1; AJvYcCXjftLHJs49bP+Rf4zYkU5bnx7NVVNZ/LywCSUKCV6o2HvWvglBLvvnzQ53j7XjbwpyxOXRZpMJJCTnSbJaRxFiQWQwTL4uq8G64nmYYZIq X-Gm-Message-State: AOJu0YwAY1jLEt6gTL9VxE+Ex5pO4MocmDYeLdu6nDsPTmi99WqGK3Qb vscZZi+oFFXdNERDyx4BvjiSb9xOs2DLcdmwOjWis6DvsO68igwZ8IcuQMUM X-Google-Smtp-Source: AGHT+IF/wOchNpLDLP7DZxvjifw6FX4fgfsE+7tuSFDwBofr+9g2xk0Zi0ykAaKXdiAJ+uaQq74zwA== X-Received: by 2002:a17:903:2444:b0:1fc:a869:7fb7 with SMTP id d9443c01a7336-1fd746230d6mr82224645ad.54.1721714155963; Mon, 22 Jul 2024 22:55:55 -0700 (PDT) Received: from localhost.localdomain (69-172-146-21.cable.teksavvy.com. [69.172.146.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f469df5sm65724685ad.254.2024.07.22.22.55.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 22:55:55 -0700 (PDT) From: Tony Ambardar To: bpf@vger.kernel.org Cc: Tony Ambardar , linux-kselftest@vger.kernel.org, Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Yucong Sun , Eric Dumazet , Kuniyuki Iwashima , Jakub Sitnicki , Dave Marchevsky , David Vernet , Carlos Neira , Joanne Koong , Petar Penkov , Willem de Bruijn , Yan Zhai , Vadim Fedorenko , YiFei Zhu Subject: [PATCH bpf-next v1 12/19] selftests/bpf: Fix compiling kfree_skb.c with musl-libc Date: Mon, 22 Jul 2024 22:54:39 -0700 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The GNU version of 'struct tcphdr' with member 'doff' is not exposed by musl headers unless _GNU_SOURCE is defined. Add this definition to fix errors seen compiling for mips64el/musl-libc: In file included from kfree_skb.c:2: kfree_skb.c: In function 'on_sample': kfree_skb.c:45:30: error: 'struct tcphdr' has no member named 'doff' 45 | if (CHECK(pkt_v6->tcp.doff != 5, "check_tcp", | ^ Fixes: 580d656d80cf ("selftests/bpf: Add kfree_skb raw_tp test") Signed-off-by: Tony Ambardar --- tools/testing/selftests/bpf/prog_tests/kfree_skb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/bpf/prog_tests/kfree_skb.c b/tools/testing/selftests/bpf/prog_tests/kfree_skb.c index c07991544a78..34f8822fd221 100644 --- a/tools/testing/selftests/bpf/prog_tests/kfree_skb.c +++ b/tools/testing/selftests/bpf/prog_tests/kfree_skb.c @@ -1,4 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 +#define _GNU_SOURCE #include #include #include "kfree_skb.skel.h" From patchwork Tue Jul 23 05:54:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Ambardar X-Patchwork-Id: 13739339 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD89A13D51E; Tue, 23 Jul 2024 05:55:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714160; cv=none; b=AckN2WuRIuV7bT8oNlvqLT3sGW5SvxZe/2pwgBPHQmsrdHFWUlwgpSTdzsQRBttPvUMPatEjjPgIYGFM9WdrCxoxIxsCT1QCX9KObL4unPmg57Sg3mIeqYjXKLR5oDrJKZTCUSUtdiW1GME6NmOxi1xEvm1NKsRSMMrsMqPOFv8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714160; c=relaxed/simple; bh=rzpAkWSl5AYTNo9BzM6c08+Hn9TZeOu3CEalFMyrm94=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lblSWabmrhb3FnUViuQicvx+1CHDISH0QQFtSCT7ezIyST9NDc/cUdg/vRWJcrK0h1937tuDFLVBd0IkAABNrR4zs7YIA5yySb3+wyYE0b5UhJB1uG6FC7qhyBVp9uqbNWUzXb05V1kgh8y+1LGEHeEAQtVQHzvUfhRqDaUrUOE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=fX5LozTo; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fX5LozTo" Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1fc52394c92so3331855ad.1; Mon, 22 Jul 2024 22:55:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721714158; x=1722318958; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cLx6FsJEB2phPDA8VzOWtEpxZG5nvW0tizstBQr3l3g=; b=fX5LozToTVxmJrm+X3parRR3nVpJ/nNTQSshlLlTUnq1FQv6eKe8srfPpBKp2JV2B+ RQYQu4hQrVdKtsekYg6dL6UO3g25zezdCjyhLLzzz0RHyMZt5dAzsupykFz3MamG/h1T So6/BdfCxH1ak0d614rR0kHW+x+7/eTlokJBe2/PkQ2AxSz5BsSWQtd6b8rL1J6yufWI h6QmDlmRdSTCxjSXPQ10Ax+S3/LDdgxoQPbrweurqj1j265AkxhcUdU17ZfHn/H2GvRQ wybZ2hJsk8DOIuTMFhuoWV6eTaowMPtHud6xN1FTvFuPOk8LeNIkyVvXNSulkIIM164n EynQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721714158; x=1722318958; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cLx6FsJEB2phPDA8VzOWtEpxZG5nvW0tizstBQr3l3g=; b=FsZOMf3v/JBbYacQJwE/vgUFEfDzAlG5o4FjIfB1/e//Xs1syPkLPaRHh457Insr+F ndTljRIKd4OIR/j0zb5vDP5Bv1u0Ove6lzjOyjGOSe6f2nsPtbAQ3AcByZ+2UvFoz7si Ai7iPxG8/YewsQh7Zt5WDoPof07xsikaZgZpGvn3iszFBRDLN2odPxkSJXvEjGSFHe3/ G0Kz4S9TpFJ+STGccFFPq1h9dV8jgkl1dFYF37gsu0gfTxgj5jgLqMWqiuNNovcuqg1C KZC3uq8PXiGxOkKHTS21zCzkgO6OdHzwce8Ot9UhdDwuY/Vf9bdq5v55MRyVrANzWXlF VyFw== X-Forwarded-Encrypted: i=1; AJvYcCUgcA+9hxWuJK23M2NiMMOMbTgGr8thta/3ji168TCAWpuOIt4kHLti9Ndu9xOOEUadA94yjc+AkCkUhddq6rCMaTrQXYSfKwoU9kR77hP5 X-Gm-Message-State: AOJu0YxB33KrTzzo+xizZdC0m5uGlgYuFZOHI1yxEB9jZ7zj5HMZ1nqR 7JmfJHgRxYz6sLQ7u7e9kU5ab7yVSEwjm24O0dKeV8NUC7nE/F5EG0+JeQsw X-Google-Smtp-Source: AGHT+IFnHSYRynMiH0QWiwfM5aMmqoo+7FoZwTUPCVdERQZfI6Kt9/c6GYPILiaefY9bCk/MIVKCNA== X-Received: by 2002:a17:902:da91:b0:1fb:7e13:a7c5 with SMTP id d9443c01a7336-1fdb5feedfbmr13289915ad.45.1721714157916; Mon, 22 Jul 2024 22:55:57 -0700 (PDT) Received: from localhost.localdomain (69-172-146-21.cable.teksavvy.com. [69.172.146.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f469df5sm65724685ad.254.2024.07.22.22.55.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 22:55:57 -0700 (PDT) From: Tony Ambardar To: bpf@vger.kernel.org Cc: Tony Ambardar , linux-kselftest@vger.kernel.org, Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Yucong Sun , Eric Dumazet , Kuniyuki Iwashima , Jakub Sitnicki , Dave Marchevsky , David Vernet , Carlos Neira , Joanne Koong , Petar Penkov , Willem de Bruijn , Yan Zhai , Vadim Fedorenko , YiFei Zhu Subject: [PATCH bpf-next v1 13/19] selftests/bpf: Fix compiling flow_dissector.c with musl-libc Date: Mon, 22 Jul 2024 22:54:40 -0700 Message-Id: <8f7ab21a73f678f9cebd32b26c444a686e57414d.1721713597.git.tony.ambardar@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The GNU version of 'struct tcphdr' has members 'doff', 'source' and 'dest', which are not exposed by musl libc headers unless _GNU_SOURCE is defined. Add this definition to fix errors seen compiling for mips64el/musl-libc: flow_dissector.c:118:30: error: 'struct tcphdr' has no member named 'doff' 118 | .tcp.doff = 5, | ^~~~ flow_dissector.c:119:30: error: 'struct tcphdr' has no member named 'source' 119 | .tcp.source = 80, | ^~~~~~ flow_dissector.c:120:30: error: 'struct tcphdr' has no member named 'dest' 120 | .tcp.dest = 8080, | ^~~~ Fixes: ae173a915785 ("selftests/bpf: support BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG") Signed-off-by: Tony Ambardar --- tools/testing/selftests/bpf/prog_tests/flow_dissector.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/bpf/prog_tests/flow_dissector.c b/tools/testing/selftests/bpf/prog_tests/flow_dissector.c index 9625e6d21791..3171047414a7 100644 --- a/tools/testing/selftests/bpf/prog_tests/flow_dissector.c +++ b/tools/testing/selftests/bpf/prog_tests/flow_dissector.c @@ -1,4 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 +#define _GNU_SOURCE #include #include #include From patchwork Tue Jul 23 05:54:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Ambardar X-Patchwork-Id: 13739340 Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CD9E13D538; Tue, 23 Jul 2024 05:56:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714162; cv=none; b=X50wb65i3p+YNA3qL/jDe7Qt/JeKJIbw/VylJcygbZ5G3f5ulqMwlJ6OqzJvMnG4jdQPpb7CwqSy3yYQn4GDkPHcCF1V/awzvvGNRJqn9vX0BGpXPEefWLOZWsYYlbqvIKd3KR14/kqdt5x3qalK50ep2ErvG9f5OnX0W3UC/b4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714162; c=relaxed/simple; bh=DCYr8+TNLq880CaFvxJA3qBBgZNRmV5ZkEVnxPOYp0s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=f1iWul1HRRYFc4OywSKkCdtSymu5t5WraxFOy4RgEalzLaiyl6IJnHlHSEYX04kI2NYCsRDnOWkPZxFeszY4mD/zsVZTJiB/ecVPGRbXp8BzQp3LFZry5Z8uSIiqBG/YfE/4WeTqeFW55+ajGbG0tbNueidblQEPJWsR5Xr3fCM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gqqaTRbl; arc=none smtp.client-ip=209.85.215.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gqqaTRbl" Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-6e7b121be30so197956a12.1; Mon, 22 Jul 2024 22:56:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721714160; x=1722318960; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CG0y/r8wSyWzN+dbWbXqoKJWdEZ0lVRyZSwfEfFYx+U=; b=gqqaTRblCfRx8SXaphPiu3jn8dylghFXlAxL3Iv/H01T9Opayf6bLjC+6o1nQ+nEFI FQpaxh2qachQg9oDFdckJuXlacdgN8aIN0JQcmqVkkexERi/e2nwIORsBh4PJZ0sx1Dl hmHRqDbYv1E18drIzpOjv/BMyU17nxUZXCH7M9u/3BN04JKvkWjQDjXGe46zo0AdsyD2 2sCOF9UiWm6/KE65+T4GW/+x5YZ1XLiVKBl4SfVoO2mnOF2kO8t2ToSOdPTAhu+9sS9A xKBTgZhMMoMKdqMIUuSgI3oPunadP6Hd0PJVdKqOek04w1toom3ZO4+8w1eCs1yfa+hX MT0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721714160; x=1722318960; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CG0y/r8wSyWzN+dbWbXqoKJWdEZ0lVRyZSwfEfFYx+U=; b=VngQpo+Qfmoyp38qqOWj9Xgq+KOhA8OcTte+QL10+n7d+oJhciI9aN0/3s43vH55Ss 0eD0cP7KNlOQeb0/OUHO67R+hTbGoeKKdpLBYo8x4aAL1pnbxJfVKz48gO/LWyEAtRAF P9lFmz4mh5UviE5q+dRULlQDR85a40TqbO3LBT41Yfq2jY7Z+DCOvxcBSVX4ShwhOJLU B4yzFRbY4vHr8M8qCpRP29XSW2t+AVEou3B61tPKQlJ8QWst5Fc7tfoVzxVF+TNCzCCL byWu/C0hfr3PJ+1biIcbteMdzL7vL/QL2M17leXpUUBy4jURmaRGggWfQiMEHqecMZ3N 7u6Q== X-Forwarded-Encrypted: i=1; AJvYcCW0HluJ8JX5QwK63AjFDCglbASCZ7X3PAwx5tIzRMFUkdTpTY1UwVKHof2OdHEvePj4Y1eugKJ21XpGA2MVcCMTVudP+XOrfDRhxw746SMH X-Gm-Message-State: AOJu0Yxr28uvd8VnD4t0YIT/RBEfrzJ4lx2sFz8ev5Bh7/2VD++lLbnw r6j7FzPDrBVwibuKIshfqRxTniZL5wK3FEgQ04nJ8TFlXqMK/0OTdZsZTXf6 X-Google-Smtp-Source: AGHT+IECsm7+ewOr3xHp/9+mJUR810Oo7BHaMqWkkiTHb9+LItqvKhSRLUm1vOqr2ZngWAy2Yf06VQ== X-Received: by 2002:a05:6a21:710a:b0:1c2:8d30:accf with SMTP id adf61e73a8af0-1c42858ec27mr6559712637.19.1721714160109; Mon, 22 Jul 2024 22:56:00 -0700 (PDT) Received: from localhost.localdomain (69-172-146-21.cable.teksavvy.com. [69.172.146.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f469df5sm65724685ad.254.2024.07.22.22.55.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 22:55:59 -0700 (PDT) From: Tony Ambardar To: bpf@vger.kernel.org Cc: Tony Ambardar , linux-kselftest@vger.kernel.org, Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Yucong Sun , Eric Dumazet , Kuniyuki Iwashima , Jakub Sitnicki , Dave Marchevsky , David Vernet , Carlos Neira , Joanne Koong , Petar Penkov , Willem de Bruijn , Yan Zhai , Vadim Fedorenko , YiFei Zhu Subject: [PATCH bpf-next v1 14/19] selftests/bpf: Fix compiling tcp_rtt.c with musl-libc Date: Mon, 22 Jul 2024 22:54:41 -0700 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The GNU version of 'struct tcp_info' in 'netinet/tcp.h' is not exposed by musl headers unless _GNU_SOURCE is defined. Add this definition to fix errors seen compiling for mips64el/musl-libc: tcp_rtt.c: In function 'wait_for_ack': tcp_rtt.c:24:25: error: storage size of 'info' isn't known 24 | struct tcp_info info; | ^~~~ tcp_rtt.c:24:25: error: unused variable 'info' [-Werror=unused-variable] cc1: all warnings being treated as errors Fixes: 1f4f80fed217 ("selftests/bpf: test_progs: convert test_tcp_rtt") Signed-off-by: Tony Ambardar --- tools/testing/selftests/bpf/prog_tests/tcp_rtt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c b/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c index f2b99d95d916..c38784c1c066 100644 --- a/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c +++ b/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c @@ -1,4 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 +#define _GNU_SOURCE #include #include "cgroup_helpers.h" #include "network_helpers.h" From patchwork Tue Jul 23 05:54:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Ambardar X-Patchwork-Id: 13739341 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5842513D538; Tue, 23 Jul 2024 05:56:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714164; cv=none; b=sI+v1S9fzf6pvdvQ6ni9bWX+QiXXKgZl0BN19Xh0+dwya86NbgjZtnIuoyUDpP8xS+Lc/KXi1mA98fnD6yDXKQKCp00mscs0jAqcBqIOwV84JzPJbGoi0ioMQqzPRyPrMD04JLGGyTT3SKOE76GaWQhvXys8Ov/SbrUCBAfty5w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714164; c=relaxed/simple; bh=PEm7/5+4mqPKqerOKkFbUuEAWS2RUAn2jW2HlBO/l8o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gMFI6pCnQITSLEl4xuB0ohOyIw5icsTEiJUUKXEYWA1Z5ENFOMPD4oXHL3K6O4xy+/TKkAigc0k23FdnImNX3wiWFq7aEDrkD1yQ8Eloym4BuZyx/TTnXaC3eO8sZXNsKixFlnBwO+54fBKeSFm1bRlImbb1QI88zMkBld0Xxzc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=FBvXf343; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FBvXf343" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1fb3b7d0d3aso1641535ad.2; Mon, 22 Jul 2024 22:56:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721714162; x=1722318962; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=enQn2il/q/jEk1kd4P2wJtha1mIWED0XiYGsCh0GBbw=; b=FBvXf343V12BTONXQTf1Svumoy8JE3yFJ05vaefFenke7mNlr96EwuUR9m6pbQWEUs zD1Y8+HaIy/eVXskBa39ybvp/kqZVXk52o0dwp4G0V6Aof+PZDYGmDdPZh6LALARAq95 zybreqJptgWHCOxg/Tt6u+gD8KciuUVv0KULX1q596k52L9ShZQfS6Y04APCZrJIzK1o WyiD8TFQ3Fy4AXr2ySUpVx7knDD0zfCNaVhqLp6l6FeLgZNR6w4xx3gDe9Y4/AsSuWch an1JEl/UlEPiX4063lltnoKCSET5jvaWbzSNJtL+CkB2LJurIl1gXMI2EVdV+korNG6H g2bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721714162; x=1722318962; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=enQn2il/q/jEk1kd4P2wJtha1mIWED0XiYGsCh0GBbw=; b=BW9YJs1dGAT53w0N+pbrAU75LMTDWejAtzZ2vjcu3XQYHRcjjDsvrReek7N1ubW3R2 q7e6dYo1p/tyiGozMnSuTpSkykBoZ1zQt1DrAevhjD/Cf4dFeQSXhJY/7SaABDgfl6TK IJn3F8qoAM3q623JWGn0V9H5ZBLnG2eunvd5t8evLsJH9LyMRtb72Qv4xPjmS9/4m0N3 td7OunpKBBdJTDqzz7hioMzN3WjtDSGa2SIPymPlRL7QYGxYMjN6lwZqVwj5Kg7T+nHn 4HpZnbS52At9SaPUOMab9+uI5ZXDdJp9RCcOFiWe4canWhdKgNBi65RrPfN/Ig+0KJTz gvGw== X-Forwarded-Encrypted: i=1; AJvYcCUCeoKVT7+96zHodsYFbGEiq5TrbTSv2uC8U/j8HcbhN36y+SajlsxUapDhdFnZRGdIoPY2y4vt1QXfEGWjzD32joHzm8+PAVeTHO+s2wrF X-Gm-Message-State: AOJu0YwUoEEOVnPd4Rv0plmnFuCY0cZ2th/EkiAl69MIBqpne+u+P3HE KDg9fre763QTO8yms9q130uN9EzVwHL5iyc1T43KGQx2EjVnkm8XcVgC1Kda X-Google-Smtp-Source: AGHT+IFkt6KxaWnQEzpKj1LsldI+1aAW9WIGIWZth1nj7k40+kpKUYibE7dYdXKTHUmq0E06BXSB1g== X-Received: by 2002:a17:902:d48f:b0:1fb:3b89:b130 with SMTP id d9443c01a7336-1fd74552854mr91174305ad.19.1721714162524; Mon, 22 Jul 2024 22:56:02 -0700 (PDT) Received: from localhost.localdomain (69-172-146-21.cable.teksavvy.com. [69.172.146.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f469df5sm65724685ad.254.2024.07.22.22.56.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 22:56:02 -0700 (PDT) From: Tony Ambardar To: bpf@vger.kernel.org Cc: Tony Ambardar , linux-kselftest@vger.kernel.org, Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Yucong Sun , Eric Dumazet , Kuniyuki Iwashima , Jakub Sitnicki , Dave Marchevsky , David Vernet , Carlos Neira , Joanne Koong , Petar Penkov , Willem de Bruijn , Yan Zhai , Vadim Fedorenko , YiFei Zhu Subject: [PATCH bpf-next v1 15/19] selftests/bpf: Fix compiling core_reloc.c with musl-libc Date: Mon, 22 Jul 2024 22:54:42 -0700 Message-Id: <11c3af75a7eb6bcb7ad9acfae6a6f470c572eb82.1721713597.git.tony.ambardar@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The type 'loff_t' is a GNU extension and not exposed by the musl 'fcntl.h' header unless _GNU_SOURCE is defined. Add this definition to fix errors seen compiling for mips64el/musl-libc: In file included from tools/testing/selftests/bpf/prog_tests/core_reloc.c:4: ./bpf_testmod/bpf_testmod.h:10:9: error: unknown type name 'loff_t' 10 | loff_t off; | ^~~~~~ ./bpf_testmod/bpf_testmod.h:16:9: error: unknown type name 'loff_t' 16 | loff_t off; | ^~~~~~ Fixes: 6bcd39d366b6 ("selftests/bpf: Add CO-RE relocs selftest relying on kernel module BTF") Signed-off-by: Tony Ambardar --- tools/testing/selftests/bpf/prog_tests/core_reloc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/bpf/prog_tests/core_reloc.c b/tools/testing/selftests/bpf/prog_tests/core_reloc.c index 47f42e680105..26019313e1fc 100644 --- a/tools/testing/selftests/bpf/prog_tests/core_reloc.c +++ b/tools/testing/selftests/bpf/prog_tests/core_reloc.c @@ -1,4 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 +#define _GNU_SOURCE #include #include "progs/core_reloc_types.h" #include "bpf_testmod/bpf_testmod.h" From patchwork Tue Jul 23 05:54:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Ambardar X-Patchwork-Id: 13739342 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BD3C13D538; Tue, 23 Jul 2024 05:56:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714167; cv=none; b=rrJApyCq8aFWG8AdXEgVDcyUPVSADHYulQRNclkXuYFU0FP/RLjyGiPMDJTek7gEtJ4CX+ttzsN7gYiHad7p4f0mQ6zkxdkOcoqdzROV3WalxDxo8B3h6TzeqA0rk51OP869m6Tn2D9OCbCZvqcYJEDlZGgt7CW4F2MoLUCfvkM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714167; c=relaxed/simple; bh=iyYPpn+hXqyZjmPQO9B6qx+fPPrlP1Ik7gugpemYUw0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=TSuQ4nmShKJAzghU2pjkzVG6oyetveGear+xavs9vrKOpsJ1mLFSJ3LP/3T6YQf68sgY64HgKAeJFF/mbsp0619L3/YoTBXkjY5wMjBtVeVZ8tgZ679/FvrwgVxcSnCy4MuIKDF8ZO1Ddk5DF7Z+OFVKi8BdCEu6ga64oUf/4lo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=iPzwlvAW; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iPzwlvAW" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1fc5239faebso2168345ad.1; Mon, 22 Jul 2024 22:56:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721714165; x=1722318965; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=y7Poq16VwrjI6K5TQu0XyFE0O+HO7fJqUE55lzfibYQ=; b=iPzwlvAWkYBp/8Zk8zaoDa6MJIvImZI46SyLbsmJqH13DX/ty5BLJXBtuyhd6hzJVf fJPEZ5g9SDkPlY/+o8yOpZpnd/qjLEbBQOEah0seyoRP/C9zC8i9oJyVtJpLT30FpgNU IxVuKGia+SlvusxqISTo8UHRP7CetOytwTbfv19uGkxWy5Ssb6HIpaRDlPZsXmUJV42c oyiHEyvi3fwrL6dlfmipjI0xJMq7BPoj+4XSREAqSG4mgzAmngNrL+8IXliaYf22mYBL IizNbIKcu5D+D/A6b//bEZopKNRXyswAMI9oCL5y4GPWhFfkBJV5/yqwTWxEBeE43Cr4 dqfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721714165; x=1722318965; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y7Poq16VwrjI6K5TQu0XyFE0O+HO7fJqUE55lzfibYQ=; b=bSuuLMKKb69ME/bw8trg7jkSckqj6aDBKhOd4RalkdAtRZGbQc+6ZMaNRo9XjPyaHQ GcFah2EhLXeGEVq5t1boBK0ys3M9CyFppocRQmy7zzoeMePALj6v+h+VjcLjBmFpIeZb F5uq2glYaLM2DD2modJ9T5IECAH5c5BvmMCeGUaZScGYeYhXzazQjyYzqwgkwHf9MDSS khEeTVuhfdADFe4jwPFHFioRmPTpeR2t5u5Im6UEQW8db6pkM1YA6UKzuZpcdyPy9TKo OYmrroMJFtqtTZ94shNSLDJmUqWBvAZfKQT+ZCpO4ZOD908WKMgNO88vqNMb+2aIEHUe Hm7Q== X-Forwarded-Encrypted: i=1; AJvYcCU2v3k/7hnzeKwXGcbiXo58XuMoyTYIy28jYaAJsFG+wZaEQSBMzuXmHmwpooYFyVenNadhd47h6u30AJxxDHGCOvRFXncxHV8MhWSSj30Z X-Gm-Message-State: AOJu0YxBr8/fiHc8jx2Ee1R/Szrzg3pW37dBPui2pnSMNin8P5dNyRS2 mp4N5iIh1M1az/J+siOKyXkyZ5ABs5/GiDIgX2nNYI6VaZDBux5tE3Hot9j0 X-Google-Smtp-Source: AGHT+IHX8nDGUYAR1rrFPblUOqoY6qc03OpITbzbp6hgcUAkvpDy51TQ2F6RLswuRwt2fqOMih3QLw== X-Received: by 2002:a17:903:22cb:b0:1fa:a89:fd1a with SMTP id d9443c01a7336-1fd7452553dmr65970615ad.10.1721714164941; Mon, 22 Jul 2024 22:56:04 -0700 (PDT) Received: from localhost.localdomain (69-172-146-21.cable.teksavvy.com. [69.172.146.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f469df5sm65724685ad.254.2024.07.22.22.56.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 22:56:04 -0700 (PDT) From: Tony Ambardar To: bpf@vger.kernel.org Cc: Tony Ambardar , linux-kselftest@vger.kernel.org, Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Yucong Sun , Eric Dumazet , Kuniyuki Iwashima , Jakub Sitnicki , Dave Marchevsky , David Vernet , Carlos Neira , Joanne Koong , Petar Penkov , Willem de Bruijn , Yan Zhai , Vadim Fedorenko , YiFei Zhu Subject: [PATCH bpf-next v1 16/19] selftests/bpf: Fix errors compiling lwt_redirect.c with musl libc Date: Mon, 22 Jul 2024 22:54:43 -0700 Message-Id: <3869dda876d5206d2f8d4dd67331c739ceb0c7f8.1721713597.git.tony.ambardar@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Remove a redundant include of '' which is already provided in 'lwt_helpers.h'. This avoids errors seen compiling for mips64el/musl-libc: In file included from .../arpa/inet.h:9, from lwt_redirect.c:51: .../netinet/in.h:23:8: error: redefinition of 'struct in6_addr' 23 | struct in6_addr { | ^~~~~~~~ In file included from .../linux/icmp.h:24, from lwt_redirect.c:50: .../linux/in6.h:33:8: note: originally defined here 33 | struct in6_addr { | ^~~~~~~~ .../netinet/in.h:34:8: error: redefinition of 'struct sockaddr_in6' 34 | struct sockaddr_in6 { | ^~~~~~~~~~~~ .../linux/in6.h:50:8: note: originally defined here 50 | struct sockaddr_in6 { | ^~~~~~~~~~~~ .../netinet/in.h:42:8: error: redefinition of 'struct ipv6_mreq' 42 | struct ipv6_mreq { | ^~~~~~~~~ .../linux/in6.h:60:8: note: originally defined here 60 | struct ipv6_mreq { | ^~~~~~~~~ Fixes: 43a7c3ef8a15 ("selftests/bpf: Add lwt_xmit tests for BPF_REDIRECT") Signed-off-by: Tony Ambardar --- tools/testing/selftests/bpf/prog_tests/lwt_redirect.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/bpf/prog_tests/lwt_redirect.c b/tools/testing/selftests/bpf/prog_tests/lwt_redirect.c index 835a1d756c16..b6e8d822e8e9 100644 --- a/tools/testing/selftests/bpf/prog_tests/lwt_redirect.c +++ b/tools/testing/selftests/bpf/prog_tests/lwt_redirect.c @@ -47,7 +47,6 @@ #include #include #include -#include #include #include #include From patchwork Tue Jul 23 05:54:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Ambardar X-Patchwork-Id: 13739343 Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC31113DDA7; Tue, 23 Jul 2024 05:56:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714169; cv=none; b=f0Wt4ZnSnD+5zyQc5TsNPROdZETqq+YAzANE0Y/g7Wtqjd1bpGXe5bOdt/AcWMgY6oe/kUHMWnNfPmPsiXaZtFhd6ASuHqWR17HhyM3mhjbnpaHryR0FUaBE/KTKdxqRaymZb1e2s/0IWw/7GWJBuO/m9ZbstW81AzkVujmXXIA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714169; c=relaxed/simple; bh=C0twfGdyjqX+3sEKcMBFDTvhBmdMfU8+ZG5M4jF0S6s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rNnxgYMdo/C6C82LirsJHlt4kyxRtm2R9i+aGugYGXiaZYBe1R7yAFNOV+5Yb/tfYctUtySNbPHsfCejMW3c8WOYzdBZmDLX5UaldQfJYK7akGvsXPfbRQDGvm8M415Lx5m9XWcmeYMzjSX+1utdIQ9prO+yo1D314e+5k5Lw0c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=NvtKGHrA; arc=none smtp.client-ip=209.85.215.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NvtKGHrA" Received: by mail-pg1-f177.google.com with SMTP id 41be03b00d2f7-76cb5b6b3e4so200756a12.1; Mon, 22 Jul 2024 22:56:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721714167; x=1722318967; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+BohHnOX/Z4iOxB/wHzdyab75r3qCJZwCLvXmoeSZNA=; b=NvtKGHrA9RbrLIWIM4F7xGBGvlUVyDKkmGyr0UHIcMtXACmGfbi0xhEdQyHMj2k7cl zalscKtcZi+NrVx4HCF8QwkYg1YUODWugjrXvIERACHrs8+3P7n9BiMjJuq5/acZL3I4 N1PGfuu0n8Qfy42uqei3z/IioRqdHCuTfThXBixkydN/QgC5A8oMpAbQ3Y9JWL3Z7iwj B160s0Oc4ZXa1UQ+nqVHTn+Ryw8SvRD6awvNXzpPoPatX27WbgYNe52BtHw84Owdca75 aPzjaBRfK3SNEp8GdjO0LNiIGY+nlImN8Tw1lKAnqVGfCqzTVz4GH8RU1yQoSG44nZSj 1jxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721714167; x=1722318967; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+BohHnOX/Z4iOxB/wHzdyab75r3qCJZwCLvXmoeSZNA=; b=LFZ/tYrPzEN3c12hBS0xCrLk8gktxmR69PwlVRaoiYJoKIM6ydFE1sYj3mMu0mm/CY yDLAazl06KSJENO1LS9ybhNpOZVVlei/1sXEnwIVM7adWrZpZ6TB47DJJ4685BWIJxb0 wOZcDG26OkKtcEudjWyI9wdawL5JFP2jKBzpAzjGCx9quA75qr39+GU1zwvYiGqh/siE cdSJ332YQ96flPl1X/SFZ+TzCWKuspGzCls/Y9f4H0x49ae5o8X7WTdpN4g7ZAztqJvT 8wzyXMl7IoW6KPpFEC4XB0FBQtwYm/oeDqOo5PAeFHvny1ro9W+VITYuF+uF9wcqTrkf 56rA== X-Forwarded-Encrypted: i=1; AJvYcCVcdoxQV6VpHKs0OHsZDBp52IDwfBROqhZLLK/XjLGKUDkcAHXaOWAsDewecxTxFhwSq0YJ+UInCG8c54ytTX0Dcmat2EMY3uODufXMCKB+ X-Gm-Message-State: AOJu0YxsRS6vAQV5NnSjNsGiHk+aGeehzpwWSX1lhyyxcVWfHUhqc/Qc 1Iu8+LzxE5v4AD4CO6TcnLAx+dxZYphf0Ym+2+Fxp41lobQXgw0z8qnGAFUD X-Google-Smtp-Source: AGHT+IEqo8YfSVOJTpDNsKy7OYxeevmwG+LbdoA0/rJc2X2efK5tqDzjFZ9YL7WUniC21IW74OkHgA== X-Received: by 2002:a05:6a20:72aa:b0:1c1:61a9:de5a with SMTP id adf61e73a8af0-1c422914c69mr9633907637.32.1721714167028; Mon, 22 Jul 2024 22:56:07 -0700 (PDT) Received: from localhost.localdomain (69-172-146-21.cable.teksavvy.com. [69.172.146.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f469df5sm65724685ad.254.2024.07.22.22.56.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 22:56:06 -0700 (PDT) From: Tony Ambardar To: bpf@vger.kernel.org Cc: Tony Ambardar , linux-kselftest@vger.kernel.org, Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Yucong Sun , Eric Dumazet , Kuniyuki Iwashima , Jakub Sitnicki , Dave Marchevsky , David Vernet , Carlos Neira , Joanne Koong , Petar Penkov , Willem de Bruijn , Yan Zhai , Vadim Fedorenko , YiFei Zhu Subject: [PATCH bpf-next v1 17/19] selftests/bpf: Fix errors compiling decap_sanity.c with musl libc Date: Mon, 22 Jul 2024 22:54:44 -0700 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Remove a redundant include of '', whose needed definitions are already provided by 'test_progs.h'. This avoids errors seen compiling for mips64el/musl-libc: In file included from .../arpa/inet.h:9, from ./test_progs.h:17, from prog_tests/decap_sanity.c:9: .../netinet/in.h:23:8: error: redefinition of 'struct in6_addr' 23 | struct in6_addr { | ^~~~~~~~ In file included from decap_sanity.c:7: .../linux/in6.h:33:8: note: originally defined here 33 | struct in6_addr { | ^~~~~~~~ .../netinet/in.h:34:8: error: redefinition of 'struct sockaddr_in6' 34 | struct sockaddr_in6 { | ^~~~~~~~~~~~ .../linux/in6.h:50:8: note: originally defined here 50 | struct sockaddr_in6 { | ^~~~~~~~~~~~ .../netinet/in.h:42:8: error: redefinition of 'struct ipv6_mreq' 42 | struct ipv6_mreq { | ^~~~~~~~~ .../linux/in6.h:60:8: note: originally defined here 60 | struct ipv6_mreq { | ^~~~~~~~~ Fixes: 70a00e2f1dba ("selftests/bpf: Test bpf_skb_adjust_room on CHECKSUM_PARTIAL") Signed-off-by: Tony Ambardar --- tools/testing/selftests/bpf/prog_tests/decap_sanity.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/bpf/prog_tests/decap_sanity.c b/tools/testing/selftests/bpf/prog_tests/decap_sanity.c index dcb9e5070cc3..d79f398ec6b7 100644 --- a/tools/testing/selftests/bpf/prog_tests/decap_sanity.c +++ b/tools/testing/selftests/bpf/prog_tests/decap_sanity.c @@ -4,7 +4,6 @@ #include #include #include -#include #include "test_progs.h" #include "network_helpers.h" From patchwork Tue Jul 23 05:54:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Ambardar X-Patchwork-Id: 13739344 Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F18CB13DDA7; Tue, 23 Jul 2024 05:56:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714171; cv=none; b=b3nBaBXwS8wsMFAU3Himebn630wGiAWriviRDy0MRKHlTZYkv/aa0HFLgJEyHC5vlk3Bp91+JmkzTlMlPu3dy2SwWKXaG2wnumtfKugxcBWdup4PO0uI+OemGqxaStGLpYC/LCLEAL1uccpINfR5X6nV7H60si+0qHYx/0sd9uo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714171; c=relaxed/simple; bh=WBsVU5zJpQlgvjybeJEYrGnhmGHPlAyn499bj+m9Ha0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uYuI7oz/snAl5IqaS0rxw5Y/oKh3swJMjysE1+X9MoNMAKoEMkgE31RhE2iKKCRlouX3JC+v3f3OGDs6ai6INC1R3y/MmOclC7+G1WCD19vk/tWaYMPH1GPsljUhioei9/4j0HuSbGMS9JXDn5NHsZ0rWpKGkWapkJNksi390HI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=S+Ir9Ish; arc=none smtp.client-ip=209.85.214.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="S+Ir9Ish" Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-1fc569440e1so3180115ad.3; Mon, 22 Jul 2024 22:56:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721714169; x=1722318969; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RpPAliQNuZr1whRpDRhhXvNGzN+MtzAqRLS/eXyE1Xo=; b=S+Ir9IshfQT45rSVqciXVcmn5UMHYNfE2M6Fvlvfgs0BotTZudoJRnEY0zSeVwVYsV mvLy2daxU48/4TZfLR5gJFT/rj6HOOwuo7FKSRJX0ZnoFjwDt60H0MAI/kd6l2iESvEi pxO1JzHQwxXUrqZxDUIS4pkqRQ+syNKwRwViC2sSL5x5mk81VR2mGHcGa6bIYLrLlgbh FvPnj7RjjS5Scsyj7k+fmEJnzcLXXYVz4udrDdHlnCtckGuo8JsYY3PGcNRyZTWYStnP kQVZTpkIlQCEpUNa2GH/VF7i6aoXQdOCXSlDzVmpT/c6zCrPzN2NiBe/A49qfFtTYPmr JOfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721714169; x=1722318969; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RpPAliQNuZr1whRpDRhhXvNGzN+MtzAqRLS/eXyE1Xo=; b=gAxZKRFQ1n8zWBHlbhySp5gBLHLwW+L8o9QhAQ+pAF6VLlXmJsxJexXiRIJrxLshq1 xMlj4zA3ZxULlWvJeygYUg3RvuaTywZWE5IFsaOYAjbnVdBYomTJCQPKvsLUZvaqSxO3 R00j7vqrDjGjHa/zgfW0lDc+TZcUZqZ0wfM0YwdvOVaTppH+PSBEryrKz5iQv9CVExQu rKEhIWvMDKtNjLLxxiG97tOw7WwUPUKOZO9RuwDiaMnwKR23oP+Ulj08hsTZulOXzPsu /T//q7/VAOBzW0Bpozel3dJH8qnt6poCpE/WMjhQrdjyglLfA76T44psGMnoD05ASa1V sfyA== X-Forwarded-Encrypted: i=1; AJvYcCU7qykYcEwEhWp7rH5yQQBWVFjMSK08eFhAkyofg5YAapad7SAqECC1i0F/Wm+LwA75vrVc97E9QRqgIbxRukmPLXKu+A+5MEuS9zu/qE2x X-Gm-Message-State: AOJu0Yz0ykZwuu/FmvVoZrLGX0S/gQX+EX/20YDATFp7C9JBF1syd9Yx M9y3vVboTMIZD/X+OcH2lPkGmiFKDqrxpj1cyuwq1lF0XsgGNZHMhUKSYns7 X-Google-Smtp-Source: AGHT+IF9gLd25SGmUc4FjhG/nOQ4IRMZUktMmGUNeBrI95K/yTIJCzQ+KeSH1c6kWzJMTnYjlqn61Q== X-Received: by 2002:a17:903:244a:b0:1fb:7b01:7980 with SMTP id d9443c01a7336-1fdb5e6bd61mr20796225ad.0.1721714169229; Mon, 22 Jul 2024 22:56:09 -0700 (PDT) Received: from localhost.localdomain (69-172-146-21.cable.teksavvy.com. [69.172.146.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f469df5sm65724685ad.254.2024.07.22.22.56.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 22:56:09 -0700 (PDT) From: Tony Ambardar To: bpf@vger.kernel.org Cc: Tony Ambardar , linux-kselftest@vger.kernel.org, Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Yucong Sun , Eric Dumazet , Kuniyuki Iwashima , Jakub Sitnicki , Dave Marchevsky , David Vernet , Carlos Neira , Joanne Koong , Petar Penkov , Willem de Bruijn , Yan Zhai , Vadim Fedorenko , YiFei Zhu Subject: [PATCH bpf-next v1 18/19] selftests/bpf: Fix errors compiling crypto_sanity.c with musl libc Date: Mon, 22 Jul 2024 22:54:45 -0700 Message-Id: <911293968f424ad7b462d8805aeb3baee8f4985b.1721713597.git.tony.ambardar@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Remove a redundant include of '', whose needed definitions are already provided by 'test_progs.h'. This avoids errors seen compiling for mips64el/musl-libc: In file included from .../arpa/inet.h:9, from ./test_progs.h:17, from prog_tests/crypto_sanity.c:10: .../netinet/in.h:23:8: error: redefinition of 'struct in6_addr' 23 | struct in6_addr { | ^~~~~~~~ In file included from crypto_sanity.c:7: .../linux/in6.h:33:8: note: originally defined here 33 | struct in6_addr { | ^~~~~~~~ .../netinet/in.h:34:8: error: redefinition of 'struct sockaddr_in6' 34 | struct sockaddr_in6 { | ^~~~~~~~~~~~ .../linux/in6.h:50:8: note: originally defined here 50 | struct sockaddr_in6 { | ^~~~~~~~~~~~ .../netinet/in.h:42:8: error: redefinition of 'struct ipv6_mreq' 42 | struct ipv6_mreq { | ^~~~~~~~~ .../linux/in6.h:60:8: note: originally defined here 60 | struct ipv6_mreq { | ^~~~~~~~~ Fixes: 91541ab192fc ("selftests: bpf: crypto skcipher algo selftests") Signed-off-by: Tony Ambardar Reviewed-by: Vadim Fedorenko --- tools/testing/selftests/bpf/prog_tests/crypto_sanity.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/bpf/prog_tests/crypto_sanity.c b/tools/testing/selftests/bpf/prog_tests/crypto_sanity.c index b1a3a49a822a..42bd07f7218d 100644 --- a/tools/testing/selftests/bpf/prog_tests/crypto_sanity.c +++ b/tools/testing/selftests/bpf/prog_tests/crypto_sanity.c @@ -4,7 +4,6 @@ #include #include #include -#include #include #include "test_progs.h" From patchwork Tue Jul 23 05:54:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Ambardar X-Patchwork-Id: 13739345 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A67A213DDA6; Tue, 23 Jul 2024 05:56:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714174; cv=none; b=b2fAnL3h4OBd38sz+54kYabJs2DyjTUg/TYwQTYzmhZmkk/ph+T6xX0URmVos32ZT9s1U86Fy3Yf9XtBOcB52q49AcZOsWHumAtK3Gcjc4Ny1DRePWlHDJ1CzDpzbJsCcf+5dmxbojOST9FfeKhA+rgkJz4ojP4uqbtzHKCEwJc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721714174; c=relaxed/simple; bh=9ZRAfiKnZMFQ4sO6YZ4qmeyXMEAhqJzO0oV12nYn19E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=KW974XPnFdaZ9Aqeab+YWJSb7EvSBU+rDAEd71Mq5800PYSTxhIONkFO8UOqKF0Xyh8lPM5O/is5iwEpLB+Fx8vlhFJ4cbdsipsjjpau7RKBLMwF1ogSjYTbESenMz/9otb7rArZdB8CPXYoCm0NjDvfnB50tUvajaMAS6xpZRg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=byj7ezQg; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="byj7ezQg" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1fc569440e1so3180455ad.3; Mon, 22 Jul 2024 22:56:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721714172; x=1722318972; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+MG2PeOMOolb1htrH87ixqT0wk/31rclRCNXCUAAWHM=; b=byj7ezQgAndCc1UAnay04w+CvZc8UBTxByWdZrIvZAknG5EX7MAXRbgKJXr+ahbN9p D9fOscu3FZX9F86mVaezop4B+cgpNjIGZhalYOgQPccfcKcs/2iTodgqHuKUDFaBRoKY isGYRDnSVOZzwph28UEyE7ZSEJQ3cdbRGVV3y5el5wDznCXwk5QGVAyIvetFNO96r4lu H2o6sukKkKo5OJqepjVPhgR16XK6S9YZH4JCQrwrsU8T1dVvLeJZUP+sV3P6MO9Y3A/O +wdWlzis3nNqPou0eT99+UhRFgRlZ9VMv0DgH9Gd7EYWxEPPHhdVV7lb/7uRdLxthCM1 vrow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721714172; x=1722318972; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+MG2PeOMOolb1htrH87ixqT0wk/31rclRCNXCUAAWHM=; b=OiHMaSlhY0MWEThNg04x9jvvWPMUViTuqLBP7l+wIdmbux1IDSNXlRzf09IkIwkFem GPISfcZ1SSZ8OYc7u8AQAuuGgo1hK2pi1lYK8hF6VJ+iAlnHmDXM7fBKHvfmByg05fBu 9YDYcmuqnMyyoL0i4PFd2zDnNhcFy54JpoWGr4GJMsuaRVSBLvBE5dSNYpXFuafZmVfd NNDkMLk6ENrZ2de3ISYbRMN2jltimNHZyK7aCdlYB7mntNjw4GWDe5sqgAWw8m91CnXC d77gnrxhlQ6CGxtW18XWCMzRz/6TEXmxYVxy/z7Eiv3CS8dQEpFcNhWu1UCHuGKbmpoZ jjqA== X-Forwarded-Encrypted: i=1; AJvYcCWsFRjAMUtRLoWQ5ioLXUsSOG18MGVMwRqs3n4l3lz1h/rhmNqby4PyxxXZcSy2PmFuHz2XzSkOjqJMpbwxQvfVGnXrRExcLy5Ce2hv1u2e X-Gm-Message-State: AOJu0Ywq7Wp6+bci2CMXn/NV23DeAEh4Oqync04qE2axPxGmH7jnOYVo MHRACYedS+YQb61+8aaeUs9571MIZc2ewbSHHUpWXhQ4uqKon+62AexZl8zj X-Google-Smtp-Source: AGHT+IFytpCUFA8IA0s61NeqnjNIQ1INiPTY0AICLu2DCZMD5AwVcMPePdfCAp75F1DMtGicppXWnA== X-Received: by 2002:a17:902:d511:b0:1f7:2293:1886 with SMTP id d9443c01a7336-1fdb5f50c4dmr18992655ad.12.1721714171896; Mon, 22 Jul 2024 22:56:11 -0700 (PDT) Received: from localhost.localdomain (69-172-146-21.cable.teksavvy.com. [69.172.146.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f469df5sm65724685ad.254.2024.07.22.22.56.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 22:56:11 -0700 (PDT) From: Tony Ambardar To: bpf@vger.kernel.org Cc: Tony Ambardar , linux-kselftest@vger.kernel.org, Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Yucong Sun , Eric Dumazet , Kuniyuki Iwashima , Jakub Sitnicki , Dave Marchevsky , David Vernet , Carlos Neira , Joanne Koong , Petar Penkov , Willem de Bruijn , Yan Zhai , Vadim Fedorenko , YiFei Zhu Subject: [PATCH bpf-next v1 19/19] selftests/bpf: Fix errors compiling cg_storage_multi.h with musl libc Date: Mon, 22 Jul 2024 22:54:46 -0700 Message-Id: <4f4702e9f6115b7f84fea01b2326ca24c6df7ba8.1721713597.git.tony.ambardar@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Remove a redundant include of '', whose needed definitions are already included (via '') in cg_storage_multi_egress_only.c, cg_storage_multi_isolated.c, and cg_storage_multi_shared.c. This avoids redefinition errors seen compiling for mips64el/musl-libc like: In file included from progs/cg_storage_multi_egress_only.c:13: In file included from progs/cg_storage_multi.h:6: In file included from /usr/mips64el-linux-gnuabi64/include/asm/types.h:23: /usr/include/asm-generic/int-l64.h:29:25: error: typedef redefinition with different types ('long' vs 'long long') 29 | typedef __signed__ long __s64; | ^ /usr/include/asm-generic/int-ll64.h:30:44: note: previous definition is here 30 | __extension__ typedef __signed__ long long __s64; | ^ Fixes: 9e5bd1f7633b ("selftests/bpf: Test CGROUP_STORAGE map can't be used by multiple progs") Signed-off-by: Tony Ambardar --- tools/testing/selftests/bpf/progs/cg_storage_multi.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/testing/selftests/bpf/progs/cg_storage_multi.h b/tools/testing/selftests/bpf/progs/cg_storage_multi.h index a0778fe7857a..41d59f0ee606 100644 --- a/tools/testing/selftests/bpf/progs/cg_storage_multi.h +++ b/tools/testing/selftests/bpf/progs/cg_storage_multi.h @@ -3,8 +3,6 @@ #ifndef __PROGS_CG_STORAGE_MULTI_H #define __PROGS_CG_STORAGE_MULTI_H -#include - struct cgroup_value { __u32 egress_pkts; __u32 ingress_pkts;