aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h
diff options
context:
space:
mode:
authorJohn Fastabend <john.r.fastabend@intel.com>2012-10-19 02:34:34 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2013-01-19 03:35:15 -0800
commit610a63fc8ef903a11921bb48f26fd4d34aacd3c0 (patch)
tree03006b0b96f3771316368c9b652045e8f89ba5b6 /drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h
parentipv6: remove unneeded check to pskb_may_pull in ipip6_rcv (diff)
downloadlinux-dev-610a63fc8ef903a11921bb48f26fd4d34aacd3c0.tar.xz
linux-dev-610a63fc8ef903a11921bb48f26fd4d34aacd3c0.zip
ixgbe: SR-IOV: dynamic IEEE DCBx default priority changes
IEEE DCBx has a mechanism to change the default user priority. In the normal case the OS can handle this via cgroups, iptables, socket, options etc. With SR-IOV and direct assigned VF devices the default priority needs to be set by the PF device so the inserted VLAN tag is correct. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Tested-by: Marcus Dennis <marcusx.e.dennis@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h
index 1be1d30e4e78..21bc1dd1d33e 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h
@@ -47,6 +47,14 @@ void ixgbe_enable_sriov(struct ixgbe_adapter *adapter,
const struct ixgbe_info *ii);
#endif
+static inline void ixgbe_set_vmvir(struct ixgbe_adapter *adapter,
+ u16 vid, u16 qos, u32 vf)
+{
+ struct ixgbe_hw *hw = &adapter->hw;
+ u32 vmvir = vid | (qos << VLAN_PRIO_SHIFT) | IXGBE_VMVIR_VLANA_DEFAULT;
+
+ IXGBE_WRITE_REG(hw, IXGBE_VMVIR(vf), vmvir);
+}
#endif /* _IXGBE_SRIOV_H_ */