DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: Olivier Matz <olivier.matz@6wind.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Zhang, Helin" <helin.zhang@intel.com>,
	"Richardson, Bruce" <bruce.richardson@intel.com>
Cc: "amint@icsi.berkeley.edu" <amint@icsi.berkeley.edu>
Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix compilation when offload flags disabled
Date: Fri, 1 Jul 2016 09:02:46 +0000	[thread overview]
Message-ID: <2601191342CEEE43887BDE71AB97725836B789B0@irsmsx105.ger.corp.intel.com> (raw)
In-Reply-To: <1467360147-19571-1-git-send-email-olivier.matz@6wind.com>


> The ixgbe driver does not compile if CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=n
> because the macro has not the proper number of parameters. To reproduce
> the issue:
> 
>   make config T=x86_64-native-linuxapp-gcc
>   sed -i 's,CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=y,CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=n,' build/.config
>   make -j4
>   [...]
>    ixgbe_rxtx_vec_sse.c: In function ‘_recv_raw_pkts_vec’:
>    ixgbe_rxtx_vec_sse.c:345:53: error: macro "desc_to_olflags_v" passed 3 arguments, but takes just 2
>       desc_to_olflags_v(descs, vlan_flags, &rx_pkts[pos]);
>                                                         ^
>    ixgbe_rxtx_vec_sse.c:345:3: error: ‘desc_to_olflags_v’ undeclared (first use in this function)
>       desc_to_olflags_v(descs, vlan_flags, &rx_pkts[pos]);
>       ^
>    ixgbe_rxtx_vec_sse.c:345:3: note: each undeclared identifier is reported only once for each function it appears in
>    ixgbe_rxtx_vec_sse.c:231:10: error: variable ‘vlan_flags’ set but not used [-Werror=unused-but-set-variable]
>      uint8_t vlan_flags;
>              ^
>    cc1: all warnings being treated as errors
> 
> This patch fixes the number of arguments in th macro, and ensure that
> vlan_flags is marked as used to avoid the third error.
> 
> Fixes: b37b528d957c ("mbuf: add new Rx flags for stripped VLAN")
> Reported-by: Amin Tootoonchian <amint@icsi.berkeley.edu>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> ---
>  drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
> index 4f95deb..1c4fd7c 100644
> --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
> +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
> @@ -197,7 +197,9 @@ desc_to_olflags_v(__m128i descs[4], uint8_t vlan_flags,
>  	rx_pkts[3]->ol_flags = vol.e[3];
>  }
>  #else
> -#define desc_to_olflags_v(desc, rx_pkts) do {} while (0)
> +#define desc_to_olflags_v(desc, vlan_flags, rx_pkts) do { \
> +		RTE_SET_USED(vlan_flags); \
> +	} while (0)
>  #endif
> 
>  /*
> --

Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

> 2.8.1


  reply	other threads:[~2016-07-01  9:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-27 15:44 [dpdk-dev] [PATCH] ixgbe: " Olivier Matz
2016-06-27 17:05 ` Thomas Monjalon
2016-06-29 10:15   ` Bruce Richardson
2016-06-29 11:35     ` Olivier MATZ
2016-06-29 12:30       ` Bruce Richardson
2016-07-01  8:02 ` [dpdk-dev] [PATCH v2] net/ixgbe: " Olivier Matz
2016-07-01  9:02   ` Ananyev, Konstantin [this message]
2016-07-05  9:11     ` Bruce Richardson

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=2601191342CEEE43887BDE71AB97725836B789B0@irsmsx105.ger.corp.intel.com \
    --to=konstantin.ananyev@intel.com \
    --cc=amint@icsi.berkeley.edu \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@intel.com \
    --cc=olivier.matz@6wind.com \
    /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).