From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Fastabend Subject: Re: [RFC PATCH 3/3] mlx4: Use default fdb handlers when not multifunction. Date: Wed, 27 Feb 2013 20:27:51 -0800 Message-ID: <512EDCC7.8050207@intel.com> References: <1361987164-15280-1-git-send-email-vyasevic@redhat.com> <1361987164-15280-4-git-send-email-vyasevic@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, davem@davemloft.net To: Vlad Yasevich , Amir Vadai Return-path: Received: from mga14.intel.com ([143.182.124.37]:28051 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753581Ab3B1E2L (ORCPT ); Wed, 27 Feb 2013 23:28:11 -0500 In-Reply-To: <1361987164-15280-4-git-send-email-vyasevic@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: On 2/27/2013 9:46 AM, Vlad Yasevich wrote: > Allow the use of ndo_dflt_fdb_ when the > adapter is not configured with virtual functins (!mlx4_is_mfunc()) > This allows proper IFF_UNICAST_FLT support and allows for > additional handling by the driver if needed. > > CC: Amir Vadai > Signed-off-by: Vlad Yasevich > --- > drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 12 +++--------- > 1 files changed, 3 insertions(+), 9 deletions(-) > > diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c > index 5385474..5732025 100644 > --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c > +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c > @@ -1934,7 +1934,7 @@ static int mlx4_en_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], Amir are the default ops good enough here? > int err; > > if (!mlx4_is_mfunc(mdev)) > - return -EOPNOTSUPP; > + return ndo_dflt_fdb_add(ndm, tb, dev, addr, flags); > > /* Hardware does not support aging addresses, allow only > * permanent addresses if ndm_state is given > @@ -1968,7 +1968,7 @@ static int mlx4_en_fdb_del(struct ndmsg *ndm, > int err; > > if (!mlx4_is_mfunc(mdev)) > - return -EOPNOTSUPP; > + return ndo_dflt_fdb_del(ndm, tb, dev, addr); > > if (ndm->ndm_state && !(ndm->ndm_state & NUD_PERMANENT)) { > en_info(priv, "Del FDB only supports static addresses\n"); > @@ -1989,13 +1989,7 @@ static int mlx4_en_fdb_dump(struct sk_buff *skb, > struct netlink_callback *cb, > struct net_device *dev, int idx) > { same comment here. Don't define this op and we get the same behavior? .John