On 2/1/21 6:46 PM, David Marchand wrote:
> The private virtio_user_dev structure embeds a virtio_hw which itself
> contains the ethdev port_id.
> Make use of it and remove the duplicate port_id field.
> 
> Signed-off-by: David Marchand <david.march...@redhat.com>
> ---
> Posting this cleanup that I caught when reviewing/discussing the port_id
> fix from Maxime.
> It can wait 21.05.
> 
> ---
>  drivers/net/virtio/virtio_user/vhost_user.c      | 3 ++-
>  drivers/net/virtio/virtio_user/virtio_user_dev.c | 6 +++---
>  drivers/net/virtio/virtio_user/virtio_user_dev.h | 1 -
>  drivers/net/virtio/virtio_user_ethdev.c          | 1 -
>  4 files changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/virtio/virtio_user/vhost_user.c 
> b/drivers/net/virtio/virtio_user/vhost_user.c
> index ec2c53c8fb..18ae29eed2 100644
> --- a/drivers/net/virtio/virtio_user/vhost_user.c
> +++ b/drivers/net/virtio/virtio_user/vhost_user.c
> @@ -950,7 +950,8 @@ vhost_user_update_link_state(struct virtio_user_dev *dev)
>               r = recv(data->vhostfd, buf, 128, MSG_PEEK);
>               if (r == 0 || (r < 0 && errno != EAGAIN)) {
>                       dev->net_status &= (~VIRTIO_NET_S_LINK_UP);
> -                     PMD_DRV_LOG(ERR, "virtio-user port %u is down", 
> dev->port_id);
> +                     PMD_DRV_LOG(ERR, "virtio-user port %u is down",
> +                             dev->hw.port_id);

Trivial, but it can fit in a single line, as IIRC, we can go up to 100
chars now. If you agree, we can fix it while applying, no need to
resubmit.

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

Thanks,
Maxime

Reply via email to