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 92BD4A0613 for ; Fri, 27 Sep 2019 16:09:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4C0AA1BE96; Fri, 27 Sep 2019 16:09:12 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 783611BE84 for ; Fri, 27 Sep 2019 16:09:10 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Sep 2019 07:09:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,555,1559545200"; d="scan'208";a="341805979" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by orsmga004.jf.intel.com with ESMTP; 27 Sep 2019 07:09:07 -0700 Date: Fri, 27 Sep 2019 22:06:49 +0800 From: Ye Xiaolong To: "Loftus, Ciara" Cc: "dev@dpdk.org" , "Laatz, Kevin" , "Richardson, Bruce" Message-ID: <20190927140649.GB112560@intel.com> References: <20190919141520.4227-1-ciara.loftus@intel.com> <20190919141520.4227-3-ciara.loftus@intel.com> <20190924141233.GA67866@intel.com> <74F120C019F4A64C9B78E802F6AD4CC27921D015@IRSMSX106.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <74F120C019F4A64C9B78E802F6AD4CC27921D015@IRSMSX106.ger.corp.intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) 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" On 09/27, Loftus, Ciara wrote: >[snip] > >> >+ >> >+static void >> >+configure_irqs(struct pmd_internals *internals, uint16_t rx_queue_id) >> >+{ >> >+ int coreid = internals->queue_irqs[rx_queue_id]; >> >+ char driver[NAME_MAX]; >> >+ uint16_t netdev_qid = 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; >> >+ } >> >> I think we can combine above 2 sanity checks together. >> > >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 have 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 an actual error and we should report that with a log. >What do you think? It makes sense, thanks for the explanation. Thanks, Xiaolong > >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 = xsk_socket__fd(rxq->xsk); >> > rxq->fds[0].events = POLLIN; >> > >> >@@ -834,6 +1135,39 @@ parse_name_arg(const char *key __rte_unused, >> > return 0; >> > } >> > >