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 C5303A00E6 for ; Thu, 11 Jul 2019 11:56:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 96FEB31FC; Thu, 11 Jul 2019 11:56:43 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 52BC12C6A for ; Thu, 11 Jul 2019 11:56:41 +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 x6B9pPKN004378; Thu, 11 Jul 2019 02:56:40 -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=qH7ncTxPg1RtIqpI/OvjzlDDuoYqQMpbik1lg9eCOcU=; b=h6nSoWu1bf9ys8k3KIpyeVV9SuqnobPlcVJg6eG+vxbmSBhArULK5gl4RIGH3LGCdbw7 +G0b7zCNijY56McfYI5DQBReRe1lPb6jbkwImBrMsvo9Km54EJaQbIXLUBS+usKkPM7T ijBS7yySZeOSoUlnxot9hVIMcTOW21xZpDfZMeClSaPjjPvv/o0gpNMK0HN7OT5EIBac IFxjeHjGXlpjFda2wa6f/Yt1q6yeFpGaWefAZWt+lb6z5DqvjJOckiWzaP+IAocPMOsz xNJNO2iQlf9XTNIUWJgz7vEgqMHM2AIz19B7q6ihLQ54HNLS/iT21Zh92RoxkhlNgEmi KQ== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 2tnq21ah55-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 11 Jul 2019 02:56:39 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 11 Jul 2019 02:56:36 -0700 Received: from NAM05-CO1-obe.outbound.protection.outlook.com (104.47.48.58) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 11 Jul 2019 02:56:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cVTJCjMe3XVm7kj0IinGJv0Mv16P/XLf9vD/RaK1AVTl9TGiiDvCsE6TeaPHoT0x7ZSqnYJJiDYydcZWvu7OYrh9gKMryGjBjtOzwDJ+zeU35PTEz9iWToU33GBLlIQnuk9mCVaeXk+Fn0tCfdwfZPnO4pbSVu//MpDFbrN/qR2+VUJCFzOV2QaGoK/8pSbN0OYW5WyaV1QpnBFJnDVhINjvwy6SbqLLhJjCcbyhk2G5d9cXddO+FpbLuHFtEqrONUhn/bf0n77qfpYkq7sb5Bti8BxNoL9VXjCTjFUNfusBtR0fCOX8118CN9AC8hxRF5F9vwLesTsdbmkv7N2Mhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qH7ncTxPg1RtIqpI/OvjzlDDuoYqQMpbik1lg9eCOcU=; b=Xbhz3Df9ZaM4B1wOr2W6qGAIzOxjXPrErmu+rdENliTNtbCujcVBYf0B+bdU9YzBxkWI+tTl79DHcKWOxA19PJOnDRXvNs5VnAmPCtlnXXnM78PMAjlUFOCPNVta0uoevGmkJsul7Zw1i/ShmydF/5AsuLkGM9vzw3G4cFIsy/9qGmzjKiHLcLAzic94HKQHzqe3OJ+rli/ZoIMtcKR+QI0DOZ4E4HTQIyjqeNivvTLD3STaI7sNW/Eqe8WMQRegZt8S94bBS1P39fzMDPVlJqW+R1x56f0+UbQrrZPYpK4jP6GwP3ZMcbu7mNdDCEUask+IFivNf0hdCZIh1lkvEA== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=marvell.com;dmarc=pass action=none header.from=marvell.com;dkim=pass header.d=marvell.com;arc=none 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=qH7ncTxPg1RtIqpI/OvjzlDDuoYqQMpbik1lg9eCOcU=; b=GXGZ+XH6tsU5HReiSyWp1souvx6uhLf00/UTt3g7CqZck8RuL0w0ffMEGrIhdTXWYoZ9IwiGqApfKICcI294C3LHnzHev62U9Az/8svaWGXMsPBh4oHjwVM9FNqg39JJKOQ0RD10mLFweebbc4SkB4HN1AiiiqCTG93Aox/08xE= 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.2073.10; Thu, 11 Jul 2019 09:56:32 +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.2073.008; Thu, 11 Jul 2019 09:56:32 +0000 From: Krzysztof Kanas To: Stephen Hemminger CC: Krzysztof Kanas , "27ee549a-d01b-21a5-4a0b-a7e5594b38c0@intel.com" <27ee549a-d01b-21a5-4a0b-a7e5594b38c0@intel.com>, "dev@dpdk.org" , Ferruh Yigit , "John W. Linville" Thread-Topic: [EXT] Re: [dpdk-dev] [PATCH v2] net/af_packet: add string error for system errors Thread-Index: AQHVNy5kUTkPAXYCQUijybjol2hBf6bEBBIAgAErY4A= Date: Thu, 11 Jul 2019 09:56:32 +0000 Message-ID: <20190711095629.GA11907@kk-box-0> References: <20190710144630.14926-1-kkanas@marvell.com> <20190710090456.4bfa5833@hermes.lan> In-Reply-To: <20190710090456.4bfa5833@hermes.lan> 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: b96d8b03-7b19-45c1-a965-08d705e60da3 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:1824; x-forefront-prvs: 0095BCF226 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(7916004)(396003)(346002)(39860400002)(136003)(366004)(376002)(189003)(199004)(102836004)(305945005)(86362001)(66066001)(76176011)(33716001)(6916009)(4326008)(25786009)(53546011)(6436002)(6486002)(478600001)(68736007)(229853002)(71190400001)(186003)(5660300002)(2906002)(71200400001)(6506007)(1076003)(26005)(6116002)(3846002)(66946007)(8936002)(476003)(91956017)(64756008)(6512007)(9686003)(66556008)(66446008)(33656002)(8676002)(81156014)(81166006)(66476007)(486006)(256004)(99286004)(446003)(14454004)(53936002)(54906003)(6246003)(316002)(7736002)(11346002)(76116006); 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: ZGrP4Z6wbvQxRSyJcWk8pKxDGZUiOjBlT6YX/X93msITYx0zvxOG4Y1/YwkfkC9/1XWLMPUxlH53l8UCHi1MElWagXHlsh9AdOhdZhdnaYTff9e6QG2JgpMd3OJB0UJKJUfSrz3GXSfZp9FQ4Q7GgdxACyCPIW/9g8y3o7EBn9tEmOdredIkmR5pHjTDarBgmswABmei4Jihh1DqlTS9NSl4cI6/T0KLDd+qtYly8BLUanL/5j5I6JqeW1Wkrcm7ArjP+5H3jun0BCV065cA1RPYSQEmJ3DEKyPd84+b+TRu5vuCIzeQ/nkVNh+sTORIP+WOFlMx6kfyD/zkcLCH29sDr1QBD3G8fLiqMaZhbMZnFNoQqw6xEZlGlbFic41SJ0F9sEwxKiE+cl8Qp6qjboG92QK5PvD92LFUiu/oGHU= Content-Type: text/plain; charset="us-ascii" Content-ID: <4F6C7D0AD56C6D4A921E35DA1A00F3CC@namprd18.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: b96d8b03-7b19-45c1-a965-08d705e60da3 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jul 2019 09:56:32.3882 (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-11_01:, , signatures=0 Subject: Re: [dpdk-dev] [EXT] Re: [PATCH v2] net/af_packet: add string error for system errors 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-10 09:04, Stephen Hemminger wrote: > External Email >=20 > ---------------------------------------------------------------------- > On Wed, 10 Jul 2019 16:46:30 +0200 > wrote: >=20 > > =20 > > +#define PMD_LOG_ERRNO(level, fmt, args...) \ > > + rte_log(RTE_LOG_ ## level, af_packet_logtype, \ > > + "%s(): " fmt ":%s\n", __func__, ##args, rte_strerror(errno)) > > + > > static uint16_t > > eth_af_packet_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts= ) > > { > > @@ -603,9 +609,7 @@ rte_pmd_init_internals(struct rte_vdev_device *dev, > > return -1; > > } > > if (ioctl(sockfd, SIOCGIFINDEX, &ifr) =3D=3D -1) { > > - PMD_LOG(ERR, > > - "%s: ioctl failed (SIOCGIFINDEX)", > > - name); > > + PMD_LOG_ERRNO(ERR, "%s: ioctl failed (SIOCGIFINDEX)", name); > > return -1; >=20 > This is wrong. > The ioctl sets errno not rte_errno. I was following the documentation on rte_strerror, which states: For non-RTE-specific error codes, this function returns the value from=20 the libc strerror function. > >=20 > Why not? > PMD_LOG(ERR, "%s: ioctl failed (SIOCGIFINDEX): %s", > name, strerror(errno)); Ok, but rte_strerror uses strerror_r, although I am unsure this is=20 required here. --=20 - Regards, Krzysztof(Chris) Kanas=