Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp181243rdh; Wed, 7 Feb 2024 01:15:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IHoPhU4aEbx77ocMG59SjDiDGnuTN9QXrhKqJ5+pspDjVKrxMWsGl0I59Yrx1VTo+MeALmL X-Received: by 2002:a05:6a20:3ca7:b0:19e:a5ae:229b with SMTP id b39-20020a056a203ca700b0019ea5ae229bmr1500709pzj.31.1707297322249; Wed, 07 Feb 2024 01:15:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707297322; cv=pass; d=google.com; s=arc-20160816; b=CUXaRFK7S71bxKKZAySnmWVnKZAr/Q2Hfo6Mfu2x1NAIt3iDaY3xL3FUuQvFT1i+S9 my4loCaopmOD4/X/5nMKvH67lXR1ulaaOiHwNUyPTP2SZkMv4nI/FG7RbqpIoyU22brp Lo2rJ9Ft2rWsKeziInXFClj/chwB+FX1138Fk1ThhgAfToicmd4IEunnGTvjibEF9eA7 LE3YhV38NmXvN7qAA3QLExganbwnXdTGeovITYNC/i/mz6IBK47XUNQxxckYF7frCovN IPv08auqMPw9DNr6FBLHCku5NaNW75HMQ+aPkWtb5I85hVevxlJsXoQDePii6XEpaN3N f4vw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=EvIZaWk0eDVyDx7v9H+HqK4CGJBev3wT2rsOSf4zlOU=; fh=1t/jX8i5U1myjpr/Q1l7hfRgvYIjzRErq9JRz4q/lNU=; b=RfQbx0IS5BeZYlMlaeAJDDk3nZMkL61PtuXWX3WhmS4t+4YEr2gdbtUUyPeT0GJgNt fQ6hrQHwF042LEYwdCiYgnZAYzO+4AmC9gbRtykwVeIIfEmgDRGQC1cKCsQMVzJDL9jX FR4hkpj81VqgwgoBSuaOgBdqpGQl2xTrHd1ACgO27yqmtmMbekGT1wd2og6uBLodQOwA 7z6GOuG2l59XDs+EFEM6Kh6U1v79Ftz+pTCZOvoYezcspQ4B0TNhRerXbr1uLBlEW2L3 DU1a/wNKsag3mCgBBQu5oqkhv1BHNNRO7dvUSvhHBXm47wrwRbvKpfNwrJ0ivNyBtLVM iqtA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=L+59NMtE; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-56104-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56104-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com X-Forwarded-Encrypted: i=2; AJvYcCUvjRfG3/SUWXNUlMEaxBu9GpM2Bv5dtDzLXPejJm2EgUlfev8dwu5yDFX2NLQLXtGlT6l26/mcekrebuPy5j+wfy6lnRbCwHDnRLh5vg== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id ck21-20020a056a02091500b005cdfb651211si1158006pgb.441.2024.02.07.01.15.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 01:15:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56104-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=L+59NMtE; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-56104-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56104-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 624DDB2622B for ; Wed, 7 Feb 2024 08:10:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A750200D2; Wed, 7 Feb 2024 08:10:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="L+59NMtE" Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 88FB8200A5 for ; Wed, 7 Feb 2024 08:10:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707293408; cv=none; b=sotw1uu3GUaWc1SpFiXnlRoomvfPI/GMZJXekJFicJobSTjaPLF0qEfyCTHJo4FVqvULOybrQNqzi61+7uTi0DPvMiHGRg0A27nBtYkhMhelsingz6YAJ6Vvmms7L9Yu5eB2qsdE/Bx/TalQlOtAUTFW8S6HlvQsNOkbEmquOSg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707293408; c=relaxed/simple; bh=K966EEW2bn57d0PJDaHnyDzFPTTkj9+73hl0MGCu8Mc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=neBXsUbpFtjvAoXhV7grhqEFeweRpko9tkvSfB+vskRKLUdMkAMJrKAxcF5QFSynqJoUIvdEwrQ/GIdh9p93o5wFukuUf2RxkXuwsb2roZOdOYUAhTIR+/9TeLhGi/qjpQlZw1Ak8FSMUC1pzOFwBbueEr9pzcbnUUXitf0kPmI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=L+59NMtE; arc=none smtp.client-ip=209.85.167.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-5116643c64eso593660e87.3 for ; Wed, 07 Feb 2024 00:10:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1707293403; x=1707898203; darn=vger.kernel.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=EvIZaWk0eDVyDx7v9H+HqK4CGJBev3wT2rsOSf4zlOU=; b=L+59NMtEl/B9hK+MGWcI8vnRaB8h2AeRpdCuPqZ2/g76cZK1kPPW8P7/lWpyMP1ZnQ tEF4teywvZCXswvqJ0C3y5iXiYL7U4ld70a/t80xktCl25tc2B2mGvTFR3yTZCDoQCus q4QumyBzJWeAYKXZbZeJOHCBKHZtytXYQkrS4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707293403; x=1707898203; 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=EvIZaWk0eDVyDx7v9H+HqK4CGJBev3wT2rsOSf4zlOU=; b=htW1C0EOJnb5JakKziZ3G8iuuaaCPAMu/RV7G1VWPObMR0FYt/bvv3tYswHHLRr+K8 FvkOQN7krHvfwMBz77pdZUU8xsFNYiur5F20mWmFUWsB7WE9p66zfW5r870JtFEur7Bc /1UafkIsfNjVleV3RpjagIiMX0RGpkZswJ7HYk47Owf/h66VNbztkLVIGl+9z0V0WvV7 Vlq+fXHcJnDhCZ7DOpCwvmdP3IBYYK1YI+MtdkAqLuj8mfUbC+i4znfNLk0I9plk1mim R1de3BXirF/Rwa3Ja+JvCtj/PoQ+NX0nOriHaNWloDDo3CMUWNeVm5XtiI3RrOys+jd3 suow== X-Gm-Message-State: AOJu0YxFEbvi2X40mUGMyo6Po7pyPruY/s3de4OqG0YlzahNrL5yYNiX F7frNCRZ6olqmSke7h0zyQcnD5IaXNEKgRkKr6BGTzL0HjKAYGrMU2TxntXO3+ho4ISLfPbrNgU B4J9PtsCATrA0JuySTKk5gNoeNVX60hm+3Qrl X-Received: by 2002:ac2:555a:0:b0:511:3ee1:4edf with SMTP id l26-20020ac2555a000000b005113ee14edfmr2938402lfk.68.1707293403453; Wed, 07 Feb 2024 00:10:03 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240207065207.3092004-1-srasheed@marvell.com> <20240207065207.3092004-6-srasheed@marvell.com> In-Reply-To: <20240207065207.3092004-6-srasheed@marvell.com> From: Kalesh Anakkur Purayil Date: Wed, 7 Feb 2024 13:39:51 +0530 Message-ID: Subject: Re: [PATCH net-next v6 5/8] octeon_ep_vf: add support for ndo ops To: Shinas Rasheed Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, hgani@marvell.com, vimleshk@marvell.com, sedara@marvell.com, egallen@redhat.com, mschmidt@redhat.com, pabeni@redhat.com, kuba@kernel.org, horms@kernel.org, wizhao@redhat.com, kheib@redhat.com, konguyen@redhat.com, Veerasenareddy Burru , Satananda Burla , "David S. Miller" , Eric Dumazet Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000ddbf4e0610c638d7" --000000000000ddbf4e0610c638d7 Content-Type: multipart/alternative; boundary="000000000000d7a04f0610c6385f" --000000000000d7a04f0610c6385f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Feb 7, 2024 at 12:23=E2=80=AFPM Shinas Rasheed wrote: > Add support for ndo ops to set MAC address, change MTU, get stats. > Add control path support to set MAC address, change MTU, get stats, > set speed, get and set link mode. > [Kalesh]: You are adding support for only one ndo hook ".ndo_get_stats64" in this patch. Am I missing something? > > Signed-off-by: Shinas Rasheed > --- > V6: > - No changes > > V5: > https://lore.kernel.org/all/20240129050254.3047778-6-srasheed@marvell.com= / > - No changes > > V4: > https://lore.kernel.org/all/20240108124213.2966536-6-srasheed@marvell.com= / > - Provide more stats in ndo_get_stats64 such as tx_dropped, rx_dropped > etc. > > V3: > https://lore.kernel.org/all/20240105203823.2953604-6-srasheed@marvell.com= / > - No changes > > V2: > https://lore.kernel.org/all/20231223134000.2906144-6-srasheed@marvell.com= / > - No changes > > V1: > https://lore.kernel.org/all/20231221092844.2885872-6-srasheed@marvell.com= / > > .../marvell/octeon_ep_vf/octep_vf_main.c | 58 +++++++++++++++++++ > 1 file changed, 58 insertions(+) > > diff --git a/drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c > b/drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c > index 562beed9af6a..ff879b1e846e 100644 > --- a/drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c > +++ b/drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c > @@ -186,6 +186,23 @@ static netdev_tx_t octep_vf_start_xmit(struct sk_buf= f > *skb, > return NETDEV_TX_OK; > } > > +int octep_vf_get_if_stats(struct octep_vf_device *oct) > [Kalesh]: You may want to make this function static. > +{ > + struct octep_vf_iface_rxtx_stats vf_stats; > + int ret, size; > + > + memset(&vf_stats, 0, sizeof(struct octep_vf_iface_rxtx_stats)); > [Kalesh]: You can avoid memset by initializing vf_stats =3D {}; > + ret =3D octep_vf_mbox_bulk_read(oct, OCTEP_PFVF_MBOX_CMD_GET_STAT= S, > + (u8 *)&vf_stats, &size); > + if (!ret) { > [Kalesh] For better alignment: if (ret) return ret; > + memcpy(&oct->iface_rx_stats, &vf_stats.iface_rx_stats, > + sizeof(struct octep_vf_iface_rx_stats)); > + memcpy(&oct->iface_tx_stats, &vf_stats.iface_tx_stats, > + sizeof(struct octep_vf_iface_tx_stats)); > + } > + return ret; > +} > + > int octep_vf_get_link_info(struct octep_vf_device *oct) > { > int ret, size; > @@ -199,6 +216,46 @@ int octep_vf_get_link_info(struct octep_vf_device > *oct) > return 0; > } > > +/** > + * octep_vf_get_stats64() - Get Octeon network device statistics. > + * > + * @netdev: kernel network device. > + * @stats: pointer to stats structure to be filled in. > + */ > +static void octep_vf_get_stats64(struct net_device *netdev, > + struct rtnl_link_stats64 *stats) > +{ > + struct octep_vf_device *oct =3D netdev_priv(netdev); > + u64 tx_packets, tx_bytes, rx_packets, rx_bytes; > + int q; > + > + tx_packets =3D 0; > + tx_bytes =3D 0; > + rx_packets =3D 0; > + rx_bytes =3D 0; > + for (q =3D 0; q < oct->num_oqs; q++) { > + struct octep_vf_iq *iq =3D oct->iq[q]; > + struct octep_vf_oq *oq =3D oct->oq[q]; > + > + tx_packets +=3D iq->stats.instr_completed; > + tx_bytes +=3D iq->stats.bytes_sent; > + rx_packets +=3D oq->stats.packets; > + rx_bytes +=3D oq->stats.bytes; > + } > + stats->tx_packets =3D tx_packets; > + stats->tx_bytes =3D tx_bytes; > + stats->rx_packets =3D rx_packets; > + stats->rx_bytes =3D rx_bytes; > + if (!octep_vf_get_if_stats(oct)) { > + stats->multicast =3D oct->iface_rx_stats.mcast_pkts; > + stats->rx_errors =3D oct->iface_rx_stats.err_pkts; > + stats->rx_dropped =3D > oct->iface_rx_stats.dropped_pkts_fifo_full + > + oct->iface_rx_stats.err_pkts; > + stats->rx_missed_errors =3D > oct->iface_rx_stats.dropped_pkts_fifo_full; > + stats->tx_dropped =3D oct->iface_tx_stats.dropped; > + } > +} > + > /** > * octep_vf_tx_timeout_task - work queue task to Handle Tx queue timeout= . > * > @@ -313,6 +370,7 @@ static const struct net_device_ops octep_vf_netdev_op= s > =3D { > .ndo_open =3D octep_vf_open, > .ndo_stop =3D octep_vf_stop, > .ndo_start_xmit =3D octep_vf_start_xmit, > + .ndo_get_stats64 =3D octep_vf_get_stats64, > .ndo_tx_timeout =3D octep_vf_tx_timeout, > .ndo_set_mac_address =3D octep_vf_set_mac, > .ndo_change_mtu =3D octep_vf_change_mtu, > -- > 2.25.1 > > > --=20 Regards, Kalesh A P --000000000000d7a04f0610c6385f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Feb 7, 2024 at 12:23=E2=80=AF= PM Shinas Rasheed <srasheed@marv= ell.com> wrote:
Add support for ndo ops to set MAC address, change MTU, get stats. Add control path support to set MAC address, change MTU, get stats,
set speed, get and set link mode.
[Kalesh]: You are ad= ding support for only one ndo hook ".ndo_get_stats64" in this pat= ch. Am I missing something?

Signed-off-by: Shinas Rasheed <srasheed@marvell.com>
---
V6:
=C2=A0 - No changes

V5: https://lore.kernel.or= g/all/20240129050254.3047778-6-srasheed@marvell.com/
=C2=A0 - No changes

V4: https://lore.kernel.or= g/all/20240108124213.2966536-6-srasheed@marvell.com/
=C2=A0 - Provide more stats in ndo_get_stats64 such as tx_dropped, rx_dropp= ed
=C2=A0 =C2=A0 etc.

V3: https://lore.kernel.or= g/all/20240105203823.2953604-6-srasheed@marvell.com/
=C2=A0 - No changes

V2: https://lore.kernel.or= g/all/20231223134000.2906144-6-srasheed@marvell.com/
=C2=A0 - No changes

V1: https://lore.kernel.or= g/all/20231221092844.2885872-6-srasheed@marvell.com/

=C2=A0.../marvell/octeon_ep_vf/octep_vf_main.c=C2=A0 =C2=A0 =C2=A0 | 58 +++= ++++++++++++++++
=C2=A01 file changed, 58 insertions(+)

diff --git a/drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c b/dr= ivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c
index 562beed9af6a..ff879b1e846e 100644
--- a/drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c
+++ b/drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c
@@ -186,6 +186,23 @@ static netdev_tx_t octep_vf_start_xmit(struct sk_buff = *skb,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 return NETDEV_TX_OK;
=C2=A0}

+int octep_vf_get_if_stats(struct octep_vf_device *oct)
[Kalesh]: You may want to make this function static.=C2=A0
+{
+=C2=A0 =C2=A0 =C2=A0 =C2=A0struct octep_vf_iface_rxtx_stats vf_stats;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0int ret, size;
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0memset(&vf_stats, 0, sizeof(struct octep_vf= _iface_rxtx_stats));
[Kalesh]: You can avoid memset by= initializing vf_stats =3D {};=C2=A0
+=C2=A0 =C2=A0 =C2=A0 =C2=A0ret =3D octep_vf_mbox_bulk_read(oct, OCTEP_PFVF= _MBOX_CMD_GET_STATS,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(u8 *)&vf_st= ats, &size);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0if (!ret) {
[Kalesh] For b= etter alignment:
if (ret)
=C2=A0 =C2=A0 =C2=A0return re= t;=C2=A0
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0memcpy(&oct->= ;iface_rx_stats, &vf_stats.iface_rx_stats,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 sizeof(struct octep_vf_iface_rx_stats));
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0memcpy(&oct->= ;iface_tx_stats, &vf_stats.iface_tx_stats,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 sizeof(struct octep_vf_iface_tx_stats));
+=C2=A0 =C2=A0 =C2=A0 =C2=A0}
+=C2=A0 =C2=A0 =C2=A0 =C2=A0return ret;
+}
+
=C2=A0int octep_vf_get_link_info(struct octep_vf_device *oct)
=C2=A0{
=C2=A0 =C2=A0 =C2=A0 =C2=A0 int ret, size;
@@ -199,6 +216,46 @@ int octep_vf_get_link_info(struct octep_vf_device *oct= )
=C2=A0 =C2=A0 =C2=A0 =C2=A0 return 0;
=C2=A0}

+/**
+ * octep_vf_get_stats64() - Get Octeon network device statistics.
+ *
+ * @netdev: kernel network device.
+ * @stats: pointer to stats structure to be filled in.
+ */
+static void octep_vf_get_stats64(struct net_device *netdev,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 struct rtnl_link_stats64 *stats)
+{
+=C2=A0 =C2=A0 =C2=A0 =C2=A0struct octep_vf_device *oct =3D netdev_priv(net= dev);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0u64 tx_packets, tx_bytes, rx_packets, rx_bytes;=
+=C2=A0 =C2=A0 =C2=A0 =C2=A0int q;
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0tx_packets =3D 0;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0tx_bytes =3D 0;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0rx_packets =3D 0;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0rx_bytes =3D 0;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0for (q =3D 0; q < oct->num_oqs; q++) { +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0struct octep_vf_iq = *iq =3D oct->iq[q];
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0struct octep_vf_oq = *oq =3D oct->oq[q];
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tx_packets +=3D iq-= >stats.instr_completed;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tx_bytes +=3D iq-&g= t;stats.bytes_sent;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rx_packets +=3D oq-= >stats.packets;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rx_bytes +=3D oq-&g= t;stats.bytes;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0}
+=C2=A0 =C2=A0 =C2=A0 =C2=A0stats->tx_packets =3D tx_packets;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0stats->tx_bytes =3D tx_bytes;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0stats->rx_packets =3D rx_packets;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0stats->rx_bytes =3D rx_bytes;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0if (!octep_vf_get_if_stats(oct)) {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0stats->multicast= =3D oct->iface_rx_stats.mcast_pkts;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0stats->rx_errors= =3D oct->iface_rx_stats.err_pkts;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0stats->rx_droppe= d =3D oct->iface_rx_stats.dropped_pkts_fifo_full +
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0oct->iface_rx_stats.= err_pkts;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0stats->rx_missed= _errors =3D oct->iface_rx_stats.dropped_pkts_fifo_full;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0stats->tx_droppe= d =3D oct->iface_tx_stats.dropped;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0}
+}
+
=C2=A0/**
=C2=A0 * octep_vf_tx_timeout_task - work queue task to Handle Tx queue time= out.
=C2=A0 *
@@ -313,6 +370,7 @@ static const struct net_device_ops octep_vf_netdev_ops = =3D {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 .ndo_open=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =3D octep_vf_open,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 .ndo_stop=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =3D octep_vf_stop,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 .ndo_start_xmit=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =3D octep_vf_start_xmit,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0.ndo_get_stats64=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0=3D octep_vf_get_stats64,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 .ndo_tx_timeout=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =3D octep_vf_tx_timeout,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 .ndo_set_mac_address=C2=A0 =C2=A0 =C2=A0=3D oct= ep_vf_set_mac,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 .ndo_change_mtu=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =3D octep_vf_change_mtu,
--
2.25.1




--
Regards,
Kalesh A P
--000000000000d7a04f0610c6385f-- --000000000000ddbf4e0610c638d7 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQiwYJKoZIhvcNAQcCoIIQfDCCEHgCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg3iMIIFDTCCA/WgAwIBAgIQeEqpED+lv77edQixNJMdADANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA5MTYwMDAwMDBaFw0yODA5MTYwMDAwMDBaMFsxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTEwLwYDVQQDEyhHbG9iYWxTaWduIEdDQyBS MyBQZXJzb25hbFNpZ24gMiBDQSAyMDIwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA vbCmXCcsbZ/a0fRIQMBxp4gJnnyeneFYpEtNydrZZ+GeKSMdHiDgXD1UnRSIudKo+moQ6YlCOu4t rVWO/EiXfYnK7zeop26ry1RpKtogB7/O115zultAz64ydQYLe+a1e/czkALg3sgTcOOcFZTXk38e aqsXsipoX1vsNurqPtnC27TWsA7pk4uKXscFjkeUE8JZu9BDKaswZygxBOPBQBwrA5+20Wxlk6k1 e6EKaaNaNZUy30q3ArEf30ZDpXyfCtiXnupjSK8WU2cK4qsEtj09JS4+mhi0CTCrCnXAzum3tgcH cHRg0prcSzzEUDQWoFxyuqwiwhHu3sPQNmFOMwIDAQABo4IB2jCCAdYwDgYDVR0PAQH/BAQDAgGG MGAGA1UdJQRZ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