From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
Ophir Munk <ophirmu@nvidia.com>
Cc: dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>,
Aaron Conole <aconole@redhat.com>, dpdklab <dpdklab@iol.unh.edu>,
David Marchand <david.marchand@redhat.com>
Subject: Re: [PATCH] tap: fix build of tap_bpf_program
Date: Wed, 19 Jul 2023 11:00:31 +0100 [thread overview]
Message-ID: <3d8938a4-acb8-45d0-291b-133ba0157976@amd.com> (raw)
In-Reply-To: <20230717191548.16429-1-stephen@networkplumber.org>
On 7/17/2023 8:15 PM, Stephen Hemminger wrote:
> The tap_bpf_program.c is not built as part of normal DPDK
> EAL environment. It is intended to be built standalone
> and does not use rte_common.h.
>
> This reverts the related change from
> commit ef5baf3486e0 ("replace packed attributes")
>
> Note: this patch will cause expected warnings from checkpatch
> because the code involved is not used directly in DPDK environment.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>
Agree, this seems done by mistake as part of batch update,
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
But I can't update the bpf file at all, if I am not missing something I
am not sure if we should get just this update or have a patch/patchset
that fixes the build.
@Ophir, how the bpf file is compiled? And did you test it recently?
I am using command from the documentation:
`clang -O2 -emit-llvm -c tap_bpf_program.c -o - | llc -march=bpf
-filetype=obj -o tap_bpf_program.o`
@Aaron, should we add a simple build test around it, since this file is
not build by default with DPDK build?
> ---
> drivers/net/tap/tap_bpf_program.c | 4 ++--
> drivers/net/tap/tap_rss.h | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/tap/tap_bpf_program.c b/drivers/net/tap/tap_bpf_program.c
> index 20c310e5e7ba..532e8838fe27 100644
> --- a/drivers/net/tap/tap_bpf_program.c
> +++ b/drivers/net/tap/tap_bpf_program.c
> @@ -75,14 +75,14 @@ struct ipv4_l3_l4_tuple {
> __u32 dst_addr;
> __u16 dport;
> __u16 sport;
> -} __rte_packed;
> +} __attribute__((packed));
>
> struct ipv6_l3_l4_tuple {
> __u8 src_addr[16];
> __u8 dst_addr[16];
> __u16 dport;
> __u16 sport;
> -} __rte_packed;
> +} __attribute__((packed));
>
> static const __u8 def_rss_key[TAP_RSS_HASH_KEY_SIZE] = {
> 0xd1, 0x81, 0xc6, 0x2c,
> diff --git a/drivers/net/tap/tap_rss.h b/drivers/net/tap/tap_rss.h
> index 48c151cf6b68..dff46a012f94 100644
> --- a/drivers/net/tap/tap_rss.h
> +++ b/drivers/net/tap/tap_rss.h
> @@ -35,6 +35,6 @@ struct rss_key {
> __u32 key_size;
> __u32 queues[TAP_MAX_QUEUES];
> __u32 nb_queues;
> -} __rte_packed;
> +} __attribute__((packed));
>
> #endif /* _TAP_RSS_H_ */
next prev parent reply other threads:[~2023-07-19 10:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-17 19:15 Stephen Hemminger
2023-07-19 10:00 ` Ferruh Yigit [this message]
2023-07-19 10:03 ` Ferruh Yigit
2023-07-19 10:09 ` Ferruh Yigit
2023-07-19 16:12 ` Stephen Hemminger
2023-07-20 7:45 ` Ferruh Yigit
2023-07-20 9:08 ` Ferruh Yigit
2023-07-25 22:49 ` Long Li
2023-07-26 9:15 ` Loftus, Ciara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3d8938a4-acb8-45d0-291b-133ba0157976@amd.com \
--to=ferruh.yigit@amd.com \
--cc=aconole@redhat.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=dpdklab@iol.unh.edu \
--cc=ophirmu@nvidia.com \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).