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 CEEB2A0487 for ; Fri, 5 Jul 2019 11:35:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A37F52E83; Fri, 5 Jul 2019 11:35:14 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 0D53E1BDEB for ; Fri, 5 Jul 2019 11:35:12 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x659Pa9C008822; Fri, 5 Jul 2019 02:35:12 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=pfpt0818; bh=qYs/JykxeOusMvAiL8LcmWCVRFG3f63h4u9CCeru4NY=; b=RmRnXGao5zWD/s5LKj8rihtKDLOahi7yrffogc6HqhgVIWBWqObtOgmRjSBTIy1tNZnw 4yXyPs4gZ/V7ueeAgpy/dgscigdG+E1QMfvypGAGf80RaGJFDLCKnCWJrwOQ6Muc/HkK 2Kd0w6XH6CrbE/qX+7q+UCkt+YOFq5aKY0Z+BBUQR3HBze2vjIH/VEzBDeg0cRaHRrso FjAh5swJn6QDb+7pXwlsSOx4QJsIIaO967Tix7y24MHRkLHru3nCxWpcB/3c3z0scfhA Q8PZyCZVih5AHn1s52zCvHvVswP0sqRhocX5aGHCEJ+TCqPrpsvOSnYKT7Ir+Q8eCHLJ Gg== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 2thjyrb8dv-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 05 Jul 2019 02:35:10 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 5 Jul 2019 02:35:08 -0700 Received: from NAM01-BN3-obe.outbound.protection.outlook.com (104.47.33.50) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Fri, 5 Jul 2019 02:35:08 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qYs/JykxeOusMvAiL8LcmWCVRFG3f63h4u9CCeru4NY=; b=pw5nxji1U8CFIkXcHF0DjVVpH9UeoR/4Bq7FY7EBDMN3VOFW0l1QbZTZvmySaEMWIYYXzyYlAmpvkULgw5uBIHmOxh9qGLw2G0KxV2412SMeBx4cgM2UYzLrt8NE9fiplOcRa/wMHT6MEdmuAd0w7zFZAI4p2wUbi9uCyXwAxFc= Received: from MN2PR18MB2640.namprd18.prod.outlook.com (20.179.81.96) by MN2PR18MB2720.namprd18.prod.outlook.com (20.179.20.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.16; Fri, 5 Jul 2019 09:35:06 +0000 Received: from MN2PR18MB2640.namprd18.prod.outlook.com ([fe80::d050:30de:6ad1:a3e8]) by MN2PR18MB2640.namprd18.prod.outlook.com ([fe80::d050:30de:6ad1:a3e8%7]) with mapi id 15.20.2052.019; Fri, 5 Jul 2019 09:35:06 +0000 From: Krzysztof Kanas To: Ferruh Yigit CC: Krzysztof Kanas , "dev@dpdk.org" , "John W. Linville" Thread-Topic: [EXT] Re: [dpdk-dev] [PATCH] net/af_packet: append system error to error msgs Thread-Index: AQHVMnZIJFKwfgOQ/kiBZ2rY/Fh00Ka60ECAgAD0rAA= Date: Fri, 5 Jul 2019 09:35:06 +0000 Message-ID: <20190705093504.GA6680@kk-box-0> References: <20190704143905.8704-1-kkanas@marvell.com> <1c24f2ec-fe4e-0cef-2d83-0f1d139c0bf7@intel.com> In-Reply-To: <1c24f2ec-fe4e-0cef-2d83-0f1d139c0bf7@intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [199.233.58.37] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 93883cca-8a75-4397-e42f-08d7012c10d6 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:MN2PR18MB2720; x-ms-traffictypediagnostic: MN2PR18MB2720: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1201; x-forefront-prvs: 008960E8EC x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(7916004)(4636009)(376002)(346002)(136003)(396003)(39850400004)(366004)(189003)(199004)(25786009)(66066001)(4326008)(256004)(68736007)(76176011)(86362001)(1076003)(7736002)(26005)(8936002)(102836004)(81156014)(53546011)(71190400001)(6916009)(71200400001)(2906002)(8676002)(6506007)(81166006)(305945005)(99286004)(6116002)(3846002)(9686003)(6512007)(73956011)(53936002)(6436002)(6246003)(54906003)(229853002)(6486002)(33656002)(64756008)(66476007)(446003)(11346002)(66946007)(66446008)(33716001)(14454004)(66556008)(5660300002)(316002)(76116006)(476003)(478600001)(186003)(91956017)(486006); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB2720; H:MN2PR18MB2640.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: ptdJpzm7NzbsDVPqSd4vVzFYi9AOo127qHEF8rgGQ2B/dwtx8WEvjnh4a+cDI2ygnIrFKyv3r18AtXN6lHrtVceQb5lmX0bpmB6nLZ+aC//JIeIkmYJxNAqUFlHie3HEa0pWa+OtmfXjtblQEz+pS6DdAOR2clHyr2RhgCNRMakLWaWFxsCPhWJyOuzuS6yJzK3TYFoQXQLPGGAjRtjkXeOCvt3+LHwbO/V91DDS6lhR9y+zgoUgjds7Lbcv6OUgrIg65JYDSvrSy4EWvRjpbZ7/nAJFYz5g4UkuWFIcYAV5eaGOg+uHuAbvBApra1vtHUvVgKc3t8YJgoLY47ayuVPBnIRnTWFANlnBre7pbFyIC7vL1vCRHmGt/T3R4j/+JJwD85HNRYB84OYpDQqBfTQ5/KPXEOx7aN9DAnGVSnU= Content-Type: text/plain; charset="us-ascii" Content-ID: <16F8EE6AE1B2834BA2EFF4939464CA65@namprd18.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 93883cca-8a75-4397-e42f-08d7012c10d6 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jul 2019 09:35:06.7692 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: kkanas@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB2720 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-07-05_04:, , signatures=0 Subject: Re: [dpdk-dev] [EXT] Re: [PATCH] net/af_packet: append system error to error msgs 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 19-07-04 19:59, Ferruh Yigit wrote: > External Email >=20 > ---------------------------------------------------------------------- > On 7/4/2019 3:39 PM, kkanas@marvell.com wrote: > > From: Krzysztof Kanas > >=20 > > Print system error to make easier diagnosis of errors with af_packet. > >=20 > > Signed-off-by: Krzysztof Kanas > > --- > > drivers/net/af_packet/rte_eth_af_packet.c | 47 ++++++++++++----------- > > 1 file changed, 24 insertions(+), 23 deletions(-) > >=20 > > diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af= _packet/rte_eth_af_packet.c > > index f396f8b22a55..94ae4b13398d 100644 > > --- a/drivers/net/af_packet/rte_eth_af_packet.c > > +++ b/drivers/net/af_packet/rte_eth_af_packet.c > > @@ -13,7 +13,9 @@ > > #include > > #include > > #include > > +#include > > =20 > > +#include > > #include > > #include > > #include > > @@ -605,8 +607,8 @@ rte_pmd_init_internals(struct rte_vdev_device *dev, > > } > > if (ioctl(sockfd, SIOCGIFINDEX, &ifr) =3D=3D -1) { > > PMD_LOG(ERR, > > - "%s: ioctl failed (SIOCGIFINDEX)", > > - name); > > + "%s: ioctl failed (SIOCGIFINDEX):%s", > > + name, rte_strerror(errno)); >=20 > What do you think adding an new macro that adds ":%s, rte_strerror(errno)= " part > automatically and just change the macro on selected logs? >=20 I would rather not, as adding macro adds another indirection, and the=20 purpose of rte_strerror(errno) was just to help debugging wrong=20 arguments etc.. Also if in macro somebody uses function that changes errno, the=20 rte_strerror would give bad result. But no strong opinion on above. --=20 - Regards, Krzysztof(Chris) Kanas=