From: John Fastabend <john.r.fastabend@intel.com>
To: bhutchings@solarflare.com, roprabhu@cisco.com
Cc: netdev@vger.kernel.org, mst@redhat.com, chrisw@redhat.com,
davem@davemloft.net, gregory.v.rose@intel.com,
shemminger@vyatta.com, kvm@vger.kernel.org, sri@us.ibm.com
Subject: [RFC PATCH v0 2/2] ixgbe: add NETIF_F_HW_FDB to supported flags
Date: Wed, 08 Feb 2012 19:22:11 -0800 [thread overview]
Message-ID: <20120209032211.32468.90929.stgit@jf-dev1-dcblab> (raw)
In-Reply-To: <20120209032206.32468.92296.stgit@jf-dev1-dcblab>
Add support for NETIF_F_HW_FDB flag when SR-IOV is enabled. This
allows the bridge to push fdb entries into the hardware so the
VF can communicate with virtual devices attached to the bridge.
veth0 veth2
| |
------------
| bridge0 | <---- software bridging
------------
/
/
ethx.y ethx
VF PF
\ \ <---- propagate FDB entries to HW
\ \
--------------------
| Embedded Bridge | <---- hardware offloaded switching
--------------------
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 35 +++++++++++++++++--------
1 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index ecc46ce..66261fa 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -3207,6 +3207,11 @@ static int ixgbe_write_uc_addr_list(struct net_device *netdev)
netdev_for_each_uc_addr(ha, netdev) {
if (!rar_entries)
break;
+
+ netif_printk(adapter, hw, KERN_DEBUG, adapter->netdev,
+ "%s %s: write vfn %i %pM\n",
+ __func__, netdev->name, vfn, ha->addr);
+
hw->mac.ops.set_rar(hw, rar_entries--, ha->addr,
vfn, IXGBE_RAH_AV);
count++;
@@ -3268,16 +3273,17 @@ void ixgbe_set_rx_mode(struct net_device *netdev)
}
ixgbe_vlan_filter_enable(adapter);
hw->addr_ctrl.user_set_promisc = false;
- /*
- * Write addresses to available RAR registers, if there is not
- * sufficient space to store all the addresses then enable
- * unicast promiscuous mode
- */
- count = ixgbe_write_uc_addr_list(netdev);
- if (count < 0) {
- fctrl |= IXGBE_FCTRL_UPE;
- vmolr |= IXGBE_VMOLR_ROPE;
- }
+ }
+
+ /*
+ * Write addresses to available RAR registers, if there is not
+ * sufficient space to store all the addresses then enable
+ * unicast promiscuous mode
+ */
+ count = ixgbe_write_uc_addr_list(netdev);
+ if (count < 0) {
+ fctrl |= IXGBE_FCTRL_UPE;
+ vmolr |= IXGBE_VMOLR_ROPE;
}
if (adapter->num_vfs) {
@@ -7214,6 +7220,10 @@ static netdev_features_t ixgbe_fix_features(struct net_device *netdev,
e_info(probe, "rx-usecs set too low, not enabling RSC\n");
}
+ /* Only use offloaded FDB if SR-IOV is enabled */
+ if (!(adapter->flags & IXGBE_FLAG_SRIOV_ENABLED))
+ data &= ~NETIF_F_HW_FDB;
+
return data;
}
@@ -7549,9 +7559,12 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
netdev->priv_flags |= IFF_UNICAST_FLT;
- if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED)
+ if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) {
adapter->flags &= ~(IXGBE_FLAG_RSS_ENABLED |
IXGBE_FLAG_DCB_ENABLED);
+ netdev->hw_features |= NETIF_F_HW_FDB;
+ netdev->features |= NETIF_F_HW_FDB;
+ }
#ifdef CONFIG_IXGBE_DCB
netdev->dcbnl_ops = &dcbnl_ops;
next prev parent reply other threads:[~2012-02-09 3:22 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-09 3:22 [RFC PATCH v0 1/2] net: bridge: propagate FDB table into hardware John Fastabend
2012-02-09 3:22 ` John Fastabend [this message]
2012-02-09 4:36 ` Stephen Hemminger
2012-02-09 17:36 ` John Fastabend
2012-02-09 17:40 ` Stephen Hemminger
2012-02-09 17:52 ` John Fastabend
2012-02-09 21:11 ` jamal
2012-02-10 2:14 ` John Fastabend
2012-02-10 4:14 ` John Fastabend
2012-02-10 15:18 ` jamal
2012-02-10 16:39 ` Stephen Hemminger
2012-02-13 13:54 ` jamal
2012-02-13 15:13 ` John Fastabend
2012-02-14 13:18 ` jamal
2012-02-14 18:57 ` John Fastabend
2012-02-14 19:05 ` Stephen Hemminger
2012-02-14 19:08 ` John Fastabend
2012-02-15 14:10 ` Jamal Hadi Salim
2012-02-16 1:26 ` John Fastabend
2012-02-17 14:28 ` jamal
2012-02-17 17:10 ` John Fastabend
2012-02-18 12:41 ` jamal
2012-02-29 4:40 ` John Fastabend
2012-02-29 5:14 ` John Fastabend
2012-02-29 13:57 ` Jamal Hadi Salim
2012-02-29 13:56 ` Jamal Hadi Salim
2012-02-29 17:25 ` John Fastabend
2012-02-29 17:52 ` Stephen Hemminger
2012-02-29 18:19 ` John Fastabend
2012-03-01 13:36 ` Jamal Hadi Salim
2012-03-01 22:17 ` John Fastabend
2012-03-02 13:20 ` jamal
2012-03-05 17:00 ` Lennert Buytenhek
2012-03-01 13:24 ` Jamal Hadi Salim
2012-03-01 14:14 ` Michael S. Tsirkin
2012-03-01 22:10 ` John Fastabend
2012-03-05 16:53 ` Lennert Buytenhek
2012-03-06 3:45 ` John Fastabend
2012-03-06 14:15 ` Lennert Buytenhek
2012-03-06 13:42 ` jamal
2012-03-06 14:09 ` Lennert Buytenhek
2012-03-07 14:11 ` Jamal Hadi Salim
2012-03-12 8:48 ` Lennert Buytenhek
2012-03-13 13:52 ` Jamal Hadi Salim
2012-02-16 3:58 ` Ben Hutchings
2012-02-16 19:18 ` Shradha Shah
2012-02-17 14:37 ` jamal
2012-02-10 13:45 ` Roopa Prabhu
2012-02-09 18:14 ` Sridhar Samudrala
2012-02-09 20:30 ` John Fastabend
2012-02-10 0:39 ` Sridhar Samudrala
2012-02-10 0:51 ` 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=20120209032211.32468.90929.stgit@jf-dev1-dcblab \
--to=john.r.fastabend@intel.com \
--cc=bhutchings@solarflare.com \
--cc=chrisw@redhat.com \
--cc=davem@davemloft.net \
--cc=gregory.v.rose@intel.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=roprabhu@cisco.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).