aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/fm10k/fm10k_pf.h
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2014-09-20 19:47:58 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-09-23 06:59:15 -0400
commit401b5383c6c9c5b85e1a60bf9de4c7f2dd09d114 (patch)
tree95ef13d3ff4734d56dff6be17dccbf6b6f5e212b /drivers/net/ethernet/intel/fm10k/fm10k_pf.h
parentb6fec18fd16bbf719c1c0aa83e41590573b4c58c (diff)
fm10k: Add support for configuring PF interface
This patch adds support for the operations which will configure filters on the interface. In addition with these patches we begin to introduce the PF messages that will be sent to or received from the Switch Management entity. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/fm10k/fm10k_pf.h')
-rw-r--r--drivers/net/ethernet/intel/fm10k/fm10k_pf.h98
1 files changed, 98 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pf.h b/drivers/net/ethernet/intel/fm10k/fm10k_pf.h
index 054392ffbd10..108a7a741bb5 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pf.h
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pf.h
@@ -24,5 +24,103 @@
24#include "fm10k_type.h" 24#include "fm10k_type.h"
25#include "fm10k_common.h" 25#include "fm10k_common.h"
26 26
27bool fm10k_glort_valid_pf(struct fm10k_hw *hw, u16 glort);
28
29enum fm10k_pf_tlv_msg_id_v1 {
30 FM10K_PF_MSG_ID_TEST = 0x000, /* msg ID reserved */
31 FM10K_PF_MSG_ID_XCAST_MODES = 0x001,
32 FM10K_PF_MSG_ID_UPDATE_MAC_FWD_RULE = 0x002,
33 FM10K_PF_MSG_ID_LPORT_MAP = 0x100,
34 FM10K_PF_MSG_ID_LPORT_CREATE = 0x200,
35 FM10K_PF_MSG_ID_LPORT_DELETE = 0x201,
36 FM10K_PF_MSG_ID_CONFIG = 0x300,
37 FM10K_PF_MSG_ID_UPDATE_PVID = 0x400,
38 FM10K_PF_MSG_ID_CREATE_FLOW_TABLE = 0x501,
39 FM10K_PF_MSG_ID_DELETE_FLOW_TABLE = 0x502,
40 FM10K_PF_MSG_ID_UPDATE_FLOW = 0x503,
41 FM10K_PF_MSG_ID_DELETE_FLOW = 0x504,
42 FM10K_PF_MSG_ID_SET_FLOW_STATE = 0x505,
43 FM10K_PF_MSG_ID_GET_1588_INFO = 0x506,
44 FM10K_PF_MSG_ID_1588_TIMESTAMP = 0x701,
45};
46
47enum fm10k_pf_tlv_attr_id_v1 {
48 FM10K_PF_ATTR_ID_ERR = 0x00,
49 FM10K_PF_ATTR_ID_LPORT_MAP = 0x01,
50 FM10K_PF_ATTR_ID_XCAST_MODE = 0x02,
51 FM10K_PF_ATTR_ID_MAC_UPDATE = 0x03,
52 FM10K_PF_ATTR_ID_VLAN_UPDATE = 0x04,
53 FM10K_PF_ATTR_ID_CONFIG = 0x05,
54 FM10K_PF_ATTR_ID_CREATE_FLOW_TABLE = 0x06,
55 FM10K_PF_ATTR_ID_DELETE_FLOW_TABLE = 0x07,
56 FM10K_PF_ATTR_ID_UPDATE_FLOW = 0x08,
57 FM10K_PF_ATTR_ID_FLOW_STATE = 0x09,
58 FM10K_PF_ATTR_ID_FLOW_HANDLE = 0x0A,
59 FM10K_PF_ATTR_ID_DELETE_FLOW = 0x0B,
60 FM10K_PF_ATTR_ID_PORT = 0x0C,
61 FM10K_PF_ATTR_ID_UPDATE_PVID = 0x0D,
62 FM10K_PF_ATTR_ID_1588_TIMESTAMP = 0x10,
63};
64
65#define FM10K_MSG_LPORT_MAP_GLORT_SHIFT 0
66#define FM10K_MSG_LPORT_MAP_GLORT_SIZE 16
67#define FM10K_MSG_LPORT_MAP_MASK_SHIFT 16
68#define FM10K_MSG_LPORT_MAP_MASK_SIZE 16
69
70#define FM10K_MSG_UPDATE_PVID_GLORT_SHIFT 0
71#define FM10K_MSG_UPDATE_PVID_GLORT_SIZE 16
72#define FM10K_MSG_UPDATE_PVID_PVID_SHIFT 16
73#define FM10K_MSG_UPDATE_PVID_PVID_SIZE 16
74
75struct fm10k_mac_update {
76 __le32 mac_lower;
77 __le16 mac_upper;
78 __le16 vlan;
79 __le16 glort;
80 u8 flags;
81 u8 action;
82};
83
84struct fm10k_global_table_data {
85 __le32 used;
86 __le32 avail;
87};
88
89struct fm10k_swapi_error {
90 __le32 status;
91 struct fm10k_global_table_data mac;
92 struct fm10k_global_table_data nexthop;
93 struct fm10k_global_table_data ffu;
94};
95
96struct fm10k_swapi_1588_timestamp {
97 __le64 egress;
98 __le64 ingress;
99 __le16 dglort;
100 __le16 sglort;
101};
102
103s32 fm10k_msg_lport_map_pf(struct fm10k_hw *, u32 **, struct fm10k_mbx_info *);
104extern const struct fm10k_tlv_attr fm10k_lport_map_msg_attr[];
105#define FM10K_PF_MSG_LPORT_MAP_HANDLER(func) \
106 FM10K_MSG_HANDLER(FM10K_PF_MSG_ID_LPORT_MAP, \
107 fm10k_lport_map_msg_attr, func)
108s32 fm10k_msg_update_pvid_pf(struct fm10k_hw *, u32 **,
109 struct fm10k_mbx_info *);
110extern const struct fm10k_tlv_attr fm10k_update_pvid_msg_attr[];
111#define FM10K_PF_MSG_UPDATE_PVID_HANDLER(func) \
112 FM10K_MSG_HANDLER(FM10K_PF_MSG_ID_UPDATE_PVID, \
113 fm10k_update_pvid_msg_attr, func)
114
115s32 fm10k_msg_err_pf(struct fm10k_hw *, u32 **, struct fm10k_mbx_info *);
116extern const struct fm10k_tlv_attr fm10k_err_msg_attr[];
117#define FM10K_PF_MSG_ERR_HANDLER(msg, func) \
118 FM10K_MSG_HANDLER(FM10K_PF_MSG_ID_##msg, fm10k_err_msg_attr, func)
119
120extern const struct fm10k_tlv_attr fm10k_1588_timestamp_msg_attr[];
121#define FM10K_PF_MSG_1588_TIMESTAMP_HANDLER(func) \
122 FM10K_MSG_HANDLER(FM10K_PF_MSG_ID_1588_TIMESTAMP, \
123 fm10k_1588_timestamp_msg_attr, func)
124
27extern struct fm10k_info fm10k_pf_info; 125extern struct fm10k_info fm10k_pf_info;
28#endif /* _FM10K_PF_H */ 126#endif /* _FM10K_PF_H */