diff mbox

[PATCHv5,4/9] api: packet: replace packet_addr with packet_data

Message ID 1418733042-18047-5-git-send-email-taras.kondratiuk@linaro.org
State Accepted
Commit e6af33ea44248f8feb80c587a18905943607bbbd
Headers show

Commit Message

Taras Kondratiuk Dec. 16, 2014, 12:30 p.m. UTC
From: Bill Fischofer <bill.fischofer@linaro.org>

Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
---
 example/ipsec/odp_ipsec.c                   | 8 ++++----
 platform/linux-generic/odp_classification.c | 2 +-
 platform/linux-generic/odp_crypto.c         | 8 ++++----
 3 files changed, 9 insertions(+), 9 deletions(-)
diff mbox

Patch

diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c
index c6f7471..518c132 100644
--- a/example/ipsec/odp_ipsec.c
+++ b/example/ipsec/odp_ipsec.c
@@ -676,7 +676,7 @@  pkt_disposition_e do_ipsec_in_classify(odp_packet_t pkt,
 				       pkt_ctx_t *ctx,
 				       bool *skip)
 {
-	uint8_t *buf = odp_packet_addr(pkt);
+	uint8_t *buf = odp_packet_data(pkt);
 	odph_ipv4hdr_t *ip = (odph_ipv4hdr_t *)odp_packet_l3_ptr(pkt, NULL);
 	int hdr_len;
 	odph_ahhdr_t *ah = NULL;
@@ -778,7 +778,7 @@  pkt_disposition_e do_ipsec_in_finish(odp_packet_t pkt,
 	 * Finish auth
 	 */
 	if (ctx->ipsec.ah_offset) {
-		uint8_t *buf = odp_packet_addr(pkt);
+		uint8_t *buf = odp_packet_data(pkt);
 		odph_ahhdr_t *ah;
 
 		ah = (odph_ahhdr_t *)(ctx->ipsec.ah_offset + buf);
@@ -836,7 +836,7 @@  pkt_disposition_e do_ipsec_out_classify(odp_packet_t pkt,
 					pkt_ctx_t *ctx,
 					bool *skip)
 {
-	uint8_t *buf = odp_packet_addr(pkt);
+	uint8_t *buf = odp_packet_data(pkt);
 	odph_ipv4hdr_t *ip = (odph_ipv4hdr_t *)odp_packet_l3_ptr(pkt, NULL);
 	uint16_t ip_data_len = ipv4_data_len(ip);
 	uint8_t *ip_data = ipv4_data_p(ip);
@@ -954,7 +954,7 @@  static
 pkt_disposition_e do_ipsec_out_seq(odp_packet_t pkt,
 				   pkt_ctx_t *ctx)
 {
-	uint8_t *buf = odp_packet_addr(pkt);
+	uint8_t *buf = odp_packet_data(pkt);
 	bool posted = 0;
 
 	/* We were dispatched from atomic queue, assign sequence numbers */
diff --git a/platform/linux-generic/odp_classification.c b/platform/linux-generic/odp_classification.c
index 3cb1537..eeb049a 100644
--- a/platform/linux-generic/odp_classification.c
+++ b/platform/linux-generic/odp_classification.c
@@ -816,7 +816,7 @@  int packet_classifier(odp_pktio_t pktio, odp_packet_t pkt)
 		return -1;
 
 	pkt_hdr = odp_packet_hdr(pkt);
-	pkt_addr = odp_packet_addr(pkt);
+	pkt_addr = odp_packet_data(pkt);
 
 	/* Matching PMR and selecting the CoS for the packet*/
 	cos = pktio_select_cos(entry, pkt_addr, pkt_hdr);
diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c
index 4c584fc..89a5714 100644
--- a/platform/linux-generic/odp_crypto.c
+++ b/platform/linux-generic/odp_crypto.c
@@ -79,7 +79,7 @@  static
 enum crypto_alg_err md5_gen(odp_crypto_op_params_t *params,
 			    odp_crypto_generic_session_t *session)
 {
-	uint8_t *data  = odp_packet_addr(params->out_pkt);
+	uint8_t *data  = odp_packet_data(params->out_pkt);
 	uint8_t *icv   = data;
 	uint32_t len   = params->auth_range.length;
 	uint8_t  hash[EVP_MAX_MD_SIZE];
@@ -107,7 +107,7 @@  static
 enum crypto_alg_err md5_check(odp_crypto_op_params_t *params,
 			      odp_crypto_generic_session_t *session)
 {
-	uint8_t *data  = odp_packet_addr(params->out_pkt);
+	uint8_t *data  = odp_packet_data(params->out_pkt);
 	uint8_t *icv   = data;
 	uint32_t len   = params->auth_range.length;
 	uint32_t bytes = session->auth.data.md5.bytes;
@@ -145,7 +145,7 @@  static
 enum crypto_alg_err des_encrypt(odp_crypto_op_params_t *params,
 				odp_crypto_generic_session_t *session)
 {
-	uint8_t *data  = odp_packet_addr(params->out_pkt);
+	uint8_t *data  = odp_packet_data(params->out_pkt);
 	uint32_t len   = params->cipher_range.length;
 	DES_cblock *iv = NULL;
 	DES_cblock iv_temp;
@@ -188,7 +188,7 @@  static
 enum crypto_alg_err des_decrypt(odp_crypto_op_params_t *params,
 				odp_crypto_generic_session_t *session)
 {
-	uint8_t *data  = odp_packet_addr(params->out_pkt);
+	uint8_t *data  = odp_packet_data(params->out_pkt);
 	uint32_t len   = params->cipher_range.length;
 	DES_cblock *iv = (DES_cblock *)session->cipher.iv.data;