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 BF7B045A78; Tue, 1 Oct 2024 10:18:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B6A540B97; Tue, 1 Oct 2024 10:18:10 +0200 (CEST) Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) by mails.dpdk.org (Postfix) with ESMTP id 19D7540A6E for ; Tue, 1 Oct 2024 10:18:08 +0200 (CEST) Received: by mail-qt1-f171.google.com with SMTP id d75a77b69052e-4581d15c3e3so45840891cf.0 for ; Tue, 01 Oct 2024 01:18:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727770687; x=1728375487; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=z6KCxn2czqxe+oAJcq0JkNcHemIIifURIZBW0x9FUyk=; b=dvS9vAptibZjUDfYj6EOlPb05aTKsSXtg/WPETvaf/x4sFKzX1h1JQMED6gC4zj7tm ValTyNWn0TAyyzJslLAtwbgRVhSOSDxZy5oiZzUR4mzqyBktk5cG5AzGQSccQ5kYdI2j kctZ4bqVy7+K2fq9EfYZavbb87GzV6EOCYqG6WwcpHIoK3Pf3sHZxuA/L2se3Rm5bNbh hgIZqYiVy33Z7glNRQvB8VTlPrZYObVPa/wje4cQ8Nv3YxxYe3xmEGspSGA8IbQ2Zoet FE1yGfVnrZCAHGOrpsVtifLvg/PnFMInB9Cl2aU+BLTJU0ks6t70VGJLV/xALTBQhQZP 6+pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727770687; x=1728375487; h=content-transfer-encoding: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=z6KCxn2czqxe+oAJcq0JkNcHemIIifURIZBW0x9FUyk=; b=t9IpJ2jjREgy8uo25VxrgocfsjBRBFbINPEQd2nMC4gfl0dDSQ5iDGSCAl3a0vzhyH 8aY6UFVPYnvfd4eYXg+yBOscHAblQcMRtRQOvPINZLw9rjcwfJcx9BM9PhK74f+nYGDK ymjihF9B2iK/LDeykq0dX1gh7tsHYYJRXaqPh5kRs0XOy2AS/zlqjv+5ms3aztvcS8U5 hSPu1p9DzVsXLh5w1da1/JoY+bZ8M7gH/p8Z9uunKvLlqpWIta6guwPhQAi7Zr0zJ4AF H35U0cQY7qHwglMmrxyg77NOMHhZYPuS/upMCC7u2Qu/wZtKHGTdB5xNh7l+gX2ElYK5 dfgA== X-Forwarded-Encrypted: i=1; AJvYcCVXWcSXx2Ru6FSgUKxIr8BieTRaoRNucJZLiE4+VSKdoTYyJlnfgkztNhpI+dzrjvRcnZA=@dpdk.org X-Gm-Message-State: AOJu0YwRm58Xuu3kjpYV+yUdaDg1aHM36wSnKPYAn55maKHHAUZ0ELw0 utH9p9dAoLMAI2X/wZf8otyT5y5oDKFrrm/4vKVPn1epA6TsJuxecWBp7FAS10ZMmLb6dj6xRgX 7Qd2qMZuHxMxK7aC68VD/Ombh2M4NejWi X-Google-Smtp-Source: AGHT+IG9GTQVZmXU3TQIfk1atfqX1C0XYMxk9IAUgyVYDvtoGlRSspA/G2k6vU1DdDFvi+2HYOcuJTeunh13AJyQl94= X-Received: by 2002:a05:622a:1815:b0:458:4c86:4559 with SMTP id d75a77b69052e-45c9f2a4718mr228034291cf.53.1727770687382; Tue, 01 Oct 2024 01:18:07 -0700 (PDT) MIME-Version: 1.0 References: <20240827053259.12033-1-vattunuru@marvell.com> <20240920044347.1211530-1-vattunuru@marvell.com> In-Reply-To: <20240920044347.1211530-1-vattunuru@marvell.com> From: Jerin Jacob Date: Tue, 1 Oct 2024 13:47:41 +0530 Message-ID: Subject: Re: [PATCH v2 1/1] net/octeon_ep: add device removal event callback To: Vamsi Krishna Cc: jerinj@marvell.com, dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Fri, Sep 20, 2024 at 10:14=E2=80=AFAM Vamsi Krishna wrote: > > From: Vamsi Attunuru > > Adds an event callback to catch any device removal > event occurred during driver probe. This callback helps > in terminating the execution if there is any device removal > event during the driver probe. > > Also moved global register configuration into dev_configure() > routine and also validates register reads for any invalid > return values from hardware during driver probe. > > Signed-off-by: Vamsi Attunuru > --- > V2 changes: > * Corrected commit message > * Updated release notes > * Used UINT64_MAX macro. > > doc/guides/rel_notes/release_24_11.rst | 5 +++ > drivers/net/octeon_ep/cnxk_ep_vf.c | 2 + > drivers/net/octeon_ep/otx2_ep_vf.c | 2 + > drivers/net/octeon_ep/otx_ep_ethdev.c | 58 +++++++++++++++++++------- > drivers/net/octeon_ep/otx_ep_mbox.c | 11 +++++ > drivers/net/octeon_ep/otx_ep_vf.c | 2 + > 6 files changed, 64 insertions(+), 16 deletions(-) > > diff --git a/doc/guides/rel_notes/release_24_11.rst b/doc/guides/rel_note= s/release_24_11.rst > index 0ff70d9057..ffb2d13a76 100644 > --- a/doc/guides/rel_notes/release_24_11.rst > +++ b/doc/guides/rel_notes/release_24_11.rst > @@ -68,6 +68,11 @@ Removed Items > Also, make sure to start the actual text at the margin. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > > +* **Added device removal event callback in octeon_ep driver.** > + > + Added an event callback to catch any device removal event would occur = during > + driver probe. This callback helps in terminating the execution if ther= e is > + any device removal event during the driver probe. Since the user may not be impacted with this, This update may not be needed= . > > +static void > +otx_epdev_event_callback(const char *device_name, enum rte_dev_event_typ= e type, > + __rte_unused void *arg) > +{ > + if (type =3D=3D RTE_DEV_EVENT_REMOVE) > + otx_ep_info("Octeon epdev: %s has been removed!\n", devic= e_name); Please add good amount of comment here. i.e Purpose and how > + RTE_VERIFY(type !=3D RTE_DEV_EVENT_REMOVE); > +} > +