Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3777227ybi; Mon, 29 Jul 2019 12:25:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTMFkV61mTDfghse4EAznKDXP4Rkgjx0TtQW92BD/Dl24ugLhOBWJC8RU0ZmspW0zcw2Us X-Received: by 2002:a17:902:f095:: with SMTP id go21mr113693317plb.58.1564428351680; Mon, 29 Jul 2019 12:25:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564428351; cv=none; d=google.com; s=arc-20160816; b=DDDjf6XCDBrQMvgn2GPNZxnZuTEdKpU0RG3ezCHFAxIaStrO0dh5IBnMQSryhJU8Cl t7+LWFHNwC20roZNn1lzWRQQx6yIsg67rwQqIZ6HN6ZBjRUw+Gm9MR6WS695jPU4KX6C Stgt0Lt+Sdt82g+HiajZvEkKNYelPsMmmtY0qxywdWRzlKi2z81ZtWX/GGiZCMbIub2o E7UNaapvqFN0sGTsoGm0knyx9khGedWsr9Tt2nJkA2TmJGvPTQG7qgo9gKaHA56+jhXg qwhty7A4/w7jwPkfDgbdWuuzH44L1ZPn0Vb9BVoFuxqyCGkAfLIjuNBu6vxR2gGvKsCK YZgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:reply-to:message-id:date:subject:cc:to :from; bh=n/GHdOx1+maJqHvjcbwFsT7C0yGvr1cwZkPFX7vAZ8c=; b=ImmjSVx1zfhxeJoqp+GFGvgO21fIE+K3TpfcF4avLCreUYKXCqrcVIZuMc0BeP7iwy pdhS64bBdpAx5rCVYQNHASlX4LksGbP5Ccd3ikevh0/JmeIJALv4TzRUcjeFLNSDENje iYaokTjgTsJ7xW+Z1HHkvbIoY9LQ9Vf6upELybOPXjcImgOds+Qh0PiutXrZWK0jvhRH ERzLcv/h8g6LJnXi/jas4pvmB38XjzTc0uGp3Gloa71RuabCtpLK1p2gTHp8ImkKQMhV 6gb1nUMh/IU8x8boTM0+eTlCJDfddjMyNSuI49fgpdcA6hkWExGksnHl4E+l1DZoaEuI XIMA== 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 q2si26816236pjq.89.2019.07.29.12.25.36; Mon, 29 Jul 2019 12:25:51 -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 S1728176AbfG2QMQ (ORCPT + 99 others); Mon, 29 Jul 2019 12:12:16 -0400 Received: from inva020.nxp.com ([92.121.34.13]:37696 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726678AbfG2QMP (ORCPT ); Mon, 29 Jul 2019 12:12:15 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id D0D7A1A0374; Mon, 29 Jul 2019 18:12:13 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id C1EB61A0156; Mon, 29 Jul 2019 18:12:13 +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 5A102205F3; Mon, 29 Jul 2019 18:12:13 +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 0/5] staging: fsl-dpaa2/ethsw: add the .ndo_fdb_dump callback Date: Mon, 29 Jul 2019 19:11:47 +0300 Message-Id: <1564416712-16946-1-git-send-email-ioana.ciornei@nxp.com> X-Mailer: git-send-email 1.9.1 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 This patch set adds some features and small fixes in the FDB table manipulation area. First of all, we implement the .ndo_fdb_dump netdev callback so that all offloaded FDB entries, either static or learnt, are available to the user. This is necessary because the DPAA2 switch does not emit interrupts when a new FDB is learnt or deleted, thus we are not able to keep the software bridge state and the HW in sync by calling the switchdev notifiers. The patch set also adds the .ndo_fdb_[add|del] callbacks in order to facilitate adding FDB entries not associated with any master device. One interesting thing that I observed is that when adding an FDB entry associated with a bridge (ie using the 'master' keywork appended to the bridge command) and then dumping the FDB entries, there will be duplicates of the same entry: one listed by the bridge device and one by the driver's .ndo_fdb_dump). It raises the question whether this is the expected behavior or not. Another concern is regarding the correct/desired machanism for drivers to signal errors back to switchdev on adding or deleting an FDB entry. In the switchdev documentation, there is a TODO in the place of this topic. Ioana Ciornei (5): staging: fsl-dpaa2/ethsw: remove unused structure staging: fsl-dpaa2/ethsw: notify switchdev of offloaded entry staging: fsl-dpaa2/ethsw: add .ndo_fdb_dump callback staging: fsl-dpaa2/ethsw: check added_by_user flag staging: fsl-dpaa2/ethsw: add .ndo_fdb[add|del] callbacks drivers/staging/fsl-dpaa2/ethsw/TODO | 1 - drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h | 15 ++- drivers/staging/fsl-dpaa2/ethsw/dpsw.c | 51 +++++++++ drivers/staging/fsl-dpaa2/ethsw/dpsw.h | 56 ++++----- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 178 ++++++++++++++++++++++++++++- 5 files changed, 265 insertions(+), 36 deletions(-) -- 1.9.1