From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 731A43256 for ; Thu, 11 Jan 2018 10:16:37 +0100 (CET) Received: by mail-wm0-f68.google.com with SMTP id i186so3974670wmi.4 for ; Thu, 11 Jan 2018 01:16:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=TXp/Bq9c9LJYqxJo/6BBOxtBIMQG3H66BhCmNTJkTxg=; b=Qry5qS86pFJEfytTiQvvfZq6q9M46AdswYEvHPStnBtzhjRAf2OQWVOQh98IlXPht8 QE6Qmq2ucwt5CRZCPd/tpFfSMjV+y5coYrMhrvItVkSoNPQCAWU5nG8myE2ZajEk6V87 UhSAlRgrhQwg74pcYM/C5wpkds6e6eHTAXoVjJTNJ55N0ZBnP0lHh4+re7rWQALw85KE 147UdBB89f42huinmL1/dx4Aa4hE5gSt+x26AZuOlD0Z6Fi/Wzg7lzCDyBzehAlOfo6j F6US2EhrAzyJI1gUNcPy9e5CF/LtAc2dx32FB0EzZePXR7jCg6kfld4J6zCfaRaXhz7Q 6I+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=TXp/Bq9c9LJYqxJo/6BBOxtBIMQG3H66BhCmNTJkTxg=; b=rMbobU5ctgoVzYsM9nPOGm7/8ZFwbAyOXrekKUPLVPKKwBhBngXgALkS08mT6A7lEa SV/7x1VGXEkapdsYK25XwNIm0iXTZ2iKdl+OYW+e/IMfKcoJQxGxyJ71UhxY3xcAsey3 d2FIByVknpDjwvM3Hy+w35zemXP/TwvRqm+8+mzud4dlLCVQEYlE9jcE2pGcnDv7Xvhu Eeeu5n17kquqtEjx5HzVs+PnhAsPEml9QMF1zgrW0PO9TBDO4ZaBkPrbr5m4d2p0S83R PPw3sQqYBeLIf0boH4adm2awoJTIqo/a0TlZZMQMQD/a0VD4sTlE83d9uqb5YwI2LaZa uSWA== X-Gm-Message-State: AKwxytf5WvtxGui5qof4E5qJUbxk5E+qiE9R4S96BdnAzko9A0MZm2+i sxFcpEsSFirisjGPWh7eePPuJnYflQ== X-Google-Smtp-Source: ACJfBosMginR/ri46ZNWqJwyjeFDAmMS3LPtBIxmPTW+/jW7l7qMe/CX7RqM7TPtHJRxFvMGoqxxwg== X-Received: by 10.80.181.15 with SMTP id y15mr6063029edd.29.1515662197005; Thu, 11 Jan 2018 01:16:37 -0800 (PST) Received: from laranjeiro-vm.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id k19sm11209436ede.35.2018.01.11.01.16.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jan 2018 01:16:36 -0800 (PST) From: Nelio Laranjeiro To: dev@dpdk.org, Olivier Matz Cc: akhil.goyal@nxp.com Date: Thu, 11 Jan 2018 10:15:59 +0100 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH 2/2] examples/ipsec-secgw: fix SPI byte order in flow item X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jan 2018 09:16:37 -0000 SPI field is defined in the RFC2406 [1] as a big endian field it should be provided in its final form to the drivers through RTE flow. Fixes: ec17993a145a ("examples/ipsec-secgw: support security offload") Cc: akhil.goyal@nxp.com Signed-off-by: Nelio Laranjeiro [1] https://tools.ietf.org/html/rfc2406 --- examples/ipsec-secgw/ipsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c index 580e09a3a..8df0f00ab 100644 --- a/examples/ipsec-secgw/ipsec.c +++ b/examples/ipsec-secgw/ipsec.c @@ -195,7 +195,7 @@ create_session(struct ipsec_ctx *ipsec_ctx, struct ipsec_sa *sa) sa->pattern[2].type = RTE_FLOW_ITEM_TYPE_ESP; sa->pattern[2].spec = &sa->esp_spec; sa->pattern[2].mask = &rte_flow_item_esp_mask; - sa->esp_spec.hdr.spi = sa->spi; + sa->esp_spec.hdr.spi = rte_cpu_to_be_32(sa->spi); sa->pattern[3].type = RTE_FLOW_ITEM_TYPE_END; -- 2.11.0