From: "Shaikh, Shahed" <Shahed.Shaikh@cavium.com>
To: Thomas Monjalon <thomas@monjalon.net>,
Ferruh Yigit <ferruh.yigit@intel.com>,
Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>,
Wenzhuo Lu <wenzhuo.lu@intel.com>,
Qi Zhang <qi.z.zhang@intel.com>,
Xiao Wang <xiao.w.wang@intel.com>,
Konstantin Ananyev <konstantin.ananyev@intel.com>,
"Mody, Rasesh" <Rasesh.Mody@cavium.com>,
"Patil, Harish" <Harish.Patil@cavium.com>,
Yong Wang <yongwang@vmware.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] drivers/net: do not redefine bool
Date: Thu, 20 Sep 2018 17:48:30 +0000 [thread overview]
Message-ID: <BY2PR07MB2454B5D7D2ED156330B4314B9D130@BY2PR07MB2454.namprd07.prod.outlook.com> (raw)
In-Reply-To: <20180920001853.23454-1-thomas@monjalon.net>
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Thursday, September 20, 2018 5:49 AM
> To: Ferruh Yigit <ferruh.yigit@intel.com>; Rahul Lakkireddy
> <rahul.lakkireddy@chelsio.com>; Wenzhuo Lu <wenzhuo.lu@intel.com>; Qi
> Zhang <qi.z.zhang@intel.com>; Xiao Wang <xiao.w.wang@intel.com>;
> Konstantin Ananyev <konstantin.ananyev@intel.com>; Mody, Rasesh
> <Rasesh.Mody@cavium.com>; Patil, Harish <Harish.Patil@cavium.com>; Shaikh,
> Shahed <Shahed.Shaikh@cavium.com>; Yong Wang <yongwang@vmware.com>
> Cc: dev@dpdk.org
> Subject: [PATCH] drivers/net: do not redefine bool
>
> External Email
>
> When trying to include stdbool.h in DPDK base headers, there are a lot
> of conflicts with drivers which redefine bool/true/false
> in their compatibility layer.
>
> It is fixed by including stdbool.h in these drivers.
> Some errors with usage of bool type are also fixed in some drivers.
>
> Note: the driver qede has a surprising mix of bool and int:
> (~p_iov->b_pre_fp_hsi & ETH_HSI_VER_MINOR)
> where the first variable is boolean and the version is a number.
> It is replaced by
> !p_iov->b_pre_fp_hsi
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
> drivers/net/cxgbe/cxgbe_compat.h | 2 +-
> drivers/net/e1000/base/e1000_osdep.h | 5 +----
> drivers/net/fm10k/base/fm10k_osdep.h | 8 +-------
> drivers/net/fm10k/fm10k_ethdev.c | 4 ++--
> drivers/net/ixgbe/base/ixgbe_osdep.h | 6 +-----
> drivers/net/ixgbe/ixgbe_ethdev.c | 16 +++++++++-------
> drivers/net/ixgbe/ixgbe_rxtx.c | 2 +-
> drivers/net/qede/base/bcm_osal.h | 6 ++----
> drivers/net/qede/base/ecore_vf.c | 3 +--
> drivers/net/qede/qede_ethdev.c | 2 +-
> drivers/net/vmxnet3/base/vmxnet3_osdep.h | 3 ++-
> 11 files changed, 22 insertions(+), 35 deletions(-)
>
...
>
> /* Delays */
> diff --git a/drivers/net/qede/base/ecore_vf.c
> b/drivers/net/qede/base/ecore_vf.c
> index d2213f793..f5deb2916 100644
> --- a/drivers/net/qede/base/ecore_vf.c
> +++ b/drivers/net/qede/base/ecore_vf.c
> @@ -445,8 +445,7 @@ static enum _ecore_status_t ecore_vf_pf_acquire(struct
> ecore_hwfn *p_hwfn)
> }
>
> /* @DPDK */
> - if ((~p_iov->b_pre_fp_hsi &
> - ETH_HSI_VER_MINOR) &&
> + if (!p_iov->b_pre_fp_hsi &&
> (resp->pfdev_info.minor_fp_hsi < ETH_HSI_VER_MINOR))
> DP_INFO(p_hwfn,
> "PF is using older fastpath HSI;"
> diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
> index 7bb52b157..53a767b3e 100644
> --- a/drivers/net/qede/qede_ethdev.c
> +++ b/drivers/net/qede/qede_ethdev.c
> @@ -534,7 +534,7 @@ int qede_activate_vport(struct rte_eth_dev *eth_dev,
> bool flg)
> params.update_vport_active_tx_flg = 1;
> params.vport_active_rx_flg = flg;
> params.vport_active_tx_flg = flg;
> - if (~qdev->enable_tx_switching & flg) {
> + if (!qdev->enable_tx_switching && flg) {
> params.update_tx_switching_flg = 1;
> params.tx_switching_flg = !flg;
> }
For qede changes -
Acked-by: Shahed Shaikh <shahed.shaikh@cavium.com>
next prev parent reply other threads:[~2018-09-20 17:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-20 0:18 Thomas Monjalon
2018-09-20 17:48 ` Shaikh, Shahed [this message]
2018-09-21 13:47 ` Ferruh Yigit
2018-09-21 14:49 ` Thomas Monjalon
2018-09-24 14:43 ` Ferruh Yigit
2018-09-24 15:06 ` Ferruh Yigit
2018-09-24 16:59 ` Thomas Monjalon
2018-09-25 8:03 ` Ferruh Yigit
2018-09-25 9:04 ` Thomas Monjalon
2018-10-03 14:11 ` Ferruh Yigit
2018-10-03 19:16 ` Thomas Monjalon
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=BY2PR07MB2454B5D7D2ED156330B4314B9D130@BY2PR07MB2454.namprd07.prod.outlook.com \
--to=shahed.shaikh@cavium.com \
--cc=Harish.Patil@cavium.com \
--cc=Rasesh.Mody@cavium.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=konstantin.ananyev@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=rahul.lakkireddy@chelsio.com \
--cc=thomas@monjalon.net \
--cc=wenzhuo.lu@intel.com \
--cc=xiao.w.wang@intel.com \
--cc=yongwang@vmware.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).