DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: jerinj@marvell.com, dev@dpdk.org, Tiwei Bie <tiwei.bie@intel.com>,
	Zhihong Wang <zhihong.wang@intel.com>
Cc: thomas@monjalon.net, Jianfeng Tan <jianfeng.tan@intel.com>,
	stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] net/virtio: fix build errors
Date: Tue, 30 Jul 2019 18:12:58 +0200	[thread overview]
Message-ID: <8ed9b94d-d884-c774-6600-3a59c929ed08@redhat.com> (raw)
In-Reply-To: <20190730110406.30007-1-jerinj@marvell.com>



On 7/30/19 1:04 PM, jerinj@marvell.com wrote:
> From: Jerin Jacob <jerinj@marvell.com>
> 
> Add extern to variable declaration to avoid some compiler treating it
> as variable definition.
> 
> build error log:
> 
> lib/librte_pmd_virtio.a(vhost_kernel.o):(.rodata+0x110):
> multiple definition of `vhost_msg_strings'
> lib/librte_pmd_virtio.a(vhost_user.o):(.data.rel.ro.local+0x0):
> first defined here
> lib/librte_pmd_virtio.a(virtio_user_dev.o):(.rodata+0xe8):
> multiple definition of `vhost_msg_strings'
> lib/librte_pmd_virtio.a(vhost_user.o):(.data.rel.ro.local+0x0):
> first defined here
> 
> Fixes: 33d24d65fe2b ("net/virtio-user: abstract backend operations")
> 
> Cc: Jianfeng Tan <jianfeng.tan@intel.com>
> Cc: stable@dpdk.org
> 
> Signed-off-by: Jerin Jacob <jerinj@marvell.com>
> ---
>  drivers/net/virtio/virtio_user/vhost.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/virtio/virtio_user/vhost.h b/drivers/net/virtio/virtio_user/vhost.h
> index 55f47036b..1e784e58e 100644
> --- a/drivers/net/virtio/virtio_user/vhost.h
> +++ b/drivers/net/virtio/virtio_user/vhost.h
> @@ -67,7 +67,7 @@ enum vhost_user_request {
>  	VHOST_USER_MAX
>  };
>  
> -const char * const vhost_msg_strings[VHOST_USER_MAX];
> +extern const char * const vhost_msg_strings[VHOST_USER_MAX];
>  
>  struct vhost_memory_region {
>  	uint64_t guest_phys_addr;
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime

  reply	other threads:[~2019-07-30 16:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 11:04 jerinj
2019-07-30 16:12 ` Maxime Coquelin [this message]
2019-07-30 17:47   ` 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=8ed9b94d-d884-c774-6600-3a59c929ed08@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=jianfeng.tan@intel.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    --cc=tiwei.bie@intel.com \
    --cc=zhihong.wang@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).