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 9F40AA056D; Tue, 3 Mar 2020 05:01:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F251A1BFF2; Tue, 3 Mar 2020 05:01:42 +0100 (CET) Received: from mail-ot1-f67.google.com (mail-ot1-f67.google.com [209.85.210.67]) by dpdk.org (Postfix) with ESMTP id C0F3F1BFEF for ; Tue, 3 Mar 2020 05:01:40 +0100 (CET) Received: by mail-ot1-f67.google.com with SMTP id v19so1649643ote.8 for ; Mon, 02 Mar 2020 20:01:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Rj5AbP497L3LyNb31WQtseZn1EcbKi4KrKhKWqjuVas=; b=Zjyx6TcR3ImTDG6bDHngTP2TMGadZc1cU9n+G/ABHbGuFFp4CsvRqRPcKm2wp0Diem Y3gOUDnL7IPO+ApQdMUi5ePuZAbkhR7fe1w1tyOgybRl3wwgxhsseGh9cGAWQLqy2vF/ xaHpNT6ooUleyNYF0RqdQfzktqhDL1zGM0DSw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Rj5AbP497L3LyNb31WQtseZn1EcbKi4KrKhKWqjuVas=; b=I351EWAL+IFVI+kAyGfwAYn2/F98YIwVvThhbcaNxbss0s6cgPVwhnbtUHHgJfv3SI sB4HaiY/GOJrC3YP1k5RoKlv2I2SerD7hOMcytZaZ2DfXnaJtQ+wIsyE9OOg/baEcen6 6T4GaTxivyqdUiOTXe0u44P3+JWp5uMLR7YyVeJ0GBVBdRRpUCiCAB0EIr+uNKj2608B 6lzpLg26kqXX+uIl7yjSwDjpmQkkS9kfGtS6RFdFfdV24bN03V8rwIX2TMSaZeZZ5ZpT o9vSoHWHwL4w9KbCs/Nc+ExL6SIaZdyDFhZU71UNcAlgHVpBRNbp6p+iNCfb7lgrIgPW h7TA== X-Gm-Message-State: ANhLgQ0Z3t8aP0OgHiYIYnxWrqtFGxnSrjdnLGXASqZP5yvlNMa2WTn4 vlnnGVMOWJFdDPK7+7NWtAhou7zYbQ560AYVTyCHmg== X-Google-Smtp-Source: ADFU+vu1Azw59iAjT8wneXzZ/gRdI/er3lNUOudtFlytVX/dC0sNANLQccfM2g7+lff8d86qYiH/o5QZNx7N5f/SVpQ= X-Received: by 2002:a05:6830:14cc:: with SMTP id t12mr1816738otq.95.1583208099796; Mon, 02 Mar 2020 20:01:39 -0800 (PST) MIME-Version: 1.0 References: <20200227081851.2938-1-kalesh-anakkur.purayil@broadcom.com> In-Reply-To: <20200227081851.2938-1-kalesh-anakkur.purayil@broadcom.com> From: Ajit Khaparde Date: Mon, 2 Mar 2020 20:01:23 -0800 Message-ID: To: Kalesh A P Cc: dpdk-dev , Ferruh Yigit Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] net/bnxt: fix to handle default mac address setting when port is stopped 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 Thu, Feb 27, 2020 at 12:02 AM Kalesh A P < kalesh-anakkur.purayil@broadcom.com> wrote: > From: Kalesh AP > > Driver destroys the vnic when the port is brought down. > Port hw filter setting such as default mac address and > unicast mac filters will be applied when port is started. > > Fixed to return success silently for these callbacks > when port is stopped. > > Fixes: 39b88344e364 ("net/bnxt: fix enable/disable VLAN filtering") > Cc: stable@dpdk.org > > Reported-by: Stephen Hemminger > Signed-off-by: Kalesh AP > Reviewed-by: Ajit Kumar Khaparde > Reviewed-by: Somnath Kotur > Patch applied to dpdk-next-net-brcm > --- > drivers/net/bnxt/bnxt_ethdev.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/net/bnxt/bnxt_ethdev.c > b/drivers/net/bnxt/bnxt_ethdev.c > index 18aa313..3c50c2e 100644 > --- a/drivers/net/bnxt/bnxt_ethdev.c > +++ b/drivers/net/bnxt/bnxt_ethdev.c > @@ -1103,6 +1103,10 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev > *eth_dev, > return -EINVAL; > } > > + /* Filter settings will get applied when port is started */ > + if (!eth_dev->data->dev_started) > + return 0; > + > rc = bnxt_add_mac_filter(bp, vnic, mac_addr, index, pool); > > return rc; > @@ -2094,6 +2098,10 @@ bnxt_set_default_mac_addr_op(struct rte_eth_dev > *dev, > if (rte_is_zero_ether_addr(addr)) > return -EINVAL; > > + /* Filter settings will get applied when port is started */ > + if (!dev->data->dev_started) > + return 0; > + > /* Check if the requested MAC is already added */ > if (memcmp(addr, bp->mac_addr, RTE_ETHER_ADDR_LEN) == 0) > return 0; > -- > 2.10.1 > >