From patchwork Fri Jul 12 07:10:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Richter X-Patchwork-Id: 258703 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 AB4542C0344 for ; Fri, 12 Jul 2013 17:10:44 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757189Ab3GLHKf (ORCPT ); Fri, 12 Jul 2013 03:10:35 -0400 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:44100 "EHLO e06smtp11.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757101Ab3GLHKd (ORCPT ); Fri, 12 Jul 2013 03:10:33 -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, 12 Jul 2013 08:04:50 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 12 Jul 2013 08:04:48 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id C349317D801A for ; Fri, 12 Jul 2013 08:12:04 +0100 (BST) Received: from d06av12.portsmouth.uk.ibm.com (d06av12.portsmouth.uk.ibm.com [9.149.37.247]) by b06cxnps4075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r6C7AIsn53608590 for ; Fri, 12 Jul 2013 07:10:18 GMT Received: from d06av12.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r6C7ASAN002730 for ; Fri, 12 Jul 2013 01:10:29 -0600 Received: from oc6864821000.ibm.com (dyn-9-152-214-113.boeblingen.de.ibm.com [9.152.214.113]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id r6C7APhM002604; Fri, 12 Jul 2013 01:10:28 -0600 From: Thomas Richter To: netdev@vger.kernel.org Cc: Thomas Richter Subject: [PATCH 2/2 V2] macvlan fdb replace support Date: Fri, 12 Jul 2013 09:10:16 +0200 Message-Id: <1373613016-6856-2-git-send-email-tmricht@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1373613016-6856-1-git-send-email-tmricht@linux.vnet.ibm.com> References: <1373613016-6856-1-git-send-email-tmricht@linux.vnet.ibm.com> X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13071207-5024-0000-0000-000006912EF0 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. 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))