From patchwork Fri Jul 19 15:20:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Richter X-Patchwork-Id: 260298 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 417882C0096 for ; Sat, 20 Jul 2013 01:20:24 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760681Ab3GSPUV (ORCPT ); Fri, 19 Jul 2013 11:20:21 -0400 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:54993 "EHLO e06smtp11.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760253Ab3GSPUS (ORCPT ); Fri, 19 Jul 2013 11:20:18 -0400 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 19 Jul 2013 16:14:23 +0100 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 19 Jul 2013 16:14:22 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 1CA412190056 for ; Fri, 19 Jul 2013 16:24:18 +0100 (BST) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps3075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r6JFK3h063176714 for ; Fri, 19 Jul 2013 15:20:03 GMT Received: from d06av01.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r6JFKD6v029703 for ; Fri, 19 Jul 2013 09:20:14 -0600 Received: from oc6864821000.ibm.com (dyn-9-152-214-166.boeblingen.de.ibm.com [9.152.214.166]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id r6JFKAU5029588; Fri, 19 Jul 2013 09:20:13 -0600 From: Thomas Richter To: netdev@vger.kernel.org Cc: davem@davemloft.net, stephen@networkplumber.org, Thomas Richter Subject: [PATCH 2/2 V2] macvlan fdb replace support Date: Fri, 19 Jul 2013 17:20:08 +0200 Message-Id: <1374247208-8226-2-git-send-email-tmricht@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1374247208-8226-1-git-send-email-tmricht@linux.vnet.ibm.com> References: <1374247208-8226-1-git-send-email-tmricht@linux.vnet.ibm.com> X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13071915-5024-0000-0000-000006A3723D Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add support for iproute2 command 'bridge fdb replace ...'. The rtnletlink call back function ndo_fdb_add will be called with the NLM_F_REPLACE flag set. Simply return -EOPNOTSUP. Resubmitted because net-next was closed last week. Signed-off-by: Thomas Richter --- drivers/net/macvlan.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index 18373b6..74907f5 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c @@ -597,6 +597,9 @@ static int macvlan_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], if (!vlan->port->passthru) return -EOPNOTSUPP; + if (flags & NLM_F_REPLACE) + return -EOPNOTSUPP; + if (is_unicast_ether_addr(addr)) err = dev_uc_add_excl(dev, addr); else if (is_multicast_ether_addr(addr))