aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/netronome/nfp/abm/main.h
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2018-11-19 15:21:47 -0800
committerDavid S. Miller <davem@davemloft.net>2018-11-19 18:53:46 -0800
commit14780c34294f41da8f02d99d7b6ada990e685561 (patch)
tree70cb8d6c243481b1763d5f66f57cdad376b5afc9 /drivers/net/ethernet/netronome/nfp/abm/main.h
parentnet: sched: cls_u32: add res to offload information (diff)
downloadlinux-dev-14780c34294f41da8f02d99d7b6ada990e685561.tar.xz
linux-dev-14780c34294f41da8f02d99d7b6ada990e685561.zip
nfp: abm: calculate PRIO map len and check mailbox size
In preparation for PRIO offload calculate how long the prio map for FW will be and make sure the configuration can be performed via the vNIC mailbox. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/abm/main.h')
-rw-r--r--drivers/net/ethernet/netronome/nfp/abm/main.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/abm/main.h b/drivers/net/ethernet/netronome/nfp/abm/main.h
index 6bb4e60c1ad8..1ca2768cd5a2 100644
--- a/drivers/net/ethernet/netronome/nfp/abm/main.h
+++ b/drivers/net/ethernet/netronome/nfp/abm/main.h
@@ -34,9 +34,11 @@ struct nfp_net;
* @thresholds: current threshold configuration
* @threshold_undef: bitmap of thresholds which have not been set
* @num_thresholds: number of @thresholds and bits in @threshold_undef
+ * @prio_map_len: computed length of FW priority map (in bytes)
*
* @eswitch_mode: devlink eswitch mode, advanced functions only visible
* in switchdev mode
+ *
* @q_lvls: queue level control area
* @qm_stats: queue statistics symbol
* @q_stats: basic queue statistics (only in per-band case)
@@ -51,8 +53,10 @@ struct nfp_abm {
u32 *thresholds;
unsigned long *threshold_undef;
size_t num_thresholds;
+ unsigned int prio_map_len;
enum devlink_eswitch_mode eswitch_mode;
+
const struct nfp_rtsym *q_lvls;
const struct nfp_rtsym *qm_stats;
const struct nfp_rtsym *q_stats;
@@ -201,7 +205,7 @@ int nfp_abm_setup_tc_mq(struct net_device *netdev, struct nfp_abm_link *alink,
int nfp_abm_setup_tc_gred(struct net_device *netdev, struct nfp_abm_link *alink,
struct tc_gred_qopt_offload *opt);
-void nfp_abm_ctrl_read_params(struct nfp_abm_link *alink);
+int nfp_abm_ctrl_read_params(struct nfp_abm_link *alink);
int nfp_abm_ctrl_find_addrs(struct nfp_abm *abm);
int __nfp_abm_ctrl_set_q_lvl(struct nfp_abm *abm, unsigned int id, u32 val);
int nfp_abm_ctrl_set_q_lvl(struct nfp_abm_link *alink, unsigned int band,