From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-171.mta0.migadu.com (out-171.mta0.migadu.com [91.218.175.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 57F1B2D63EF for ; Fri, 17 Oct 2025 23:34:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760744078; cv=none; b=pfzBhgArgB8MAJpxLllkxmAoDWXFNsbVU8tEkKQ9blD6qFDU0aJuRSvnehoqqsqeByUflcQ6llffZIfcTlacE9lugt1+lYph9Yi7tMSdAvbI5NWWFdY+mhPdVoLtKvm818oZZLKP6Q0mfsgmdnsDp9MCI2U0+viHVZf3iCY6lw0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760744078; c=relaxed/simple; bh=pYcbVyw+NDcF/YeLk7YmCeCpRP76yrQzGpy88DcfPE4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=TkWngUkTurd/g/kmaVMAbYq1Nf3Abu4Bw/Oi0lIOoMp56aLn9SlaBEV5teQneW5fiAXkPNU1OLicwWyPw02ROAsn9jlno8B88En2ErgNkZOnO7MimtH8fxr9JNtZAclYfPRBmNCG6LpOEavM4xf+SCGZEY5LRb4kglXTPkmp3X0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=i1NXAIjC; arc=none smtp.client-ip=91.218.175.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="i1NXAIjC" Message-ID: <056a0000-f74c-47d9-9fdb-04f0646c174b@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1760744073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tqNv9XZ3cHZq/nZ+ajuryy76A/vXM/wJUR3p9n98Y3I=; b=i1NXAIjC5akXkLmD1o92ACUQy2bwsjwVySCw29oQ8btNNAmvRMqiBXLjUpid1Zl2eECReg t1gOL/ZegEOz3PFDn85Sj/7l79eGcptPsu8qOxOupI1oEvklUPuXw6ovE14jXt33NHSfhV 4GEN5CSXX2OOcy7LPicH1qHOSa1QDHA= Date: Fri, 17 Oct 2025 16:34:27 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH bpf-next 3/5] selftests/bpf: make test_tc_tunnel.bpf.c compatible with big endian platforms To: =?UTF-8?Q?Alexis_Lothor=C3=A9_=28eBPF_Foundation=29?= Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Shuah Khan , ebpf@linuxfoundation.org, Thomas Petazzoni , Bastien Curutchet , bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org References: <20251017-tc_tunnel-v1-0-2d86808d86b2@bootlin.com> <20251017-tc_tunnel-v1-3-2d86808d86b2@bootlin.com> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Martin KaFai Lau In-Reply-To: <20251017-tc_tunnel-v1-3-2d86808d86b2@bootlin.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On 10/17/25 7:29 AM, Alexis Lothoré (eBPF Foundation) wrote: > +#define ETH_HLEN 14 > +#define TC_ACT_OK 0 > +#define TC_ACT_SHOT 2 > +#define ETH_P_MPLS_UC 0x8847 > +#define ETH_P_IP 0x0800 > +#define ETH_P_IPV6 0x86DD > +#define ETH_P_TEB 0x6558 > + > +#define MPLS_LS_S_MASK 0x00000100 > +#define BPF_F_ADJ_ROOM_ENCAP_L2(len) \ > + (((__u64)len & BPF_ADJ_ROOM_ENCAP_L2_MASK) \ > + << BPF_ADJ_ROOM_ENCAP_L2_SHIFT) > + Some of them (e.g. TC_ACT_OK) should be already in bpf_tracing_net.h, so include that header instead. Not sure the remaining ones (e.g. MPLS) will be very useful, so I would leave it here for now instead of adding them to bpf_tracing_net.h.