X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fmvpp2%2Fmrvl_ethdev.h;h=db6632f5b6af087da3dbe104f7a9bf33986f5038;hb=ce77e6bf5113650e6d026e0b7fb395b60ab1f363;hp=ecb8fdccbbb1d355522abf61fa52c124ecf26d90;hpb=cdb53f8da628794b6e3e8440d2d52293e2b92642;p=dpdk.git diff --git a/drivers/net/mvpp2/mrvl_ethdev.h b/drivers/net/mvpp2/mrvl_ethdev.h index ecb8fdccbb..db6632f5b6 100644 --- a/drivers/net/mvpp2/mrvl_ethdev.h +++ b/drivers/net/mvpp2/mrvl_ethdev.h @@ -10,6 +10,7 @@ #include #include #include +#include /* * container_of is defined by both DPDK and MUSDK, @@ -71,6 +72,13 @@ /** Minimum number of sent buffers to release from shadow queue to BM */ #define MRVL_PP2_BUF_RELEASE_BURST_SIZE 64 +#define MRVL_PP2_VLAN_TAG_LEN 4 +#define MRVL_PP2_ETH_HDRS_LEN (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + \ + (2 * MRVL_PP2_VLAN_TAG_LEN)) +#define MRVL_PP2_HDRS_LEN (MV_MH_SIZE + MRVL_PP2_ETH_HDRS_LEN) +#define MRVL_PP2_MTU_TO_MRU(mtu) ((mtu) + MRVL_PP2_HDRS_LEN) +#define MRVL_PP2_MRU_TO_MTU(mru) ((mru) - MRVL_PP2_HDRS_LEN) + /** Maximum length of a match string */ #define MRVL_MATCH_LEN 16 @@ -134,6 +142,29 @@ struct mrvl_mtr { struct pp2_cls_plcr *plcr; }; +struct mrvl_tm_shaper_profile { + LIST_ENTRY(mrvl_tm_shaper_profile) next; + uint32_t id; + int refcnt; + struct rte_tm_shaper_params params; +}; + +enum { + MRVL_NODE_PORT, + MRVL_NODE_QUEUE, +}; + +struct mrvl_tm_node { + LIST_ENTRY(mrvl_tm_node) next; + uint32_t id; + uint32_t type; + int refcnt; + struct mrvl_tm_node *parent; + struct mrvl_tm_shaper_profile *profile; + uint8_t weight; + uint64_t stats_mask; +}; + struct mrvl_priv { /* Hot fields, used in fast path. */ struct pp2_bpool *bpool; /**< BPool pointer */ @@ -157,6 +188,7 @@ struct mrvl_priv { uint8_t uc_mc_flushed; uint8_t vlan_flushed; uint8_t isolated; + uint8_t multiseg; struct pp2_ppio_params ppio_params; struct pp2_cls_qos_tbl_params qos_tbl_params; @@ -168,11 +200,15 @@ struct mrvl_priv { uint32_t cls_tbl_pattern; LIST_HEAD(mrvl_flows, rte_flow) flows; - struct pp2_cls_plcr *policer; + struct pp2_cls_plcr *default_policer; LIST_HEAD(profiles, mrvl_mtr_profile) profiles; LIST_HEAD(mtrs, mrvl_mtr) mtrs; uint32_t used_plcrs; + + LIST_HEAD(shaper_profiles, mrvl_tm_shaper_profile) shaper_profiles; + LIST_HEAD(nodes, mrvl_tm_node) nodes; + uint64_t rate_max; }; /** Flow operations forward declaration. */ @@ -181,6 +217,9 @@ extern const struct rte_flow_ops mrvl_flow_ops; /** Meter operations forward declaration. */ extern const struct rte_mtr_ops mrvl_mtr_ops; +/** Traffic manager operations forward declaration. */ +extern const struct rte_tm_ops mrvl_tm_ops; + /** Current log type. */ extern int mrvl_logtype;