Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3625889ybi; Mon, 29 Jul 2019 09:42:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1DSvdvdPFmwAdtC5BNKk+sd3tV4Yr29FWju5rml1S11yXJ2vymA6qL1xB8twdgDDJ4vFX X-Received: by 2002:a63:ec48:: with SMTP id r8mr28904428pgj.387.1564418566354; Mon, 29 Jul 2019 09:42:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564418566; cv=none; d=google.com; s=arc-20160816; b=vcCDpjDcgjgHtF2goVgM3uWbauVA/J/aIX6kXCI8Vkt7V3LakjfbWEvtXBP7N/AeB2 djZ7X4SLTGUdr5mFCYTDPNdhmcd9hDh0vJm+qoemajxDpUnKFBEIXzaLRMpmnaGyfmcx sOqorHFdoXJmryZS0uWOCaeb2fCwYTSJ6fgYlNvQ6y7SGbTpvu/bBUX5sUwv5vHDBIKb SQkQfW5UNXLSC9XKukeukp6Y/O3hpUWSW20DNjSHY5sjlQkB69Q1NFWSIA6r9hA3JsTf 7DtGLcDlDAoAiVWitF54CKSfpyc5CzsddY/wQX5mIeSWuSNIUUcnh9MYXJqZYW8WKj7B AIgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:reply-to:references:in-reply-to :message-id:date:subject:cc:to:from; bh=B1ZELz8hneXLvkCcTqC2iEkqGNeY9BjZllfYEIgk+GY=; b=E8JwntLKOi9hXDeoS+F0JeAyK5VZvuxTPOEat7/jwUZwn5qyw9hfk1q8ngaQvPPN/n 4ehFiDJsNyZt84LT9njeVOJppFcEU7QeZHWlrt9YFlXxC/e4/COux6T9FrnuKXYRi2X0 44Kd4NMqlkt2qBh8l2+kaflWqDIWnq6/U0Vcz0ej9oDz5LVTXv0Ogk9SeIgIRnuDAMK2 iIGPjQ/lqT6jtKB+ofj3hicHz/1qSS1Wifrb1cDPlpzIxs4J8lmLkpZ1fOI8wm5MqF3p lMsJBOWBLXBBPzZFb0gPVe2mK5MzatSb2FXNw7ooQdJIqCCAU+CnSO7YDu75hIM2cEZh J0ig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 70si25384594plc.253.2019.07.29.09.42.31; Mon, 29 Jul 2019 09:42:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728961AbfG2QMh (ORCPT + 99 others); Mon, 29 Jul 2019 12:12:37 -0400 Received: from inva021.nxp.com ([92.121.34.21]:40790 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728903AbfG2QMW (ORCPT ); Mon, 29 Jul 2019 12:12:22 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id C88CE200356; Mon, 29 Jul 2019 18:12:20 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id BC1BF200344; Mon, 29 Jul 2019 18:12:20 +0200 (CEST) Received: from fsr-ub1464-137.ea.freescale.net (fsr-ub1464-137.ea.freescale.net [10.171.82.114]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 55E28205F3; Mon, 29 Jul 2019 18:12:20 +0200 (CEST) From: Ioana Ciornei To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: netdev@vger.kernel.org, davem@davemloft.net, andrew@lunn.ch, f.fainelli@gmail.com, jiri@mellanox.com, Ioana Ciornei Subject: [PATCH 4/5] staging: fsl-dpaa2/ethsw: check added_by_user flag Date: Mon, 29 Jul 2019 19:11:51 +0300 Message-Id: <1564416712-16946-5-git-send-email-ioana.ciornei@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1564416712-16946-1-git-send-email-ioana.ciornei@nxp.com> References: <1564416712-16946-1-git-send-email-ioana.ciornei@nxp.com> Reply-to: ioana.ciornei@nxp.com X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We do not want to offload FDB entries if not added by user as static entries. Check the added_by_user flag and break if not set. Signed-off-by: Ioana Ciornei --- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c index e6423f1e190d..2d3179c6bad8 100644 --- a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c +++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c @@ -1179,6 +1179,8 @@ static void ethsw_switchdev_event_work(struct work_struct *work) switch (switchdev_work->event) { case SWITCHDEV_FDB_ADD_TO_DEVICE: + if (!fdb_info->added_by_user) + break; if (is_unicast_ether_addr(fdb_info->addr)) err = ethsw_port_fdb_add_uc(netdev_priv(dev), fdb_info->addr); @@ -1192,6 +1194,8 @@ static void ethsw_switchdev_event_work(struct work_struct *work) &fdb_info->info, NULL); break; case SWITCHDEV_FDB_DEL_TO_DEVICE: + if (!fdb_info->added_by_user) + break; if (is_unicast_ether_addr(fdb_info->addr)) ethsw_port_fdb_del_uc(netdev_priv(dev), fdb_info->addr); else -- 1.9.1