From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E51F4A0032; Tue, 28 Sep 2021 11:53:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 609FF40E3C; Tue, 28 Sep 2021 11:53:55 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 356C640DF6 for ; Tue, 28 Sep 2021 11:53:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632822833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qdcGFTSPcxkMxDMsJG1QOvFTlyf/8zQVREwPyQKia0c=; b=ViF/72mgxX51TEWhWLMc3s3V5R91P4F4Sl87B+gksDqW67roxBJh2oltgLm1q05b81eH4v SIOnLoTePj3NCMeaRSDe4f62O2ugFOel/EijfxvdSFKTYUK/kdQz7ZESLYocjBXtMaY6no q3rGbZcuOkDzZaDm+PZGyqnORsTwahw= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-123-IVI_XlxzOBqdn7D6wl_PYA-1; Tue, 28 Sep 2021 05:53:50 -0400 X-MC-Unique: IVI_XlxzOBqdn7D6wl_PYA-1 Received: by mail-wm1-f70.google.com with SMTP id j21-20020a05600c1c1500b0030ccce95837so845814wms.3 for ; Tue, 28 Sep 2021 02:53:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:cc:references:from:subject:in-reply-to :content-transfer-encoding; bh=qdcGFTSPcxkMxDMsJG1QOvFTlyf/8zQVREwPyQKia0c=; b=Sv8fYaGmfWW5uqv5xcv1q4NO2+wQAPxMjqHL163SoIXd1jcAYFNtedDfL1bAOoEMGk 204kin0Zk/ai4MmKCzUNzMq+rmi8ERinP2LhllqifD3CVXdIIBRqj4ac9S/K70ffHag5 yWaytmQx4KtNizxj2w13W94p8rCqeut5pTfSjSDDWogcl9Ar3HZsffU6IUabQKnCt/q4 Jf0URWnCoDcHiYvBzOENkzicJkeO5fUzwWMF7nw3CMzJhrUKoNFwZvlMUPPFAOc+6YNa 1V5VTYLHjpvKzZtE3UECGZNhR1Pd96i745vxThfukzFnqzNZ5yoflJp/SZtUCLfFIAIB MKDQ== X-Gm-Message-State: AOAM533orhqvB5R+K3Aw+vjLY87cW9HoFDpbHsIjOmrSE5L2CiSfb2Ru +BRPheRIX/DFJaKKiTnwrZJDMrorNvBpcbAy8e8P6j0dr7Kda3M6dxiob+kGMXYTbH9t4J2pJso CxbQ= X-Received: by 2002:a05:600c:1c07:: with SMTP id j7mr3678559wms.171.1632822829668; Tue, 28 Sep 2021 02:53:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7U8zUddeT9pCaF+09GJkK6y2dHvAZZSBWEFRpsrM6gZmpw4ui3QH6/EJ49+f8XwjlvEiv+A== X-Received: by 2002:a05:600c:1c07:: with SMTP id j7mr3678547wms.171.1632822829518; Tue, 28 Sep 2021 02:53:49 -0700 (PDT) Received: from [192.168.0.36] ([78.18.26.217]) by smtp.gmail.com with ESMTPSA id n15sm19506060wrg.58.2021.09.28.02.53.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Sep 2021 02:53:48 -0700 (PDT) Message-ID: Date: Tue, 28 Sep 2021 10:53:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 To: Robin Zhang , dev@dpdk.org Cc: beilei.xing@intel.com, junfeng.guo@intel.com, stevex.yang@intel.com References: <20210928084042.1227848-1-robinx.zhang@intel.com> From: Kevin Traynor In-Reply-To: <20210928084042.1227848-1-robinx.zhang@intel.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix remove MAC/VLAN addresses error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 28/09/2021 09:40, Robin Zhang wrote: > Firmware will return I40E_AQ_RC_ENOENT when try to delete non-existent > MAC/VLAN addresses from the HW filtering, this should not be considered as > an Admin Queue error. But in i40e_asq_send_command, it will return > I40E_ERR_ADMIN_QUEUE_ERROR if the return value of Admin Queue command > processed by Firmware is not I40E_AQ_RC_OK or I40E_AQ_RC_EBUSY. > > Use i40e_aq_remove_macvlan_v2 instead so that we can get the corresponding > Admin Queue status, and not report as an error in DPDK when Firmware > return I40E_AQ_RC_ENOENT. > > Fixes: 4861cde46116 ("i40e: new poll mode driver") > Is it relevant to stable releases (20.11/19.11) with earlier firmware? https://git.dpdk.org/dpdk/tree/doc/guides/nics/i40e.rst#n101 > Signed-off-by: Robin Zhang > --- > drivers/net/i40e/i40e_ethdev.c | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c > index acbe7380b1..fdc9943034 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -7036,6 +7036,7 @@ i40e_remove_macvlan_filters(struct i40e_vsi *vsi, > int ret = I40E_SUCCESS; > struct i40e_hw *hw = I40E_VSI_TO_HW(vsi); > struct i40e_aqc_remove_macvlan_element_data *req_list; > + enum i40e_admin_queue_err aq_status; > > if (filter == NULL || total == 0) > return I40E_ERR_PARAM; > @@ -7083,11 +7084,17 @@ i40e_remove_macvlan_filters(struct i40e_vsi *vsi, > req_list[i].flags = rte_cpu_to_le_16(flags); > } > > - ret = i40e_aq_remove_macvlan(hw, vsi->seid, req_list, > - actual_num, NULL); > + ret = i40e_aq_remove_macvlan_v2(hw, vsi->seid, req_list, > + actual_num, NULL, &aq_status); > + > if (ret != I40E_SUCCESS) { > - PMD_DRV_LOG(ERR, "Failed to remove macvlan filter"); > - goto DONE; > + /* Do not report as an error when firmware returns ENOENT */ > + if (aq_status == I40E_AQ_RC_ENOENT) { > + ret = I40E_SUCCESS; > + } else { > + PMD_DRV_LOG(ERR, "Failed to remove macvlan filter"); > + goto DONE; > + } > } > num += actual_num; > } while (num < total); >