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: 13739357 X-Patchwork-Delegate: bpf@iogearbox.net 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: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: bpf@iogearbox.net 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"