diff mbox series

[API-NEXT,v1,4/13] linux-gen: classification: mark several functions as static

Message ID 1501837208-7450-5-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v1,1/13] linux-gen: hide get_qentry | expand

Commit Message

Github ODP bot Aug. 4, 2017, 8:59 a.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 108 (lumag:symbols-cleanup)
 ** https://github.com/Linaro/odp/pull/108
 ** Patch: https://github.com/Linaro/odp/pull/108.patch
 ** Base sha: 8390f890d4bd2babb63a24f7b15d2f4763e44050
 ** Merge commit sha: 44fd671a0d2772a32395c7f0574aa545d2a9aa71
 **/
 .../include/odp_classification_internal.h          | 84 ----------------------
 platform/linux-generic/odp_classification.c        | 38 ++++++++++
 2 files changed, 38 insertions(+), 84 deletions(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/include/odp_classification_internal.h b/platform/linux-generic/include/odp_classification_internal.h
index aca8e8c6..c8dba135 100644
--- a/platform/linux-generic/include/odp_classification_internal.h
+++ b/platform/linux-generic/include/odp_classification_internal.h
@@ -30,16 +30,6 @@  extern "C" {
 
 /**
 @internal
-match_qos_cos
-
-Select a CoS for the given Packet based on QoS values
-This function returns the COS object matching the L2 and L3 QoS
-based on the l3_preference value of the pktio
-**/
-cos_t *match_qos_cos(pktio_entry_t *entry, const uint8_t *pkt_addr,
-		     odp_packet_hdr_t *hdr);
-/**
-@internal
 
 Packet Classifier
 
@@ -59,39 +49,11 @@  This function should be called during pktio initialization.
 **/
 int pktio_classifier_init(pktio_entry_t *pktio);
 
-/**
-@internal
-match_pmr_cos
-
-Match a PMR chain with a Packet and return matching CoS
-This function gets called recursively to check the chained PMR Term value
-with the packet.
-
-**/
-cos_t *match_pmr_cos(cos_t *cos, const uint8_t *pkt_addr, pmr_t *pmr,
-		     odp_packet_hdr_t *hdr);
-/**
-@internal
-CoS associated with L3 QoS value
-
-This function returns the CoS associated with L3 QoS value
-**/
-cos_t *match_qos_l3_cos(pmr_l3_cos_t *l3_cos, const uint8_t *pkt_addr,
-			odp_packet_hdr_t *hdr);
-
 void _odp_cls_update_hash_proto(cos_t *cos,
 				odp_pktin_hash_proto_t hash_proto);
 
 /**
 @internal
-CoS associated with L2 QoS value
-
-This function returns the CoS associated with L2 QoS value
-**/
-cos_t *match_qos_l2_cos(pmr_l2_cos_t *l2_cos, const uint8_t *pkt_addr,
-			odp_packet_hdr_t *hdr);
-/**
-@internal
 Flow Signature Calculation
 
 This function calculates the Flow Signature for a packet based on
@@ -99,52 +61,6 @@  CoS and updates in Packet Meta Data
 **/
 int update_flow_signature(uint8_t *pkt_addr, cos_t *cos);
 
-/**
-@internal
-Allocate a odp_pmr_t Handle
-*/
-odp_pmr_t alloc_pmr(pmr_t **pmr);
-
-/**
-@internal
-Pointer to pmr_t Handle
-This function checks for validity of odp_pmr_t Handle
-*/
-pmr_t *get_pmr_entry(odp_pmr_t pmr_id);
-
-/**
-@internal
-Pointer to pmr_t Handle
-*/
-pmr_t *get_pmr_entry_internal(odp_pmr_t pmr_id);
-
-/**
-@internal
-Pointer to odp_cos_t Handle
-*/
-cos_t *get_cos_entry(odp_cos_t cos_id);
-
-/**
-@internal
-Pointer to odp_cos_t Handle
-This function checks for validity of odp_cos_t Handle
-*/
-cos_t *get_cos_entry_internal(odp_cos_t cos_id);
-
-/**
-@internal
-Verify PMR with a Packet
-
-This function goes through each PMR_TERM value in pmr_t structure and
-calls verification function for each term.Returns 1 if PMR matches or 0
-Otherwise.
-**/
-int verify_pmr(pmr_t *pmr, const uint8_t *pkt_addr, odp_packet_hdr_t *pkt_hdr);
-
-uint32_t packet_rss_hash(odp_packet_hdr_t *pkt_hdr,
-			 odp_cls_hash_proto_t hash_proto,
-			 const uint8_t *base);
-
 #ifdef __cplusplus
 }
 #endif
diff --git a/platform/linux-generic/odp_classification.c b/platform/linux-generic/odp_classification.c
index 892d2fad..78063a72 100644
--- a/platform/linux-generic/odp_classification.c
+++ b/platform/linux-generic/odp_classification.c
@@ -33,6 +33,7 @@  static cos_tbl_t *cos_tbl;
 static pmr_tbl_t	*pmr_tbl;
 static _cls_queue_grp_tbl_t *queue_grp_tbl;
 
+static
 const rss_key default_rss = {
 	.u8 = {
 	0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2,
@@ -43,11 +44,13 @@  const rss_key default_rss = {
 	}
 };
 
+static
 cos_t *get_cos_entry_internal(odp_cos_t cos_id)
 {
 	return &cos_tbl->cos_entry[_odp_typeval(cos_id)];
 }
 
+static
 pmr_t *get_pmr_entry_internal(odp_pmr_t pmr_id)
 {
 	return &pmr_tbl->pmr[_odp_typeval(pmr_id)];
@@ -273,6 +276,10 @@  odp_cos_t odp_cls_cos_create(const char *name, odp_cls_cos_param_t *param)
 	return ODP_COS_INVALID;
 }
 
+/*
+ * Allocate an odp_pmr_t Handle
+ */
+static
 odp_pmr_t alloc_pmr(pmr_t **pmr)
 {
 	int i;
@@ -293,6 +300,7 @@  odp_pmr_t alloc_pmr(pmr_t **pmr)
 	return ODP_PMR_INVAL;
 }
 
+static
 cos_t *get_cos_entry(odp_cos_t cos_id)
 {
 	if (_odp_typeval(cos_id) >= CLS_COS_MAX_ENTRY ||
@@ -303,6 +311,7 @@  cos_t *get_cos_entry(odp_cos_t cos_id)
 	return &cos_tbl->cos_entry[_odp_typeval(cos_id)];
 }
 
+static
 pmr_t *get_pmr_entry(odp_pmr_t pmr_id)
 {
 	if (_odp_typeval(pmr_id) >= CLS_PMR_MAX_ENTRY ||
@@ -707,6 +716,11 @@  odp_pool_t odp_cls_cos_pool(odp_cos_t cos_id)
 	return cos->s.pool;
 }
 
+/*
+ * This function goes through each PMR_TERM value in pmr_t structure and calls
+ * verification function for each term.Returns 1 if PMR matches or 0 otherwise.
+ */
+static
 int verify_pmr(pmr_t *pmr, const uint8_t *pkt_addr, odp_packet_hdr_t *pkt_hdr)
 {
 	int pmr_failure = 0;
@@ -825,6 +839,12 @@  int verify_pmr(pmr_t *pmr, const uint8_t *pkt_addr, odp_packet_hdr_t *pkt_hdr)
 	return true;
 }
 
+/*
+ * Match a PMR chain with a Packet and return matching CoS
+ * This function gets called recursively to check the chained PMR Term value
+ * with the packet.
+ */
+static
 cos_t *match_pmr_cos(cos_t *cos, const uint8_t *pkt_addr, pmr_t *pmr,
 		     odp_packet_hdr_t *hdr)
 {
@@ -871,6 +891,10 @@  int pktio_classifier_init(pktio_entry_t *entry)
 	return 0;
 }
 
+static
+cos_t *match_qos_cos(pktio_entry_t *entry, const uint8_t *pkt_addr,
+		     odp_packet_hdr_t *hdr);
+
 /**
 Select a CoS for the given Packet based on pktio
 
@@ -914,6 +938,11 @@  static inline cos_t *cls_select_cos(pktio_entry_t *entry,
 	return cls->default_cos;
 }
 
+static
+uint32_t packet_rss_hash(odp_packet_hdr_t *pkt_hdr,
+			 odp_cls_hash_proto_t hash_proto,
+			 const uint8_t *base);
+
 /**
  * Classify packet
  *
@@ -969,6 +998,7 @@  int cls_classify_packet(pktio_entry_t *entry, const uint8_t *base,
 	return 0;
 }
 
+static
 uint32_t packet_rss_hash(odp_packet_hdr_t *pkt_hdr,
 			 odp_cls_hash_proto_t hash_proto,
 			 const uint8_t *base)
@@ -1037,6 +1067,7 @@  uint32_t packet_rss_hash(odp_packet_hdr_t *pkt_hdr,
 	return hash;
 }
 
+static
 cos_t *match_qos_l3_cos(pmr_l3_cos_t *l3_cos, const uint8_t *pkt_addr,
 			odp_packet_hdr_t *hdr)
 {
@@ -1058,6 +1089,7 @@  cos_t *match_qos_l3_cos(pmr_l3_cos_t *l3_cos, const uint8_t *pkt_addr,
 	return cos;
 }
 
+static
 cos_t *match_qos_l2_cos(pmr_l2_cos_t *l2_cos, const uint8_t *pkt_addr,
 			odp_packet_hdr_t *hdr)
 {
@@ -1077,6 +1109,12 @@  cos_t *match_qos_l2_cos(pmr_l2_cos_t *l2_cos, const uint8_t *pkt_addr,
 	return cos;
 }
 
+/*
+ * Select a CoS for the given Packet based on QoS values
+ * This function returns the COS object matching the L2 and L3 QoS
+ * based on the l3_preference value of the pktio
+*/
+static
 cos_t *match_qos_cos(pktio_entry_t *entry, const uint8_t *pkt_addr,
 		     odp_packet_hdr_t *hdr)
 {