From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id D9A271B390 for ; Sun, 15 Oct 2017 14:56:08 +0200 (CEST) Received: by mail-wm0-f67.google.com with SMTP id b189so28563267wmd.4 for ; Sun, 15 Oct 2017 05:56:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dev-mellanox-co-il.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=H27l6+XLnGP2jwRP7hL5LiW/KNk+I5erhDZSQH64kLU=; b=RaKL4FDjTmC6cdVTKAeeAfPXPBf2EPyRQH5V4KUL77Nio6/juUoTAuM97XQMl3Up/D beXfO2ibiQzPjR8f1KkYeX2QMnp7ElDh6q7AtQGyH8lw3oqii913J7/c8KGSHDkzbuDN F2KsGPbR+EV4Nx4UhStfCcQF8mIk1FEqu9uoemQV4aK3y0MKdHSXjSeLjq50crE7KR+e sXxtlu1C++5ae9Vxx7d4qREsRcCGPYbnqzFQmnPWJwbAeapOcDkCA5Zv32ZaN4bGa1BZ WmVPLl+cOmUKPUCfH/hi6UD3uRecS/meWeBqQk2SFiOcTuTJ2bTfE8SDu3abT7nplVvU wtKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=H27l6+XLnGP2jwRP7hL5LiW/KNk+I5erhDZSQH64kLU=; b=ubnlppqeIFODtAITFGkmuVp7nS4vN+ZSzfIkbxscgxxfF1e+j6O/67+frwMWnp1Fja TaqlLDIk3Bbz70176Js/rIMB4uOwwUTYv29L4c9/+c8KER8r9pCSQRKtukzFNshfyUQp EVZ19yWaSF6JQFFZj6eqTEOKRnQKQ4s54lBcjo6wWIMBHILUmwwvwb+1JI20A4+mp+az jW5CNtd9WyHR+V9yC6ke2O1w5OWbv7dmLJvsKxsCoPSPEQj716nQGLCcJJgAvDNKCTa/ LQtUL6LNGArNIF07RmXWD0WoSGmk1Nq0u29QsYQDDR3h2PdXUexd0XCCkCowcNQhfp7+ 6Wdw== X-Gm-Message-State: AMCzsaVhGhqMBUhC+2MoKw5nU+SGfnouXfOKHPgX2ua9YeNnw/WoHkkH XWe2IgLOOUbsG8X7C/OUT75ePA== X-Google-Smtp-Source: AOwi7QAOci5RqzmWNkISIWuPlkqAJ78Hv0guLUA8CUQb53oqQO+IUe1BRObIFuSf6aD5NY8ww1HiZw== X-Received: by 10.80.179.120 with SMTP id r53mr9599255edd.174.1508072168637; Sun, 15 Oct 2017 05:56:08 -0700 (PDT) Received: from [10.0.38.219] ([193.47.165.251]) by smtp.gmail.com with ESMTPSA id z1sm4559724edz.97.2017.10.15.05.56.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Oct 2017 05:56:07 -0700 (PDT) To: dev@dpdk.org, sergio.gonzalez.monroy@intel.com, pablo.de.lara.guarch@intel.com, aviadye@mellanox.com Cc: borisp@mellanox.com, akhil.goyal@nxp.com, hemant.agrawal@nxp.com, radu.nicolau@intel.com, declan.doherty@intel.com, liranl@mellanox.com, nelio.laranjeiro@6wind.com, thomas@monjalon.net References: <1507987683-12315-1-git-send-email-aviadye@dev.mellanox.co.il> <1507987683-12315-9-git-send-email-aviadye@dev.mellanox.co.il> From: Aviad Yehezkel Message-ID: <36090dff-713a-087a-c6ee-8a94467b4341@dev.mellanox.co.il> Date: Sun, 15 Oct 2017 15:56:05 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <1507987683-12315-9-git-send-email-aviadye@dev.mellanox.co.il> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH 09/11] examples/ipsec-secgw: Fixed ip length in case of transport 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: Sun, 15 Oct 2017 12:56:09 -0000 On 10/14/2017 4:28 PM, aviadye@dev.mellanox.co.il wrote: > From: Aviad Yehezkel > > IP length was incorrect causing corrupted ICMP packets for example > > Signed-off-by: Aviad Yehezkel > --- > examples/ipsec-secgw/esp.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/examples/ipsec-secgw/esp.c b/examples/ipsec-secgw/esp.c > index 81ebf55..12c6f8c 100644 > --- a/examples/ipsec-secgw/esp.c > +++ b/examples/ipsec-secgw/esp.c > @@ -205,13 +205,13 @@ esp_inbound_post(struct rte_mbuf *m, struct ipsec_sa *sa, > if (likely(ip->ip_v == IPVERSION)) { > memmove(ip4, ip, ip->ip_hl * 4); > ip4->ip_p = *nexthdr; > - ip4->ip_len = htons(rte_pktmbuf_data_len(m)); > + ip4->ip_len = htons(rte_pktmbuf_pkt_len(m)); > } else { > ip6 = (struct ip6_hdr *)ip4; > /* XXX No option headers supported */ > memmove(ip6, ip, sizeof(struct ip6_hdr)); > ip6->ip6_nxt = *nexthdr; > - ip6->ip6_plen = htons(rte_pktmbuf_data_len(m)); > + ip6->ip6_plen = htons(rte_pktmbuf_pkt_len(m)); > } > } else > ipip_inbound(m, sizeof(struct esp_hdr) + sa->iv_len); Tested-by: Aviad Yehezkel