All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhang, Helin" <helin.zhang@intel.com>
To: "Xie, Huawei" <huawei.xie@intel.com>,
	"Ouyang, Changchun" <changchun.ouyang@intel.com>,
	"Liang, Cunming" <cunming.liang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [PATCH v2 4/4] kni: fix missing validation when vhost	HDR is enabled
Date: Fri, 10 Jul 2015 15:35:38 +0000	[thread overview]
Message-ID: <F35DEAC7BCE34641BA9FAC6BCA4A12E70A891A47@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1435356878-10304-5-git-send-email-miguel.bernal.marin@linux.intel.com>

Could one of you guys help to review the vhost part?

Thanks,
Helin

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Miguel Bernal Marin
> Sent: Friday, June 26, 2015 3:15 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v2 4/4] kni: fix missing validation when vhost HDR is
> enabled
> 
> A missing port from memcpy_toiovecend to copy_to_iter is showed when vHost
> HDR is enabled. DPDK would not build.
> 
> This patch add this validation to build with kernel > 3.19.
> 
> Fixes: 45e63ba8db31 ("kni: fix vhost build with kernels 3.19 and 4.0")
> Fixes: ba7438aed924 ("vhost: don't bother copying iovecs in handle_rx(), kill
> memcpy_toiovecend()")
> 
> Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
> ---
>  lib/librte_eal/linuxapp/kni/kni_vhost.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/librte_eal/linuxapp/kni/kni_vhost.c
> b/lib/librte_eal/linuxapp/kni/kni_vhost.c
> index f21b47e..013a677 100644
> --- a/lib/librte_eal/linuxapp/kni/kni_vhost.c
> +++ b/lib/librte_eal/linuxapp/kni/kni_vhost.c
> @@ -427,10 +427,15 @@ kni_sock_rcvmsg(struct socket *sock,
> 
>  #ifdef RTE_KNI_VHOST_VNET_HDR_EN
>  	/* no need to copy hdr when no pkt received */
> +#ifdef HAVE_IOV_ITER_MSGHDR
> +	if (unlikely(copy_to_iter((void *)&vnet_hdr, vnet_hdr_len,
> +		&m->msg_iter)))
> +#else
>  	if (unlikely(memcpy_toiovecend(m->msg_iov,
>  		(void *)&vnet_hdr, 0, vnet_hdr_len)))
> +#endif /* HAVE_IOV_ITER_MSGHDR */
>  		return -EFAULT;
> -#endif
> +#endif /* RTE_KNI_VHOST_VNET_HDR_EN */
>  	KNI_DBG_RX("kni_rcvmsg expect_len %ld, flags 0x%08x, pkt_len %d\n",
>  		   (unsigned long)len, q->flags, pkt_len);
> 
> --
> 2.4.4

  reply	other threads:[~2015-07-10 15:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-25 19:09 [PATCH 0/2] kni: fix build with kernel 4.1 Miguel Bernal Marin
2015-06-25 19:09 ` [PATCH 1/2] kni: fix igb_ndo_bridge_getlink to build with 4.1 Miguel Bernal Marin
2015-06-25 19:09 ` [PATCH 2/2] kni: fix header_ops " Miguel Bernal Marin
2015-06-25 21:56 ` [PATCH 0/2] kni: fix build with kernel 4.1 De Lara Guarch, Pablo
2015-06-26 14:36   ` Miguel Bernal Marin
2015-06-26 22:14 ` [PATCH v2 0/4] " Miguel Bernal Marin
2015-06-26 22:14   ` [PATCH v2 1/4] kni: fix igb_ndo_bridge_getlink to build with 4.1 Miguel Bernal Marin
2015-07-10 15:41     ` Zhang, Helin
2015-06-26 22:14   ` [PATCH v2 2/4] kni: fix header_ops " Miguel Bernal Marin
2015-07-10 15:31     ` Zhang, Helin
2015-06-26 22:14   ` [PATCH v2 3/4] kni: fix function parameter from proto_ops pointers Miguel Bernal Marin
2015-07-10 15:34     ` Zhang, Helin
2015-07-10 15:42       ` Thomas Monjalon
2015-06-26 22:14   ` [PATCH v2 4/4] kni: fix missing validation when vhost HDR is enabled Miguel Bernal Marin
2015-07-10 15:35     ` Zhang, Helin [this message]
2015-07-01 13:14   ` [PATCH v2 0/4] kni: fix build with kernel 4.1 De Lara Guarch, Pablo
2015-07-10 10:00     ` Thomas Monjalon

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=F35DEAC7BCE34641BA9FAC6BCA4A12E70A891A47@SHSMSX104.ccr.corp.intel.com \
    --to=helin.zhang@intel.com \
    --cc=changchun.ouyang@intel.com \
    --cc=cunming.liang@intel.com \
    --cc=dev@dpdk.org \
    --cc=huawei.xie@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.