DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhang, Ke1X" <ke1x.zhang@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "Zhang, Qi Z" <qi.z.zhang@intel.com>,
	"Zhang, Yuying" <yuying.zhang@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [PATCH] net/ice: add devargs for disabling mac filter
Date: Sat, 17 Dec 2022 15:22:21 +0000	[thread overview]
Message-ID: <PH7PR11MB598445F85778AD18C4FC66DDDCE79@PH7PR11MB5984.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20221212195122.5b1cbd15@hermes.local>



> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Tuesday, December 13, 2022 11:51 AM
> To: Zhang, Ke1X <ke1x.zhang@intel.com>
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Zhang, Yuying
> <yuying.zhang@intel.com>; dev@dpdk.org
> Subject: Re: [PATCH] net/ice: add devargs for disabling mac filter
> 
> On Fri, 25 Nov 2022 10:51:24 +0800
> Ke Zhang <ke1x.zhang@intel.com> wrote:
> 
> > diff --git a/drivers/net/ice/ice_ethdev.h
> > b/drivers/net/ice/ice_ethdev.h index c8311be179..0350c6584a 100644
> > --- a/drivers/net/ice/ice_ethdev.h
> > +++ b/drivers/net/ice/ice_ethdev.h
> > @@ -563,6 +563,7 @@ struct ice_devargs {
> >  	int safe_mode_support;
> >  	uint8_t proto_xtr_dflt;
> >  	int pipe_mode_support;
> > +	int mac_filter_disable;
> 
> Why use 4 bytes for a flag when a single bit would do.

After modifying the code like this:
struct ice_devargs {
	int rx_low_latency : 1;
	int safe_mode_support : 1;
	int pipe_mode_support : 1;
	int mac_filter_disable : 1;

I met a issue when compiling the code:
../drivers/net/ice/ice_ethdev.c:2076:19: error: cannot take address of bit-field 'safe_mode_support'
 2076 |      &parse_bool, &ad->devargs.safe_mode_support);
      |                   ^
../drivers/net/ice/ice_ethdev.c:2081:19: error: cannot take address of bit-field 'pipe_mode_support'
 2081 |      &parse_bool, &ad->devargs.pipe_mode_support);
      |                   ^
../drivers/net/ice/ice_ethdev.c:2086:18: error: cannot take address of bit-field 'mac_filter_disable'
 2086 |     &parse_bool, &ad->devargs.mac_filter_disable);
      |                  ^
../drivers/net/ice/ice_ethdev.c:2101:19: error: cannot take address of bit-field 'rx_low_latency'
 2101 |      &parse_bool, &ad->devargs.rx_low_latency);

It seems that bitfields members aren't addressable.


  parent reply	other threads:[~2022-12-17 15:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-25  2:51 Ke Zhang
2022-12-13  2:03 ` Zhang, Qi Z
2022-12-13  3:51 ` Stephen Hemminger
2022-12-13  5:43   ` Zhang, Ke1X
2022-12-13  5:44   ` Zhang, Ke1X
2022-12-17 15:22   ` Zhang, Ke1X [this message]
2022-12-17 17:20     ` Stephen Hemminger
2022-12-21  3:58 ` [PATCH v2] " Ke Zhang
2022-12-26  6:14   ` Zhang, Qi Z
2022-12-28  8:55     ` Zhang, Ke1X
2023-01-12  7:55   ` [PATCH v3] net/ice: add devargs for disabling default mac Ke Zhang
2023-01-12 16:32     ` Stephen Hemminger
2023-01-16 13:38       ` Zhang, Ke1X
2023-02-01  8:22     ` Zhang, Qi Z
2023-02-03  2:02     ` [PATCH v4] " Ke Zhang
2023-02-13  1:48       ` Zhang, Qi Z

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=PH7PR11MB598445F85778AD18C4FC66DDDCE79@PH7PR11MB5984.namprd11.prod.outlook.com \
    --to=ke1x.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=yuying.zhang@intel.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).