From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AA841A05A0; Tue, 21 Apr 2020 23:22:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5395E1C43C; Tue, 21 Apr 2020 23:22:01 +0200 (CEST) Received: from mail-oi1-f194.google.com (mail-oi1-f194.google.com [209.85.167.194]) by dpdk.org (Postfix) with ESMTP id 668841C434 for ; Tue, 21 Apr 2020 23:22:00 +0200 (CEST) Received: by mail-oi1-f194.google.com with SMTP id t199so41441oif.7 for ; Tue, 21 Apr 2020 14:22:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EBF1yWauNhBniI8RRt26Gy7d5/Pc9D7vuWmiB365DQQ=; b=I9VN8uwiWLn7nJqZ07vOA96Tn+jJn80ygdc2m7FfqHVfTlyftN9a5SdeNEyfB2hhfQ 0/4+xVDj7Ahf9y4NqX2MdBXJQGQqvXdn9bHeHTlPbDfrEiersFOdBdX3lnFo1qqQUOFt AreVTtQEnq1BlcmXJ7QUK2ygkcDkPkGZr5DsY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EBF1yWauNhBniI8RRt26Gy7d5/Pc9D7vuWmiB365DQQ=; b=JrhJuUHNGohodFGXq8B7HorLBLtoIK2TR/WO2G/I9RY4cfiWaF0X/p777xc1tCVxgR Zvr9tqREdkDN0evnXYE+nEZA+k5fgDPQbpd3GLSazcSshhWzSr7fAK8e9rg3i644uP6t OaKMpVbiF/ppYOwwmalntNFbWBf5K391hFmGQSsDxu2Uar0bb8CqX4lQ/hUfjCpsPJgg bWDXSUbgqyfb6Bll1FHc0hk6q3WqXLFNar8/SaUnPG7dhF5Nh+cZY7DfVHm7dS+UqUbI Ap1RP6fdxrZ8ZQ7209U2vbz8FU6S7B2OQCOcqYpsl0Xw7mQpntJ81tVxi8pYhfsdLMBO lZbw== X-Gm-Message-State: AGi0PubOcCQultCY28D8YA3Mu6ljcXRquWy0FAnba8F7bz498zM7RN9Z 4+omWblh2ITjZt+2FW6V/QDQ9Syj0H2kcBdd/0+U1A== X-Google-Smtp-Source: APiQypKaJejLI8P2MonuPCJAGKw3SnFxcRwEFzkVgF1bYElvw9Wvxa0qjnxFtVcnY5kXvIymStQH3VnEzeh1FfjWzD4= X-Received: by 2002:aca:5583:: with SMTP id j125mr4608749oib.179.1587504119344; Tue, 21 Apr 2020 14:21:59 -0700 (PDT) MIME-Version: 1.0 References: <20200421091257.8089-1-kalesh-anakkur.purayil@broadcom.com> <20200421200720.81151-1-ajit.khaparde@broadcom.com> <20200421200720.81151-9-ajit.khaparde@broadcom.com> <2ef43a80-a4bf-39be-5b46-a8b562fef7fc@intel.com> In-Reply-To: <2ef43a80-a4bf-39be-5b46-a8b562fef7fc@intel.com> From: Ajit Khaparde Date: Tue, 21 Apr 2020 14:21:43 -0700 Message-ID: To: Ferruh Yigit Cc: dpdk-dev , Kalesh AP Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v2 08/10] net/bnxt: add FW status location structure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Apr 21, 2020 at 2:05 PM Ferruh Yigit wrote: > On 4/21/2020 9:07 PM, Ajit Khaparde wrote: > > From: Kalesh AP > > > > Code using this change will be added in next patch. > > It can be better to merge this patch to next one, where it uses this new > struct. > > > > > Signed-off-by: Kalesh AP > > Reviewed-by: Ajit Khaparde > > --- > > drivers/net/bnxt/hsi_struct_def_dpdk.h | 49 ++++++++++++++++++++++++++ > > 1 file changed, 49 insertions(+) > > > > diff --git a/drivers/net/bnxt/hsi_struct_def_dpdk.h > b/drivers/net/bnxt/hsi_struct_def_dpdk.h > > index da22b6249..fe18686f8 100644 > > --- a/drivers/net/bnxt/hsi_struct_def_dpdk.h > > +++ b/drivers/net/bnxt/hsi_struct_def_dpdk.h > > @@ -38622,4 +38622,53 @@ struct hwrm_cfa_counter_qstats_output { > > uint8_t valid; > > } __rte_packed; > > > > +/* > > + * This structure is fixed at the beginning of the ChiMP SRAM (GRC > > + * offset: 0x31001F0). Host software is expected to read from this > > + * location for a defined signature. If it exists, the software can > > + * assume the presence of this structure and the validity of the > > + * FW_STATUS location in the next field. > > + */ > > +/* hcomm_status (size:64b/8B) */ > > +struct hcomm_status { > > + uint32_t sig_ver; > > + /* > > + * This field defines the version of the structure. The latest > > + * version value is 1. > > + */ > > + #define HCOMM_STATUS_VER_MASK UINT32_C(0xff) > > + #define HCOMM_STATUS_VER_SFT 0 > > + #define HCOMM_STATUS_VER_LATEST UINT32_C(0x1) > > + #define HCOMM_STATUS_VER_LAST HCOMM_STATUS_VER_LATEST > > + /* > > + * This field is to store the signature value to indicate the > > + * presence of the structure. > > + */ > > + #define HCOMM_STATUS_SIGNATURE_MASK UINT32_C(0xffffff00) > > + #define HCOMM_STATUS_SIGNATURE_SFT 8 > > + #define HCOMM_STATUS_SIGNATURE_VAL (UINT32_C(0x484353) << 8) > > + #define HCOMM_STATUS_SIGNATURE_LAST HCOMM_STATUS_SIGNATURE_VAL > > + uint32_t fw_status_loc; > > + #define HCOMM_STATUS_TRUE_ADDR_SPACE_MASK UINT32_C(0x3) > > + #define HCOMM_STATUS_TRUE_ADDR_SPACE_SFT 0 > > + /* PCIE configuration space */ > > + #define HCOMM_STATUS_FW_STATUS_LOC_ADDR_SPACE_PCIE_CFG > UINT32_C(0x0) > > + /* GRC space */ > > + #define HCOMM_STATUS_FW_STATUS_LOC_ADDR_SPACE_GRC > UINT32_C(0x1) > > + /* BAR0 space */ > > + #define HCOMM_STATUS_FW_STATUS_LOC_ADDR_SPACE_BAR0 > UINT32_C(0x2) > > + /* BAR1 space */ > > + #define HCOMM_STATUS_FW_STATUS_LOC_ADDR_SPACE_BAR1 > UINT32_C(0x3) > > + #define HCOMM_STATUS_FW_STATUS_LOC_ADDR_SPACE_LAST \ > > + HCOMM_STATUS_FW_STATUS_LOC_ADDR_SPACE_BAR1 > > + /* > > + * This offset where the fw_status register is located. The value > > + * is generally 4-byte aligned. > > + */ > > + #define HCOMM_STATUS_TRUE_OFFSET_MASK > UINT32_C(0xfffffffc) > > + #define HCOMM_STATUS_TRUE_OFFSET_SFT 2 > > +} __attribute__((packed)); > > Can you please prefer '__rte_packed' instead of the > '__attribute__((packed))'? > If you recognized I have updated all the occurrences in next-net already > while > rebasing on top of main repo. But please send new patches according it. > Sure, can do that. Thanks