summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/qlogic/qed/qed_vf.h
diff options
context:
space:
mode:
authorYuval Mintz <Yuval.Mintz@qlogic.com>2016-05-11 16:36:20 +0300
committerDavid S. Miller <davem@davemloft.net>2016-05-12 00:04:07 -0400
commit08feecd7fc709077ce92d21a979f522a5f57170a (patch)
tree69859bb077bbca39d56b4d00369741cd16adc615 /drivers/net/ethernet/qlogic/qed/qed_vf.h
parentfefb0202cc5c12172abba78a8404e69c6d82d680 (diff)
qed*: Support PVID configuration
This adds support for PF control over the VF vlan configuration. I.e., `ip link ... vf <x> vlan <vid>' should now be supported. 1. <vid> != 0 => VF receives [unknowingly] only traffic tagged by <vid> and tags all outgoing traffic sent by VF with <vid>. 2. <vid> == 0 ==> Remove the pvid configuration, reverting to previous. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qed/qed_vf.h')
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_vf.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_vf.h b/drivers/net/ethernet/qlogic/qed/qed_vf.h
index d9a8aa684ad7..35eced3691ba 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_vf.h
+++ b/drivers/net/ethernet/qlogic/qed/qed_vf.h
@@ -417,6 +417,16 @@ union pfvf_tlvs {
struct pfvf_start_queue_resp_tlv queue_start;
};
+enum qed_bulletin_bit {
+ /* Alert the VF that a forced VLAN was set by the PF */
+ VLAN_ADDR_FORCED = 2,
+
+ /* Indicate that `default_only_untagged' contains actual data */
+ VFPF_BULLETIN_UNTAGGED_DEFAULT = 3,
+ VFPF_BULLETIN_UNTAGGED_DEFAULT_FORCED = 4,
+
+};
+
struct qed_bulletin_content {
/* crc of structure to ensure is not in mid-update */
u32 crc;
@@ -465,6 +475,10 @@ struct qed_bulletin_content {
u32 partner_adv_speed;
u32 capability_speed;
+
+ /* Forced vlan */
+ u16 pvid;
+ u16 padding5;
};
struct qed_bulletin {
@@ -737,7 +751,7 @@ int qed_vf_pf_vport_start(struct qed_hwfn *p_hwfn,
u16 mtu,
u8 inner_vlan_removal,
enum qed_tpa_mode tpa_mode,
- u8 max_buffers_per_cqe);
+ u8 max_buffers_per_cqe, u8 only_untagged);
/**
* @brief qed_vf_pf_vport_stop - stop the VF's vport
@@ -898,7 +912,8 @@ static inline int qed_vf_pf_vport_start(struct qed_hwfn *p_hwfn,
u16 mtu,
u8 inner_vlan_removal,
enum qed_tpa_mode tpa_mode,
- u8 max_buffers_per_cqe)
+ u8 max_buffers_per_cqe,
+ u8 only_untagged)
{
return -EINVAL;
}