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 D3BD8A0613 for ; Fri, 27 Sep 2019 15:23:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A74331BEA4; Fri, 27 Sep 2019 15:23:29 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id BF6C91BEA4 for ; Fri, 27 Sep 2019 15:23:27 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Sep 2019 06:23:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,555,1559545200"; d="scan'208";a="183974891" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by orsmga008.jf.intel.com with ESMTP; 27 Sep 2019 06:23:25 -0700 Received: from irsmsx106.ger.corp.intel.com ([169.254.8.184]) by irsmsx110.ger.corp.intel.com ([169.254.15.189]) with mapi id 14.03.0439.000; Fri, 27 Sep 2019 14:21:09 +0100 From: "Loftus, Ciara" To: "Ye, Xiaolong" CC: "dev@dpdk.org" , "Laatz, Kevin" , "Richardson, Bruce" Thread-Topic: [PATCH 2/3] net/af_xdp: support pinning of IRQs Thread-Index: AQHVbvTpFU9Ye2pnlUKysFwBtg/8Iac61YqAgAS3ZMA= Date: Fri, 27 Sep 2019 13:21:08 +0000 Message-ID: <74F120C019F4A64C9B78E802F6AD4CC27921D015@IRSMSX106.ger.corp.intel.com> References: <20190919141520.4227-1-ciara.loftus@intel.com> <20190919141520.4227-3-ciara.loftus@intel.com> <20190924141233.GA67866@intel.com> In-Reply-To: <20190924141233.GA67866@intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzZjY2MxY2ItMDhlYS00MDg5LWJhZTQtMmZkMTgyYjM0OWIzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoid2Yxcloza3EwVnVvZXBLTTAyWTEyZ1BIYVVYMlMzMnJWWm1EMng5bXZqZzBVZ2Z0SmIwaFN4VCtVaG0xdG9VNSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 2/3] net/af_xdp: support pinning of IRQs 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" [snip] > >+ > >+static void > >+configure_irqs(struct pmd_internals *internals, uint16_t rx_queue_id) > >+{ > >+ int coreid =3D internals->queue_irqs[rx_queue_id]; > >+ char driver[NAME_MAX]; > >+ uint16_t netdev_qid =3D rx_queue_id + internals->start_queue_idx; > >+ regex_t r; > >+ int interrupt; > >+ > >+ if (coreid < 0) > >+ return; > >+ > >+ if (coreid > (get_nprocs() - 1)) { > >+ AF_XDP_LOG(ERR, "Affinitisation failed - invalid coreid %i\n", > >+ coreid); > >+ return; > >+ } >=20 > I think we can combine above 2 sanity checks together. >=20 Hi Xiaolong, Thanks for your review. I agree with all of your feedback except this one. configure_irqs() is called for every queue. The queues with no affinity hav= e a coreid initialized to -1. So coreid < 0 is a valid value and we should = return with no error. However for the case where coreid > nprocs, this is a= n actual error and we should report that with a log. What do you think? Thanks, Ciara [snip] > >@@ -697,6 +996,8 @@ eth_rx_queue_setup(struct rte_eth_dev *dev, > > goto err; > > } > > > >+ configure_irqs(internals, rx_queue_id); > >+ > > rxq->fds[0].fd =3D xsk_socket__fd(rxq->xsk); > > rxq->fds[0].events =3D POLLIN; > > > >@@ -834,6 +1135,39 @@ parse_name_arg(const char *key __rte_unused, > > return 0; > > } > >