From: Thomas Monjalon <thomas@monjalon.net>
To: Konstantin Ananyev <konstantin.ananyev@intel.com>
Cc: dev@dpdk.org, akhil.goyal@nxp.com
Subject: Re: [dpdk-dev] [PATCH] ipsec: fix compilation problem
Date: Mon, 14 Jan 2019 23:17:52 +0100 [thread overview]
Message-ID: <1875496.bnsbQ71OuB@xps> (raw)
In-Reply-To: <1547481483-25978-1-git-send-email-konstantin.ananyev@intel.com>
14/01/2019 16:58, Konstantin Ananyev:
> gcc 6.2 and 6.4 fails to compile lib/librte_ipsec/sa.c
> with the following errors:
> /local/kananye1/dpdk.org/lib/librte_ipsec/sa.c:
> In function âinline_outb_tun_pkt_processâ:
> dpdk.org/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:337:2:
> error: array subscript is above array bounds [-Werror=array-bounds]
> rte_mov32((uint8_t *)dst + 1 * 32, (const uint8_t *)src + 1 * 32);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ...
>
> It complains about the following lines of code:
> esp_outb_tun_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t
> ....
> /* update spi, seqn and iv */
> esph = (struct esp_hdr *)(ph + sa->hdr_len);
> iv = (uint64_t *)(esph + 1);
> rte_memcpy(iv, ivp, sa->iv_len);
>
> While I believe it is a false positive,
> it is too excessive to use rte_memcpy() here,
> as IV length could be only 0/8/16 bytes.
> So introduce small helper function to copy IV and use it
> instead of rte_memcpy().
>
> Fixes: 4d7ea3e1459b ("ipsec: implement SA data-path API")
> Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Applied, thanks
prev parent reply other threads:[~2019-01-14 22:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-14 15:58 Konstantin Ananyev
2019-01-14 22:17 ` Thomas Monjalon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1875496.bnsbQ71OuB@xps \
--to=thomas@monjalon.net \
--cc=akhil.goyal@nxp.com \
--cc=dev@dpdk.org \
--cc=konstantin.ananyev@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).