From patchwork Tue Dec 16 12:30:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 42327 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AEFEE2456A for ; Tue, 16 Dec 2014 12:31:45 +0000 (UTC) Received: by mail-la0-f69.google.com with SMTP id gd6sf8643803lab.0 for ; Tue, 16 Dec 2014 04:31:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=vHbLGnoZxLGzZbUnqIaR/POwxy35YFNmPch3I1cE3n8=; b=TCfpAyPjM/5Mrp2zkdcP9KqkCoz9KJlA8Nw2PqfI+WxXHE81pS8c0c4hIUnfT7KDUc LmKnpKE+IGq5VlnpCTbD+y4Cnvk9GZ3IzcKfjvayaqEbYoBMOOw2noS+MDrYrD8iVT4+ RJDo+K/oBOxgaMq22yVl/NriTcL21MbNzJlrFvNYOLAhwQlXfJ1kDXkkid/DqrkghciY xXGaWgzkQ2PRFcngE1jIATf5UnFmAiJDITw70q58A+DYBB9WC4yKvm30hkV3pP5cFxFh yv8YeUBhaagBIhwf85OGdlV0egamDPTe/5J1uSh1hM4kdbw1liYLPiIe3rkB+SpyDR1S LRxQ== X-Gm-Message-State: ALoCoQnrwU9ACLwiFhNjm8OMQvqGML9FjX6+ae8PjJ1n3sUVI97LJjymv3ROqcl098f+wRDC/QYx X-Received: by 10.180.8.232 with SMTP id u8mr252777wia.7.1418733104646; Tue, 16 Dec 2014 04:31:44 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.26.200 with SMTP id n8ls302658lag.15.gmail; Tue, 16 Dec 2014 04:31:44 -0800 (PST) X-Received: by 10.152.8.225 with SMTP id u1mr33292520laa.21.1418733104381; Tue, 16 Dec 2014 04:31:44 -0800 (PST) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id kt4si645894lac.71.2014.12.16.04.31.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Dec 2014 04:31:44 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by mail-lb0-f177.google.com with SMTP id b6so10382991lbj.8 for ; Tue, 16 Dec 2014 04:31:44 -0800 (PST) X-Received: by 10.152.45.41 with SMTP id j9mr35936708lam.59.1418733104250; Tue, 16 Dec 2014 04:31:44 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.142.69 with SMTP id ru5csp1019999lbb; Tue, 16 Dec 2014 04:31:43 -0800 (PST) X-Received: by 10.140.83.8 with SMTP id i8mr61054263qgd.103.1418733102694; Tue, 16 Dec 2014 04:31:42 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id 6si631752qaw.77.2014.12.16.04.31.41 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 16 Dec 2014 04:31:42 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Y0rHw-0006ag-7R; Tue, 16 Dec 2014 12:31:40 +0000 Received: from mail-lb0-f169.google.com ([209.85.217.169]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Y0rHM-0006UR-0Y for lng-odp@lists.linaro.org; Tue, 16 Dec 2014 12:31:04 +0000 Received: by mail-lb0-f169.google.com with SMTP id p9so10883557lbv.0 for ; Tue, 16 Dec 2014 04:30:58 -0800 (PST) X-Received: by 10.112.169.34 with SMTP id ab2mr6245355lbc.77.1418733058474; Tue, 16 Dec 2014 04:30:58 -0800 (PST) Received: from uglx0153363.synapse.com ([195.238.92.128]) by mx.google.com with ESMTPSA id eg2sm169516lbb.29.2014.12.16.04.30.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Dec 2014 04:30:57 -0800 (PST) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Tue, 16 Dec 2014 14:30:37 +0200 Message-Id: <1418733042-18047-5-git-send-email-taras.kondratiuk@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1418733042-18047-1-git-send-email-taras.kondratiuk@linaro.org> References: <1418733042-18047-1-git-send-email-taras.kondratiuk@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv5 4/9] api: packet: replace packet_addr with packet_data X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: taras.kondratiuk@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Bill Fischofer Signed-off-by: Bill Fischofer Signed-off-by: Taras Kondratiuk --- 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 --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;