Message ID | 1549541873-17403-2-git-send-email-arybchenko@solarflare.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Ferruh Yigit |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AF3D01B565; Thu, 7 Feb 2019 13:18:44 +0100 (CET) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 6D82E1B4CB; Thu, 7 Feb 2019 13:18:18 +0100 (CET) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us3.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 4363C600057; Thu, 7 Feb 2019 12:18:17 +0000 (UTC) Received: from ocex03.SolarFlarecom.com (10.20.40.36) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 7 Feb 2019 04:18:10 -0800 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Thu, 7 Feb 2019 04:18:09 -0800 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id x17CI82v013195; Thu, 7 Feb 2019 12:18:08 GMT Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 121261613EB; Thu, 7 Feb 2019 12:18:08 +0000 (GMT) From: Andrew Rybchenko <arybchenko@solarflare.com> To: <dev@dpdk.org> CC: Ivan Malov <ivan.malov@oktetlabs.ru>, <stable@dpdk.org> Date: Thu, 7 Feb 2019 12:17:24 +0000 Message-ID: <1549541873-17403-2-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1549541873-17403-1-git-send-email-arybchenko@solarflare.com> References: <1549541873-17403-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24412.006 X-TM-AS-Result: No-1.651500-4.000000-10 X-TMASE-MatchedRID: guf1jZ5JCXCioinUBRkHmimjEOrcO6AyI9yVcHNDU7are7bPW6Vx7pAZ ruLuPa14rEyNGiLEMZyAMuqetGVetiVvu9chHp+mavP8b9lJtWr6C0ePs7A07ezHZYTfB1+Vc2X FUYw4qQXztJSsZlwmFWfmQoDuFJT5ldj01YxM7mClAH/ERZ6adAwl2zwR43tDREaHw4EMn/vhby oor+qWLG0K7YSIk0sE2kC7SwvGlKhDwb7Jglhh1lFkOwaJdCKgviPEqcclEtxVyvbTg/runA== X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10-1.651500-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24412.006 X-MDID: 1549541897-1Q9xrOna7GtZ Subject: [dpdk-dev] [PATCH 01/30] net/sfc: log port ID as 16-bit unsigned integer on panic X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
net/sfc: improve multi-process support
|
|
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | warning | coding style issues |
ci/mellanox-Performance-Testing | success | Performance Testing PASS |
ci/intel-Performance-Testing | success | Performance Testing PASS |
Commit Message
Andrew Rybchenko
Feb. 7, 2019, 12:17 p.m. UTC
From: Ivan Malov <ivan.malov@oktetlabs.ru> Fixes: f8244c6399d9 ("ethdev: increase port id range") Cc: stable@dpdk.org Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> --- drivers/net/sfc/sfc_debug.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On 2/7/2019 12:17 PM, Andrew Rybchenko wrote: > From: Ivan Malov <ivan.malov@oktetlabs.ru> > > Fixes: f8244c6399d9 ("ethdev: increase port id range") > Cc: stable@dpdk.org > > Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> > Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> > --- > drivers/net/sfc/sfc_debug.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/sfc/sfc_debug.h b/drivers/net/sfc/sfc_debug.h > index 6b600ff4d..62f3937e8 100644 > --- a/drivers/net/sfc/sfc_debug.h > +++ b/drivers/net/sfc/sfc_debug.h > @@ -27,7 +27,8 @@ > do { \ > const struct sfc_adapter *_sa = (sa); \ > \ > - rte_panic("sfc " PCI_PRI_FMT " #%" PRIu8 ": " fmt "\n", \ > + rte_panic("sfc " PCI_PRI_FMT \ > + " #%" PRIu16 ": " fmt "\n", \ > _sa->pci_addr.domain, _sa->pci_addr.bus, \ > _sa->pci_addr.devid, _sa->pci_addr.function, \ > _sa->port_id, ##args); \ > Overall it may not be good idea to call rte_panic() from driver. rte_panic() cause the DPDK application to terminate, if a driver fails application may prefer to handle that error and continue to run, so terminate decision should be from application not library. Can you please double check if rte_panic() usages in the driver can be converted to error reporting?
Hi Ferruh, On 2/8/19 1:13 PM, Ferruh Yigit wrote: > On 2/7/2019 12:17 PM, Andrew Rybchenko wrote: >> From: Ivan Malov <ivan.malov@oktetlabs.ru> >> >> Fixes: f8244c6399d9 ("ethdev: increase port id range") >> Cc: stable@dpdk.org >> >> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> >> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> >> --- >> drivers/net/sfc/sfc_debug.h | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/net/sfc/sfc_debug.h b/drivers/net/sfc/sfc_debug.h >> index 6b600ff4d..62f3937e8 100644 >> --- a/drivers/net/sfc/sfc_debug.h >> +++ b/drivers/net/sfc/sfc_debug.h >> @@ -27,7 +27,8 @@ >> do { \ >> const struct sfc_adapter *_sa = (sa); \ >> \ >> - rte_panic("sfc " PCI_PRI_FMT " #%" PRIu8 ": " fmt "\n", \ >> + rte_panic("sfc " PCI_PRI_FMT \ >> + " #%" PRIu16 ": " fmt "\n", \ >> _sa->pci_addr.domain, _sa->pci_addr.bus, \ >> _sa->pci_addr.devid, _sa->pci_addr.function, \ >> _sa->port_id, ##args); \ >> > Overall it may not be good idea to call rte_panic() from driver. rte_panic() > cause the DPDK application to terminate, if a driver fails application may > prefer to handle that error and continue to run, so terminate decision should be > from application not library. > > Can you please double check if rte_panic() usages in the driver can be converted > to error reporting? Thanks a lot for reminder. We use it in few places, but even those can be improved. We'll do it. Andrew.
diff --git a/drivers/net/sfc/sfc_debug.h b/drivers/net/sfc/sfc_debug.h index 6b600ff4d..62f3937e8 100644 --- a/drivers/net/sfc/sfc_debug.h +++ b/drivers/net/sfc/sfc_debug.h @@ -27,7 +27,8 @@ do { \ const struct sfc_adapter *_sa = (sa); \ \ - rte_panic("sfc " PCI_PRI_FMT " #%" PRIu8 ": " fmt "\n", \ + rte_panic("sfc " PCI_PRI_FMT \ + " #%" PRIu16 ": " fmt "\n", \ _sa->pci_addr.domain, _sa->pci_addr.bus, \ _sa->pci_addr.devid, _sa->pci_addr.function, \ _sa->port_id, ##args); \