[spp] [PATCH 1/1] spp_primary: enable use of eth_vhost

Yasufumi Ogawa yasufum.o at gmail.com
Wed Jan 29 03:18:29 CET 2020


On 2020/01/29 8:52, Itsuro Oda wrote:
> This patch enables spp_primary to use eth_vhost by --vdev option.
It's LGTM. Although tag of title should be 'shared', I'd like to correct it.

Applied, thanks!
> 
> Fixes: 5094c9b88cf9 (shared: switch to use vhost PMD for SPP)
> Signed-off-by: Itsuro Oda <oda at valinux.co.jp>
> ---
>   src/shared/common.c | 4 +++-
>   src/shared/common.h | 3 ++-
>   2 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/src/shared/common.c b/src/shared/common.c
> index 5fdb29f..d878c5a 100644
> --- a/src/shared/common.c
> +++ b/src/shared/common.c
> @@ -91,7 +91,9 @@ int parse_dev_name(char *dev_name, int *port_type, int *port_id)
>   	} else if (strncmp(dev_name, VDEV_ETH_VHOST,
>   				strlen(VDEV_ETH_VHOST)) == 0 ||
>   			strncmp(dev_name, VDEV_NET_VHOST,
> -				strlen(VDEV_NET_VHOST)) == 0) {
> +				strlen(VDEV_NET_VHOST)) == 0 ||
> +			strncmp(dev_name, VDEV_SPP_VHOST,
> +				strlen(VDEV_SPP_VHOST)) == 0) {
>   		dev_str_len = strlen(VDEV_NET_VHOST);
>   		pid_len = dev_name_len - dev_str_len;
>   		strncpy(pid_str, dev_name + strlen(VDEV_NET_VHOST),
> diff --git a/src/shared/common.h b/src/shared/common.h
> index adabb79..b4af73c 100644
> --- a/src/shared/common.h
> +++ b/src/shared/common.h
> @@ -34,8 +34,9 @@
>   
>   #define VDEV_ETH_RING "eth_ring"
>   #define VDEV_NET_RING "net_ring"
> -#define VDEV_ETH_VHOST "spp_vhost"
> +#define VDEV_ETH_VHOST "eth_vhost"
>   #define VDEV_NET_VHOST "net_vhost"
> +#define VDEV_SPP_VHOST "spp_vhost"
>   #define VDEV_NET_PCAP "net_pcap"
>   #define VDEV_ETH_TAP "eth_tap"
>   #define VDEV_NET_TAP "net_tap"
> 


More information about the spp mailing list