From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 76C7AC54EBD for ; Fri, 13 Jan 2023 06:30:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 0677A41793; Fri, 13 Jan 2023 06:30:19 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 0677A41793 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1673591419; bh=MjFP/dtp4KGhSDZ9c/70p8ZsHU9VC04SecEMRdSOwB8=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=kC0BQ5w0BKQyA/8AMdlmJYwe0cudSmiQLl/6ghV0YNmqksbtz4oB9OVLNOcmSiUA3 JUFbWPXMu0yPtaOddZSnv5LC6PMNcvNx0KA0tgNNPmLfcJJXph23b0A6ZMPEeX1mXK gUZ94cRx8WZmT/+z6QIoK6hK5dwUVIYW0SVgfRwGYAAqxqjRJA3bISVWZ8eMhc7ci3 G5DOtiSRMNdsLyWt10X17xfwulmZNX3ECuC3QAOqYsr5txg5h0C2AlhjvgaReYO//n /bjuC8Tcch0yC9qrl7MK2blAuGCv13IwyKPN2DSeVW04JfPQSl/Oz70PmpCxDz13qN +gEYjIx+mQ4mg== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0gU4lLlK3172; Fri, 13 Jan 2023 06:30:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 8D064417E1; Fri, 13 Jan 2023 06:30:17 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 8D064417E1 Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id EB8E11BF83B for ; Fri, 13 Jan 2023 06:30:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id C55AE40359 for ; Fri, 13 Jan 2023 06:30:15 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org C55AE40359 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zVZucJPVLk4e for ; Fri, 13 Jan 2023 06:30:14 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org A65A54025F Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by smtp2.osuosl.org (Postfix) with ESMTPS id A65A54025F for ; Fri, 13 Jan 2023 06:30:14 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6500,9779,10588"; a="325984963" X-IronPort-AV: E=Sophos;i="5.97,213,1669104000"; d="scan'208";a="325984963" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2023 22:30:13 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10588"; a="765909596" X-IronPort-AV: E=Sophos;i="5.97,213,1669104000"; d="scan'208";a="765909596" Received: from unknown (HELO localhost.localdomain) ([10.237.112.144]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2023 22:30:12 -0800 Date: Fri, 13 Jan 2023 07:30:08 +0100 From: Michal Swiatkowski To: "Rogalski, RafalX" Message-ID: References: <20230111142029.318092-1-kamil.maziarz@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673591414; x=1705127414; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=DzZL41WHjRehT+rUX3oxYJym76EdVUCva/Y6/0cIbqA=; b=GhBxojP3Xz4KLyECGbYccVVz8MiKH3K07TVVZGQQNbVfaKy3BZ/1DF00 7Hl7pzd77/pgJ2MktTbj+MPPkkB5tfs4WZ4yGVhCO/PADePQpBBXc9pb4 h9q7OXFr76oMzh50ioLjQqCMKo8OYKScshh/c0HA8QR6G3K3/JXALmdWu YJJnnn80vLBesyXgpGShJazKOVJwmXN7Y7zHWGmkcSoJp4LF5oa86ikM7 aiYYY5OmnmRB6iQ+jamS1GqToFq+2ad+OL6ommiebStHfs2/aA7S0MapD y6Tl2OzlHoMOeEgft6IMD9tEz4MM9WW8ffOz5mJbR8EvwBrH89YRh7wzJ g==; X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=GhBxojP3 Subject: Re: [Intel-wired-lan] [PATCH net v1] ice: Ignore RDMA message on setup tc qdisc X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "intel-wired-lan@lists.osuosl.org" , "Maziarz, Kamil" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Thu, Jan 12, 2023 at 01:54:00PM +0000, Rogalski, RafalX wrote: > >-----Original Message----- > >From: Michal Swiatkowski > >Sent: Thursday, January 12, 2023 8:12 AM > >To: Maziarz, Kamil > >Cc: intel-wired-lan@lists.osuosl.org; Rogalski, RafalX > >Subject: Re: [Intel-wired-lan] [PATCH net v1] ice: Ignore RDMA message on setup tc qdisc > > > >On Wed, Jan 11, 2023 at 03:20:29PM +0100, Kamil Maziarz wrote: > >> From: Rafal Rogalski > >> > >> Commit f70b9d5f4426 ("ice: check for a leaf node presence") prevents > >> removal of VSI with leaf nodes. This is an expectation of driver > >> action induced by FW requirements. However, this caused RDMA scheduler > >> config removal to fail every time a qdisc was added or deleted. > >> > >> Fix this by ignoring errors from RDMA configuration removal when qdisc > >> are being reconfigured. > >> > >> Fixes: ff7e93219442 ("ice: Fix failure to re-add LAN/RDMA Tx queues") > >> Signed-off-by: Rafal Rogalski > >> Signed-off-by: Kamil Maziarz > >> --- > >Thanks for changes. It is a good practise to include changelog here. > >Something like: > >v1 --> v2: > > - check for -EBUSY etc. > > --- > > > > Is Your patch rebased on dev-queue? I am pretty sure that ice_vsi_rebuild looks different on current dev-queue, please check that. > > > Thank you for vigilance. Yes, my changes are pushed at the top of dev-queue branch to the net-queue repository. > Yeah, sorry for confusion, didn't notice that it is a fix to net. Thanks for clarification. > >> drivers/net/ethernet/intel/ice/ice.h | 1 + > >> drivers/net/ethernet/intel/ice/ice_lib.c | 2 +- > >> drivers/net/ethernet/intel/ice/ice_main.c | 3 +++ > >> 3 files changed, 5 insertions(+), 1 deletion(-) > >> > >> diff --git a/drivers/net/ethernet/intel/ice/ice.h > >> b/drivers/net/ethernet/intel/ice/ice.h > >> index 2f0b604abc5e..b572d07bc126 100644 > >> --- a/drivers/net/ethernet/intel/ice/ice.h > >> +++ b/drivers/net/ethernet/intel/ice/ice.h > >> @@ -306,6 +306,7 @@ enum ice_pf_state { > >> ICE_PHY_INIT_COMPLETE, > >> ICE_FD_VF_FLUSH_CTX, /* set at FD Rx IRQ or timeout */ > >> ICE_AUX_ERR_PENDING, > >> + ICE_SETUP_TC_QDISC, > >> ICE_STATE_NBITS /* must be last */ > >> }; > >> > >> diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c > >> b/drivers/net/ethernet/intel/ice/ice_lib.c > >> index 22bcb414546a..0ee3acbea108 100644 > >> --- a/drivers/net/ethernet/intel/ice/ice_lib.c > >> +++ b/drivers/net/ethernet/intel/ice/ice_lib.c > >> @@ -3448,7 +3448,7 @@ int ice_vsi_rebuild(struct ice_vsi *vsi, bool > >> init_vsi) > >> > >> ice_rm_vsi_lan_cfg(vsi->port_info, vsi->idx); > >> ret = ice_rm_vsi_rdma_cfg(vsi->port_info, vsi->idx); > >> - if (ret) > >> + if (ret && !(test_bit(ICE_SETUP_TC_QDISC, pf->state) && ret == > >> +-EBUSY)) > >It is fine for me in current state, but do we really need to do this check only in setting TC qdisc? Doesn't the same thing happen when the number of queues is changed from ethtool? (maybe it is not because the changes is blocked when RDMA is active). Maybe whole > >ice_setup_tc_mqprio_qdisc() should return -EBOUSY or inval if RDMA is active? Is it valid to a new qdisc when RDMA is active? > > > You are right about ethtool. However, I'm not sure if we should ignore -EBOUSY for every other scenario. > Dave recently added a patchset thath blocks any queue changes when RDMA driver is bound to aux [1]. I think following the same logic in ice_setup_tc_mqprio_qdisc() the same check should happen (because it is changing queues). Adding Dave Thanks, Michal > >> dev_err(ice_pf_to_dev(vsi->back), "Failed to remove RDMA scheduler config for VSI %u, err %d\n", > >> vsi->vsi_num, ret); > >> ice_vsi_free_q_vectors(vsi); > >> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c > >> b/drivers/net/ethernet/intel/ice/ice_main.c > >> index a9a7f8b52140..5ff137645f08 100644 > >> --- a/drivers/net/ethernet/intel/ice/ice_main.c > >> +++ b/drivers/net/ethernet/intel/ice/ice_main.c > >> @@ -8706,6 +8706,7 @@ static int ice_setup_tc_mqprio_qdisc(struct net_device *netdev, void *type_data) > >> cur_txq = vsi->num_txq; > >> cur_rxq = vsi->num_rxq; > >> > >> + set_bit(ICE_SETUP_TC_QDISC, pf->state); > >> /* proceed with rebuild main VSI using correct number of queues */ > >> ret = ice_vsi_rebuild(vsi, false); > >> if (ret) { > >> @@ -8716,9 +8717,11 @@ static int ice_setup_tc_mqprio_qdisc(struct net_device *netdev, void *type_data) > >> clear_bit(ICE_RESET_FAILED, pf->state); > >> if (ice_vsi_rebuild(vsi, false)) { > >> dev_err(dev, "Rebuild of main VSI failed again\n"); > >> + clear_bit(ICE_SETUP_TC_QDISC, pf->state); > >> return ret; > >> } > >> } > >> + clear_bit(ICE_SETUP_TC_QDISC, pf->state); > >> > >> vsi->all_numtc = num_tcf; > >> vsi->all_enatc = ena_tc_qdisc; > >> -- > >> 2.31.1 > >> > >> _______________________________________________ > >> Intel-wired-lan mailing list > >> Intel-wired-lan@osuosl.org > >> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan