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 3CF4243900; Fri, 19 Jan 2024 17:30:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC4924029F; Fri, 19 Jan 2024 17:30:42 +0100 (CET) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) by mails.dpdk.org (Postfix) with ESMTP id 79F8F40279 for ; Fri, 19 Jan 2024 17:30:41 +0100 (CET) Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-559d3fbed6bso1155159a12.1 for ; Fri, 19 Jan 2024 08:30:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1705681841; x=1706286641; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=qdHwqea5XTrNW50XKVuoJuOxJ44hJ7Sc1AOXnzCbjLo=; b=VgXluI/TbbIk8EBjOoDgpnlgieakF76yD5bjGrAYp1Vkcdr15TENySZOitPiaqbvvn NREPyd7voLVQcTFxkzIia6rGw9p83jTbZ+tyAbpIaQe2Q9k8oJ+hxiOoNAueiajOjMGq 8+iqywG83xCgz8pPHJXZFPayZGVL1BU2/DQgH1wtXNIJgpPmoOi6x2OlceUByQXvyQf9 2x0FhiDREwhCkL86t8d01homa3+P1kvBFTYN22AnoWdoiGoNMQVCxZGZkbFZT9MKrMZE T0kuxeR+hYp7ATZ+OPMxaGjJYud8A+tp4mtjMWxBHleF+F0CtdcLnQk517gSM5gM8kuH ZB6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705681841; x=1706286641; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qdHwqea5XTrNW50XKVuoJuOxJ44hJ7Sc1AOXnzCbjLo=; b=lv0HghMcqlTO8AdR5YzFGehgdqhmUgNIMOgfKdddzd66x1EitplQ1d6d1wqTMjZgAc C2LFAPMK6bdg8O+KXe+7Ro0D3WDMG6V78dlUolQ+1S+60UT799CrTBzO4jPNckAjk8cF kwGOCMqR77a++6brDFqbgnsICPah86/t2sRayeA73+UbXWOB/nqYEM34NARN2KYQ2vaH c0yslH1m/KLrsu4tUJi0cEDwTzp1TKFjkWVp9BOMFrBouqramBUEOdwX41JIE20u/kdB 10S1TZmMPObuIuIOBy5YnE49edgjMsi9r8aMpreH3WVJpwow7LCQLxpow4HL40sdyZsh lfVA== X-Gm-Message-State: AOJu0Yx0UK8LVcsqWEhUf2lply0zakAZGKBj/ZtnNZs3Lr+9FoHRYTbX IKTycl+URf6IFIXugJbGFy1dYIjgHbVHSu3S0zEBIhhU7l0l7qrwfmivmHBidQ5X04XglW9Dv9U QFKlpxKN2XaVZZ4A/OwebnzyhLF3sZ/7h6S7x X-Google-Smtp-Source: AGHT+IGMxKmfeNn/llKdkgVcWGYPzRvguF9fyPOsTqJDx7BIsHmobNk9aJn2nuUmSG82wBQe/zYYj5TwifOKugAITpE= X-Received: by 2002:a17:907:12c7:b0:a26:9876:ae88 with SMTP id vp7-20020a17090712c700b00a269876ae88mr14776ejb.73.1705681840872; Fri, 19 Jan 2024 08:30:40 -0800 (PST) MIME-Version: 1.0 References: <20231222153953.1266615-1-rushilg@google.com> <20240119142650.3504824-1-rushilg@google.com> <18ba2c41-1288-41cc-8359-b93570701126@amd.com> In-Reply-To: <18ba2c41-1288-41cc-8359-b93570701126@amd.com> From: Rushil Gupta Date: Fri, 19 Jan 2024 22:00:28 +0530 Message-ID: Subject: Re: [v3] net/gve: enable imissed stats for GQ format To: Ferruh Yigit Cc: junfeng.guo@intel.com, jeroendb@google.com, joshwash@google.com, dev@dpdk.org Content-Type: multipart/alternative; boundary="0000000000003a303f060f4f00d2" 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 --0000000000003a303f060f4f00d2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I misinterpreted your comment earlier and prefixed memzone variable name with "gve" instead of memzone name. Will fix it in v4. Thanks! On Fri, Jan 19, 2024 at 8:55=E2=80=AFPM Ferruh Yigit = wrote: > On 1/19/2024 2:26 PM, Rushil Gupta wrote: > > Read from shared region to retrieve imissed statistics for GQ from > device. > > > > Signed-off-by: Rushil Gupta > > Reviewed-by: Joshua Washington > > > > <...> > > > +static int > > +gve_alloc_stats_report(struct gve_priv *priv, > > + uint16_t nb_tx_queues, uint16_t nb_rx_queues) > > +{ > > + char z_name[RTE_MEMZONE_NAMESIZE]; > > + int tx_stats_cnt; > > + int rx_stats_cnt; > > + > > + tx_stats_cnt =3D (GVE_TX_STATS_REPORT_NUM + NIC_TX_STATS_REPORT_N= UM) > * > > + nb_tx_queues; > > + rx_stats_cnt =3D (GVE_RX_STATS_REPORT_NUM + NIC_RX_STATS_REPORT_N= UM) > * > > + nb_rx_queues; > > + priv->stats_report_len =3D sizeof(struct gve_stats_report) + > > + sizeof(struct stats) * (tx_stats_cnt + rx_stats_cnt); > > + > > + snprintf(z_name, sizeof(z_name), "stats_report_%s", priv->pci_dev= -> > device.name); > > + priv->gve_stats_report_mem =3D rte_memzone_reserve_aligned(z_name= , > > + priv->stats_report_len, > > + rte_socket_id(), > > + RTE_MEMZONE_IOVA_CONTIG, PAGE_SIZE); > > > > Adding 'gve_' prefix to memzone name comment seems missed. > > --0000000000003a303f060f4f00d2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I misinterpreted your comment earlier and prefixed memzone= variable name with "gve" instead of memzone name. Will fix it in= v4. Thanks!

On Fri, Jan 19, 2024 at 8:55=E2=80=AFPM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
On = 1/19/2024 2:26 PM, Rushil Gupta wrote:
> Read from shared region to retrieve imissed statistics for GQ from dev= ice.
>
> Signed-off-by: Rushil Gupta <
rushilg@google.com>
> Reviewed-by: Joshua Washington <joshwash@google.com>
>

<...>

> +static int
> +gve_alloc_stats_report(struct gve_priv *priv,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0uint16_t nb_tx_queues= , uint16_t nb_rx_queues)
> +{
> +=C2=A0 =C2=A0 =C2=A0char z_name[RTE_MEMZONE_NAMESIZE];
> +=C2=A0 =C2=A0 =C2=A0int tx_stats_cnt;
> +=C2=A0 =C2=A0 =C2=A0int rx_stats_cnt;
> +
> +=C2=A0 =C2=A0 =C2=A0tx_stats_cnt =3D (GVE_TX_STATS_REPORT_NUM + NIC_T= X_STATS_REPORT_NUM) *
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0nb_tx_queues;
> +=C2=A0 =C2=A0 =C2=A0rx_stats_cnt =3D (GVE_RX_STATS_REPORT_NUM + NIC_R= X_STATS_REPORT_NUM) *
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0nb_rx_queues;
> +=C2=A0 =C2=A0 =C2=A0priv->stats_report_len =3D sizeof(struct gve_s= tats_report) +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sizeof(struct stats) = * (tx_stats_cnt + rx_stats_cnt);
> +
> +=C2=A0 =C2=A0 =C2=A0snprintf(z_name, sizeof(z_name), "stats_repo= rt_%s", priv->pci_dev->device.name);
> +=C2=A0 =C2=A0 =C2=A0priv->gve_stats_report_mem =3D rte_memzone_res= erve_aligned(z_name,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0priv->stats_report_len,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0rte_socket_id(),
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0RTE_MEMZONE_IOVA_CONTIG, PAGE_SIZE);
>

Adding 'gve_' prefix to memzone name comment seems missed.

--0000000000003a303f060f4f00d2--