summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJ. German Rivera <Jose.G.Rivera@freescale.com>2013-08-27 20:35:29 (GMT)
committerJ. German Rivera <German.Rivera@freescale.com>2013-08-27 20:35:29 (GMT)
commitd31c3420a6c6cb9ff562b63b1ee1244220bf452a (patch)
tree1f5b40a977352db650127b35ec39d5a1a6ad8131 /include
parentcfcf5698abc686331d7b79b412b4d1bebdb09424 (diff)
parenta133e4d9e7412890f61a978a24f80fc085b4eca5 (diff)
downloadlinux-fsl-qoriq-d31c3420a6c6cb9ff562b63b1ee1244220bf452a.tar.xz
Merge branch 'sdk-kernel-3.8' into master
Diffstat (limited to 'include')
-rw-r--r--include/linux/fsl_dpa_classifier.h17
-rw-r--r--include/linux/fsl_dpa_stats.h67
-rw-r--r--include/linux/fsl_usdpaa.h12
-rw-r--r--include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h86
4 files changed, 143 insertions, 39 deletions
diff --git a/include/linux/fsl_dpa_classifier.h b/include/linux/fsl_dpa_classifier.h
index f81ea90..6199aa0 100644
--- a/include/linux/fsl_dpa_classifier.h
+++ b/include/linux/fsl_dpa_classifier.h
@@ -1505,12 +1505,6 @@ struct dpa_cls_mcast_group_params {
unsigned int prefilled_members;
/*
- * External group handle given as input parameter for an import
- * operation
- */
- void *group;
-
- /*
* External distribution handle. When provided, replicated frames
* are not enqueued to members' frame queues. They are sent to this
* distribution.
@@ -1523,12 +1517,21 @@ struct dpa_cls_mcast_group_params {
void *classification;
};
+/* Multicast group external resource */
+struct dpa_cls_mcast_group_resources {
+ /*
+ * Multicast group handle used when importing an external group node
+ */
+ void *group_node;
+};
+
/*
* Creates a multicast group with one member
*/
int dpa_classif_mcast_create_group(
const struct dpa_cls_mcast_group_params *group_params,
- int *grpd);
+ int *grpd,
+ const struct dpa_cls_mcast_group_resources *res);
/*
* Adds a new member to a multicast group
diff --git a/include/linux/fsl_dpa_stats.h b/include/linux/fsl_dpa_stats.h
index ba11791..b8fe850 100644
--- a/include/linux/fsl_dpa_stats.h
+++ b/include/linux/fsl_dpa_stats.h
@@ -396,8 +396,11 @@ struct dpa_stats_cnt_classif_tbl {
/* Table descriptor */
int td;
- /* Key to identify a specific entry */
- struct dpa_offload_lookup_key key;
+ /*
+ * Pointer to a key that identifies a specific entry or NULL in order
+ * to obtain statistics for miss entry
+ */
+ struct dpa_offload_lookup_key *key;
/*
* Single or multiple selection of Classifier Table counters
@@ -429,8 +432,11 @@ struct dpa_stats_cnt_classif_node {
/* The type of FMAN Classification Node */
enum dpa_stats_classif_node_type ccnode_type;
- /* Key to identify a specific entry */
- struct dpa_offload_lookup_key key;
+ /*
+ * Pointer to a key that identifies a specific entry or NULL in order
+ * to obtain statistics for miss entry
+ */
+ struct dpa_offload_lookup_key *key;
/*
* Single or multiple selection of Classifier
@@ -576,11 +582,17 @@ enum dpa_stats_classif_key_type {
/* DPA Stats Classification counter - pair of keys */
struct dpa_offload_lookup_key_pair {
- /* Key to identify the first entry */
- struct dpa_offload_lookup_key first_key;
+ /*
+ * Pointer to a key that identifies the first entry or NULL in order
+ * to identify the miss entry of the first table
+ */
+ struct dpa_offload_lookup_key *first_key;
- /* Key to identify the entry connected to the first entry */
- struct dpa_offload_lookup_key second_key;
+ /*
+ * Pointer to a key that identifies the entry connected to the first
+ * entry first entry or NULL in order to identify the miss entry
+ */
+ struct dpa_offload_lookup_key *second_key;
};
/* DPA Stats Classifier Table class counter parameters */
@@ -601,18 +613,28 @@ struct dpa_stats_cls_cnt_classif_tbl {
*/
/*
- * Array of keys to identify specific entries. A key can be
- * 'invalidated' by providing the 'byte' and 'mask' pointers
- * set to NULL.
+ * Pointer to an array of keys, where each element of the array
+ * can either be a key that identifies a specific entry or NULL
+ * in order to obtain the statistics for the miss entry. A key
+ * can be'invalidated' by providing the 'byte' pointer set
+ * to NULL.
*/
- struct dpa_offload_lookup_key *keys;
+ struct dpa_offload_lookup_key **keys;
/*
* Array of 'pair-keys' to identify specific entries. A key pair
* can be 'invalidated' by providing the 'byte' and 'mask'
* pointers of the first key set to NULL
*/
- struct dpa_offload_lookup_key_pair *pairs;
+
+ /*
+ * Pointer to an array of ‘pair-keys’, where each element of the
+ * array can either be a ‘pair-key’ that identifies a specific
+ * entry or NULL in in order to obtain the statistics for the
+ * miss entry. A key pair can be 'invalidated' by providing the
+ * 'byte' pointer of the first key set to NULL.
+ */
+ struct dpa_offload_lookup_key_pair **pairs;
};
/*
@@ -636,7 +658,7 @@ struct dpa_stats_cls_cnt_classif_node {
enum dpa_stats_classif_node_type ccnode_type;
/* Array of keys to identify specific entries */
- struct dpa_offload_lookup_key *keys;
+ struct dpa_offload_lookup_key **keys;
/*
* Single or multiple selection of Classifier counters
@@ -739,17 +761,20 @@ struct dpa_stats_cls_member_params {
union {
/*
- * Key to set or update in case the byte and mask pointers are
- * not NULL, or class member to invalidate otherwise
+ * Pointer to a key to set or update in case the byte pointer is
+ * not NULL, or class member to invalidate otherwise. The
+ * pointer can be NULL, in which case it represents the miss
+ * entry.
*/
- struct dpa_offload_lookup_key key;
+ struct dpa_offload_lookup_key *key;
/*
- * Key to set or update in case the byte and mask pointers of
- * the first key are not NULL, or class member to invalidate
- * otherwise
+ * Pointer to a 'pair-key' to set or update in case the byte
+ * pointer of the first key is not NULL, or class member to
+ * invalidate otherwise. The pointer can be NULL, in which case
+ * it represents the miss entry.
*/
- struct dpa_offload_lookup_key_pair pair;
+ struct dpa_offload_lookup_key_pair *pair;
/*
* Security association identifier to set or update or class
diff --git a/include/linux/fsl_usdpaa.h b/include/linux/fsl_usdpaa.h
index de017a6..fbf9480 100644
--- a/include/linux/fsl_usdpaa.h
+++ b/include/linux/fsl_usdpaa.h
@@ -165,9 +165,17 @@ enum usdpaa_portal_type {
usdpaa_portal_bman,
};
+#define QBMAN_ANY_PORTAL_IDX 0xffffffff
+
struct usdpaa_ioctl_portal_map {
/* Input parameter, is a qman or bman portal required. */
+
enum usdpaa_portal_type type;
+ /* Specifes a specific portal index to map or QBMAN_ANY_PORTAL_IDX
+ for don't care. The portal index will be populated by the
+ driver when the ioctl() successfully completes */
+ uint32_t index;
+
/* Return value if the map succeeds, this gives the mapped
* cache-inhibited (cinh) and cache-enabled (cena) addresses. */
struct usdpaa_portal_map {
@@ -183,6 +191,10 @@ struct usdpaa_ioctl_portal_map {
struct compat_usdpaa_ioctl_portal_map {
/* Input parameter, is a qman or bman portal required. */
enum usdpaa_portal_type type;
+ /* Specifes a specific portal index to map or QBMAN_ANY_PORTAL_IDX
+ for don't care. The portal index will be populated by the
+ driver when the ioctl() successfully completes */
+ uint32_t index;
/* Return value if the map succeeds, this gives the mapped
* cache-inhibited (cinh) and cache-enabled (cena) addresses. */
struct usdpaa_portal_map_compat {
diff --git a/include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h b/include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h
index 93bbebb..542f935 100644
--- a/include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h
+++ b/include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h
@@ -78,7 +78,7 @@
#define IOC_FM_PCD_PRS_NUM_OF_HDRS 16 /**< Number of headers supported by HW parser */
#define IOC_FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS (32 - IOC_FM_PCD_MAX_NUM_OF_PRIVATE_HDRS)
- /**< Number of distinction units is limited by
+ /**< Number of distinction units is limited by
register size (32 bits) minus reserved bits
for private headers. */
#define IOC_FM_PCD_MAX_NUM_OF_INTERCHANGEABLE_HDRS 4 /**< Maximum number of interchangeable headers
@@ -96,16 +96,6 @@
#define IOC_FM_PCD_SW_PRS_SIZE 0x00000800 /**< Total size of SW parser area */
#define IOC_FM_PCD_PRS_SW_OFFSET 0x00000040 /**< Size of illegal addresses at the beginning
of the SW parser area */
-#if DPAA_VERSION >= 11
-#define IOC_FM_PCD_PRS_SW_PATCHES_SIZE 0x00000240 /**< Number of bytes saved for patches */
-#else
-#define IOC_FM_PCD_PRS_SW_PATCHES_SIZE 0x00000200 /**< Number of bytes saved for patches */
-#endif
-
-#define IOC_FM_PCD_PRS_SW_TAIL_SIZE 4 /**< Number of bytes that must be cleared at
- the end of the SW parser area */
-#define IOC_FM_SW_PRS_MAX_IMAGE_SIZE (IOC_FM_PCD_SW_PRS_SIZE-IOC_FM_PCD_PRS_SW_OFFSET-IOC_FM_PCD_PRS_SW_TAIL_SIZE-IOC_FM_PCD_PRS_SW_PATCHES_SIZE)
- /**< Maximum size of SW parser code */
#define IOC_FM_PCD_MAX_MANIP_INSRT_TEMPLATE_SIZE 128 /**< Maximum size of insertion template for
insert manipulation */
@@ -2117,6 +2107,80 @@ typedef struct ioc_fm_pcd_frm_replic_member_params_t {
} ioc_fm_pcd_frm_replic_member_params_t;
#endif /* DPAA_VERSION >= 11 */
+
+typedef struct ioc_fm_pcd_cc_key_statistics_t {
+ uint32_t byte_count; /**< This counter reflects byte count of frames that
+ were matched by this key. */
+ uint32_t frame_count; /**< This counter reflects count of frames that
+ were matched by this key. */
+#if (DPAA_VERSION >= 11)
+ uint32_t frame_length_range_count[IOC_FM_PCD_CC_STATS_MAX_NUM_OF_FLR];
+ /**< These counters reflect how many frames matched
+ this key in 'RMON' statistics mode:
+ Each counter holds the number of frames of a
+ specific frames length range, according to the
+ ranges provided at initialization. */
+#endif /* (DPAA_VERSION >= 11) */
+} ioc_fm_pcd_cc_key_statistics_t;
+
+
+typedef struct ioc_fm_pcd_cc_tbl_get_miss_params_t {
+ void *id;
+ ioc_fm_pcd_cc_key_statistics_t miss_statistics;
+} ioc_fm_pcd_cc_tbl_get_miss_params_t;
+
+
+/**************************************************************************//**
+ @Function FM_PCD_MatchTableGetMissStatistics
+
+ @Description This routine may be used to get statistics counters of miss entry
+ in a CC Node.
+
+ If 'e_FM_PCD_CC_STATS_MODE_FRAME' and
+ 'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,
+ these counters reflect how many frames were not matched to any
+ existing key and therefore passed through the miss entry; The
+ total frames count will be returned in the counter of the
+ first range (as only one frame length range was defined).
+
+ @Param[in] h_CcNode A handle to the node
+ @Param[out] p_MissStatistics Statistics counters for 'miss'
+
+ @Return E_OK on success; Error code otherwise.
+
+ @Cautions Allowed only following FM_PCD_MatchTableSet().
+*//***************************************************************************/
+
+#if defined(CONFIG_COMPAT)
+#define FM_PCD_IOC_MATCH_TABLE_GET_MISS_STAT_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(12), ioc_compat_fm_pcd_cc_tbl_get_miss_params_t)
+#endif
+#define FM_PCD_IOC_MATCH_TABLE_GET_MISS_STAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(12), ioc_fm_pcd_cc_tbl_get_miss_params_t)
+
+/**************************************************************************//**
+ @Function FM_PCD_HashTableGetMissStatistics
+
+ @Description This routine may be used to get statistics counters of 'miss'
+ entry of the a hash table.
+
+ If 'e_FM_PCD_CC_STATS_MODE_FRAME' and
+ 'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,
+ these counters reflect how many frames were not matched to any
+ existing key and therefore passed through the miss entry;
+
+ @Param[in] h_HashTbl A handle to a hash table
+ @Param[out] p_MissStatistics Statistics counters for 'miss'
+
+ @Return E_OK on success; Error code otherwise.
+
+ @Cautions Allowed only following FM_PCD_HashTableSet().
+*//***************************************************************************/
+
+#if defined(CONFIG_COMPAT)
+#define FM_PCD_IOC_HASH_TABLE_GET_MISS_STAT_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(13), ioc_compat_fm_pcd_cc_tbl_get_miss_params_t)
+#endif
+#define FM_PCD_IOC_HASH_TABLE_GET_MISS_STAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(13), ioc_fm_pcd_cc_tbl_get_miss_params_t)
+
+
/**************************************************************************//**
@Function FM_PCD_NetEnvCharacteristicsSet