From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 9A70E20F for ; Mon, 22 May 2017 14:37:00 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2017 05:36:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,377,1491289200"; d="scan'208";a="105418654" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.81]) ([10.237.220.81]) by fmsmga006.fm.intel.com with ESMTP; 22 May 2017 05:36:58 -0700 To: Andrew Rybchenko , dev@dpdk.org, Sergio Gonzalez Monroy References: <1495023908-10977-1-git-send-email-arybchenko@solarflare.com> <1495116004-11761-1-git-send-email-arybchenko@solarflare.com> <1495116004-11761-3-git-send-email-arybchenko@solarflare.com> <45b5b0a6-a5be-88d7-734f-c2b1dd1b31be@intel.com> From: Ferruh Yigit Message-ID: <4e8bdd9d-e26d-0cb6-9e0f-68df9f42c5d3@intel.com> Date: Mon, 22 May 2017 13:36:57 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2 3/3] net/sfc: support multi-process 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: , X-List-Received-Date: Mon, 22 May 2017 12:37:01 -0000 On 5/22/2017 1:07 PM, Andrew Rybchenko wrote: > On 05/22/2017 02:29 PM, Ferruh Yigit wrote: >> On 5/18/2017 3:00 PM, Andrew Rybchenko wrote: >>> Signed-off-by: Andrew Rybchenko >>> Reviewed-by: Andy Moreton >> <...> >> >>> Linux VFIO = Y >>> diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h >>> index 772a713..007ed24 100644 >>> --- a/drivers/net/sfc/sfc.h >>> +++ b/drivers/net/sfc/sfc.h >>> @@ -225,7 +225,18 @@ struct sfc_adapter { >>> uint8_t rss_key[SFC_RSS_KEY_SIZE]; >>> #endif >>> >>> + /* >>> + * Shared memory copy of the Rx datapath name to be used by >>> + * the secondary process to find Rx datapath to be used. >>> + */ >>> + char *dp_rx_name; >> Why not use sa->dp_rx->dp.name to find the dp_rx? That variable should >> be shared between processes already? > > sa->dp_rx is a pointer to .data section (sfc_efx_rx or sfc_ef10_rx) > which is (may be) different in primary and secondary processes. OK, thanks. Does it make sense to implement strdup as rte_strdup, so others can re-use it? @sergio, what do you think? > >> <...> >> >>> diff --git a/drivers/net/sfc/sfc_ef10_rx.c b/drivers/net/sfc/sfc_ef10_rx.c >>> index 1484bab..60812cb 100644 >>> --- a/drivers/net/sfc/sfc_ef10_rx.c >>> +++ b/drivers/net/sfc/sfc_ef10_rx.c >>> @@ -699,7 +699,7 @@ struct sfc_dp_rx sfc_ef10_rx = { >>> .type = SFC_DP_RX, >>> .hw_fw_caps = SFC_DP_HW_FW_CAP_EF10, >>> }, >>> - .features = 0, >>> + .features = SFC_DP_RX_FEAT_MULTI_PROCESS, >> Why this flag is needed, I mean why multi process support is not always >> enabled by default? > > libefx-based datapath intensively uses function pointers (primary > process function pointers stored in data structures). So, it does not > work in multi process. But this currently added always, if I don't miss anything. And only checked once in secondary path and error returned if not set. Is there any code path that behaves different based on this flag? Or any case that this flags shouldn't be set? What happens if this flag removed, and assumed it is always set? (this and tx version of this flag) > >> <...> > >