All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: John Fastabend <john.r.fastabend@intel.com>
Cc: <shemminger@vyatta.com>, <mst@redhat.com>, <davem@davemloft.net>,
	<sri@us.ibm.com>, <hadi@cyberus.ca>,
	<jeffrey.t.kirsher@intel.com>, <netdev@vger.kernel.org>,
	<gregory.v.rose@intel.com>, <krkumar2@in.ibm.com>
Subject: Re: [net-next PATCH v3 3/8] net: add fdb generic dump routine
Date: Thu, 12 Apr 2012 21:20:09 +0100	[thread overview]
Message-ID: <1334262009.2497.20.camel@bwh-desktop.uk.solarflarecom.com> (raw)
In-Reply-To: <20120412170702.2717.81539.stgit@jf-dev1-dcblab>

On Thu, 2012-04-12 at 10:07 -0700, John Fastabend wrote:
> This adds a generic dump routine drivers can call. It
> should be sufficient to handle any bridging model that
> uses the unicast address list. This should be most SR-IOV
> enabled NICs.
> 
> v2: return error on nlmsg_put and use -EMSGSIZE instead
>     of -ENOMEM this is inline other usages

It's still not propagated up to ndo_dflt_fdb_dump() though:

[...]
> +static int nlmsg_populate_fdb(struct sk_buff *skb,
> +			      struct netlink_callback *cb,
> +			      struct net_device *dev,
> +			      int *idx,
> +			      struct netdev_hw_addr_list *list)
> +{
> +	struct netdev_hw_addr *ha;
> +	int err;
> +	u32 pid, seq;
> +
> +	pid = NETLINK_CB(cb->skb).pid;
> +	seq = cb->nlh->nlmsg_seq;
> +
> +	list_for_each_entry(ha, &list->list, list) {
> +		if (*idx < cb->args[0])
> +			goto skip;
> +
> +		err = nlmsg_populate_fdb_fill(skb, dev, ha->addr,
> +					      pid, seq, 0, NTF_SELF);
> +		if (err < 0)
> +			break;
			return err;
> +skip:
> +		*idx += 1;
> +	}
> +	return 0;
> +}
[...]

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

  reply	other threads:[~2012-04-12 20:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-12 17:06 [net-next PATCH v3 0/8] Managing the forwarding database(FDB) John Fastabend
2012-04-12 17:06 ` [net-next PATCH v3 1/8] net: add generic PF_BRIDGE:RTM_ FDB hooks John Fastabend
2012-04-12 20:27   ` Ben Hutchings
2012-04-12 17:06 ` [net-next PATCH v3 2/8] net: addr_list: add exclusive dev_uc_add and dev_mc_add John Fastabend
2012-04-12 17:07 ` [net-next PATCH v3 3/8] net: add fdb generic dump routine John Fastabend
2012-04-12 20:20   ` Ben Hutchings [this message]
2012-04-15 16:05     ` John Fastabend
2012-04-12 17:07 ` [net-next PATCH v3 4/8] net: rtnetlink notify events for FDB NTF_SELF adds and deletes John Fastabend
2012-04-12 17:07 ` [net-next PATCH v3 5/8] ixgbe: enable FDB netdevice ops John Fastabend
2012-04-12 17:07 ` [net-next PATCH v3 6/8] ixgbe: allow RAR table to be updated in promisc mode John Fastabend
2012-04-12 17:07 ` [net-next PATCH v3 7/8] ixgbe: UTA table incorrectly programmed John Fastabend
2012-04-12 17:07 ` [net-next PATCH v3 8/8] macvlan: add FDB bridge ops and macvlan flags John Fastabend

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1334262009.2497.20.camel@bwh-desktop.uk.solarflarecom.com \
    --to=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=gregory.v.rose@intel.com \
    --cc=hadi@cyberus.ca \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=john.r.fastabend@intel.com \
    --cc=krkumar2@in.ibm.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    --cc=sri@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.