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 41E1BA00E6 for ; Wed, 10 Jul 2019 18:05:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D96395B3E; Wed, 10 Jul 2019 18:05:05 +0200 (CEST) Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by dpdk.org (Postfix) with ESMTP id 427833195 for ; Wed, 10 Jul 2019 18:05:04 +0200 (CEST) Received: by mail-pf1-f193.google.com with SMTP id g2so1326728pfq.0 for ; Wed, 10 Jul 2019 09:05:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FuQfnTB2OcV+3ednkelWncOYAXX2y0TQxtUfc9/m3mc=; b=01Mwk9e5XKmtP9DuuZjax+hx2fG3zo71JbjlCRy8tQtSif82FbVMFbEYXPmONXUOU/ TwIP6AhvKqW0JCotYZdjh0AvugV+95YGAaUr9kPs1HmpA28zldIvVK+nu0yUh6ce0zHI 9475XGp7EHRQWopT2fIAmSnHMqe8zWpcfPS4Cxi+gAPALDx3d3TkW6GtW0FQ9vjghbOF oCGs5I+6OMZpvwYe0IKB1rWRrCpJN71Cmn2aAH6hQd/kdMPBPs2QQgIzN/xukdW2qt3N taviZVS7wVlJ3pTVFRI9xZjXNFsO+9YWQB6UbCW6VNLp4qg8CMj7cWCRIn89HhAsq+EF UyqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FuQfnTB2OcV+3ednkelWncOYAXX2y0TQxtUfc9/m3mc=; b=VLICqaihPicyStvmsTOHfz2LhD+uwyNdRI1jSxJAQZNKy8NVTmsH6pqvT2y0AAHnTO FRpL78x0mbXYV3AAoiF6nCnProUs9H9Hc1ahD1EMaO1CYBvO4zVNmQ+t1TrvbFSYjm+f LURJzbooOZL7iqSzKIejVAEZ+sFF9FG+68WiidG6+MOTRoZG7y1bPWD2vEGCjLqMFaPC /ArlRmUCznNDrbI82QSWIlsESXnMliGbtGNTDQLFVMsNMUF4iuU4CgFGmaACvDJ5x4nz 7dJ/zctv6yfy4bded3IkMYjfH7cOzrH5dvuxXErpNCC74i2EvtHDda3hBAy/zx0ZDSYw Af0g== X-Gm-Message-State: APjAAAVRPq1PIk91j+NvZR1aMYeDQnovKg621EUCUHxk/4jwtAmwuUB4 DeK8JVdOdMyEu1nOA0FZbujHmw== X-Google-Smtp-Source: APXvYqygaIms2xQ4O3ZmOgU+9PPrEiV4nEV02U5ypyeaSy6+YBspr8t5/w1rDkqlccR16L8OQxjOnw== X-Received: by 2002:a63:4104:: with SMTP id o4mr39360341pga.345.1562774703139; Wed, 10 Jul 2019 09:05:03 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id e124sm4766562pfh.181.2019.07.10.09.05.02 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 10 Jul 2019 09:05:03 -0700 (PDT) Date: Wed, 10 Jul 2019 09:04:56 -0700 From: Stephen Hemminger To: Cc: 27ee549a-d01b-21a5-4a0b-a7e5594b38c0@intel.com, , Ferruh Yigit , "John W. Linville" Message-ID: <20190710090456.4bfa5833@hermes.lan> In-Reply-To: <20190710144630.14926-1-kkanas@marvell.com> References: <20190710144630.14926-1-kkanas@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [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 Wed, 10 Jul 2019 16:46:30 +0200 wrote: > > +#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) == -1) { > - PMD_LOG(ERR, > - "%s: ioctl failed (SIOCGIFINDEX)", > - name); > + PMD_LOG_ERRNO(ERR, "%s: ioctl failed (SIOCGIFINDEX)", name); > return -1; This is wrong. The ioctl sets errno not rte_errno. Why not? PMD_LOG(ERR, "%s: ioctl failed (SIOCGIFINDEX): %s", name, strerror(errno));