From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F0021A0542; Sat, 17 Dec 2022 18:20:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 936CD40695; Sat, 17 Dec 2022 18:20:27 +0100 (CET) Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by mails.dpdk.org (Postfix) with ESMTP id 90A954068E for ; Sat, 17 Dec 2022 18:20:26 +0100 (CET) Received: by mail-pj1-f45.google.com with SMTP id gt4so5355673pjb.1 for ; Sat, 17 Dec 2022 09:20:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=xfSICBZbtdA1JGUiNTChBF/qr2qWnhx2OWjzpjVJFhc=; b=Q5aRTqZWpq6GSAVLb3ZhlMJlsXtEoWKFYDJJWBKNgWTt56J3wQksepxHwAXGL7/FWD K9PbH+36M/qfUW9PWG+u1a9CdSvh7KzEsA3+JuYmJystHuwLeIxMNoQ8wpszcIdOujoe 2imGOcSPipPuZE1ldUyeSXQtQef95DId+nEFXxRlPeV3wwca05hywgTlvzjGhbzidFTt 11uRVwKmV+YRgwo0LpI2DA1XLxPlH5H9dPoRLsay0ASIbuK3439MpCyQxhEYWZQVMyEs AUVSR/CTd8vLS/kkiCYSAtGC5HxUQccOPXppDc0W6IGEX5UbhPMSQzxcEOc96lYIdNBU S/Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xfSICBZbtdA1JGUiNTChBF/qr2qWnhx2OWjzpjVJFhc=; b=CrNHqk/IzOhxF3lJwdj71RrwOAofW/g7t1Bq1lWNMsIjGyvVHPovIsiPRYW9dT3ZjK ok//vZiTrsnWYAlXVxdIed3XUbpfdvtHXcKE8tf0v4ZWRP32EfVhXFsg/5zFb/KmzGNF JHS1SIbrApyg+ofWE1DY96myMMgeayc4nGx7ErisMqjtNckBoa+9Pj7UGWdpL1/kGOD+ 8F5sRWIr7XJtSK0efcPgwly4wm5dAvUttDEMN7j4Cxe5Cltu/J9jKSvCO28750xCQx9W 9VgnGedDx9HSa2vaxMf8w2Ofqws5u68zl5SYdWdnMvCw0YROCiyhep4R3x7dLx81MbYu Jc5A== X-Gm-Message-State: AFqh2koNw5NWutsi3meBdrmmT9tOso8iADLB+1kvktGCT24fM/iLP4yZ MILpqSu0xbSWhkz6WXUMZPyg+w== X-Google-Smtp-Source: AMrXdXvzAEpneewXWNuQxENAaqdk1OuDQ2tuzUJHr+TTQo3rZZIi1kGNNhtysj/ytBh5nf4c/BVFAw== X-Received: by 2002:a05:6a21:3393:b0:ab:fb31:be13 with SMTP id yy19-20020a056a21339300b000abfb31be13mr4164315pzb.37.1671297625459; Sat, 17 Dec 2022 09:20:25 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id v24-20020a63f858000000b0047829d1b8eesm3284739pgj.31.2022.12.17.09.20.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Dec 2022 09:20:25 -0800 (PST) Date: Sat, 17 Dec 2022 09:20:23 -0800 From: Stephen Hemminger To: "Zhang, Ke1X" Cc: "Zhang, Qi Z" , "Zhang, Yuying" , "dev@dpdk.org" Subject: Re: [PATCH] net/ice: add devargs for disabling mac filter Message-ID: <20221217092023.08235627@hermes.local> In-Reply-To: References: <20221125025124.805466-1-ke1x.zhang@intel.com> <20221212195122.5b1cbd15@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Sat, 17 Dec 2022 15:22:21 +0000 "Zhang, Ke1X" wrote: > > -----Original Message----- > > From: Stephen Hemminger > > Sent: Tuesday, December 13, 2022 11:51 AM > > To: Zhang, Ke1X > > Cc: Zhang, Qi Z ; Zhang, Yuying > > ; 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 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. > Would a uint8_t work? Also parse_bool might make assumptions about size.