DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/vhost: remove unnecessary method and constant
@ 2019-01-09 14:57 Rami Rosen
  2019-01-10 14:39 ` Maxime Coquelin
  2019-01-10 15:18 ` Maxime Coquelin
  0 siblings, 2 replies; 3+ messages in thread
From: Rami Rosen @ 2019-01-09 14:57 UTC (permalink / raw)
  To: dev
  Cc: maxime.coquelin, tiwei.bie, zhihong.wang, yuanhan.liu, stable,
	Rami Rosen

This cleanup patch removes a method and a constant which are now
unnecessary in the VHOST sample applicaiopn,  namely the
validate_num_devices() method and the MAX_DEVICES constant.

Fixes: 56fe86f8dcaf ("examples/vhost: embed statistics into device structure")
Cc: stable@dpdk.org

Signed-off-by: Rami Rosen <ramirose@gmail.com>
---
 examples/vhost/main.c | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index dc9ea10..f722a13 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -55,9 +55,6 @@
 
 #define INVALID_PORT_ID 0xFF
 
-/* Max number of devices. Limited by vmdq. */
-#define MAX_DEVICES 64
-
 /* Maximum long option length for option parsing. */
 #define MAX_LONG_OPT_SZ 64
 
@@ -215,21 +212,6 @@ struct mbuf_table {
 }
 
 /*
- * Validate the device number according to the max pool number gotten form
- * dev_info. If the device number is invalid, give the error message and
- * return -1. Each device must have its own pool.
- */
-static inline int
-validate_num_devices(uint32_t max_nb_devices)
-{
-	if (num_devices > max_nb_devices) {
-		RTE_LOG(ERR, VHOST_PORT, "invalid number of devices\n");
-		return -1;
-	}
-	return 0;
-}
-
-/*
  * Initialises a given port using global settings and with the rx buffers
  * coming from the mbuf_pool passed as parameter
  */
@@ -270,10 +252,6 @@ struct mbuf_table {
 
 	tx_rings = (uint16_t)rte_lcore_count();
 
-	retval = validate_num_devices(MAX_DEVICES);
-	if (retval < 0)
-		return retval;
-
 	/* Get port configuration. */
 	retval = get_eth_conf(&port_conf, num_devices);
 	if (retval < 0)
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/vhost: remove unnecessary method and constant
  2019-01-09 14:57 [dpdk-dev] [PATCH] examples/vhost: remove unnecessary method and constant Rami Rosen
@ 2019-01-10 14:39 ` Maxime Coquelin
  2019-01-10 15:18 ` Maxime Coquelin
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2019-01-10 14:39 UTC (permalink / raw)
  To: Rami Rosen, dev; +Cc: tiwei.bie, zhihong.wang, yuanhan.liu, stable



On 1/9/19 3:57 PM, Rami Rosen wrote:
> This cleanup patch removes a method and a constant which are now
> unnecessary in the VHOST sample applicaiopn,  namely the

s/applicaiopn/application/

> validate_num_devices() method and the MAX_DEVICES constant.
> 
> Fixes: 56fe86f8dcaf ("examples/vhost: embed statistics into device structure")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Rami Rosen <ramirose@gmail.com>
> ---
>   examples/vhost/main.c | 22 ----------------------
>   1 file changed, 22 deletions(-)
> 

No need to resend, I'll fix while applying:

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

Thanks,
Maxime

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/vhost: remove unnecessary method and constant
  2019-01-09 14:57 [dpdk-dev] [PATCH] examples/vhost: remove unnecessary method and constant Rami Rosen
  2019-01-10 14:39 ` Maxime Coquelin
@ 2019-01-10 15:18 ` Maxime Coquelin
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2019-01-10 15:18 UTC (permalink / raw)
  To: Rami Rosen, dev; +Cc: tiwei.bie, zhihong.wang, yuanhan.liu, stable



On 1/9/19 3:57 PM, Rami Rosen wrote:
> This cleanup patch removes a method and a constant which are now
> unnecessary in the VHOST sample applicaiopn,  namely the
> validate_num_devices() method and the MAX_DEVICES constant.
> 
> Fixes: 56fe86f8dcaf ("examples/vhost: embed statistics into device structure")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Rami Rosen <ramirose@gmail.com>
> ---
>   examples/vhost/main.c | 22 ----------------------
>   1 file changed, 22 deletions(-)

Applied to dpdk-next-virtio with fixing commit message typo,
and also removing the Cc to stable, as IIUC it is more a cleanup
than fixing a real problem.

Thanks,
Maxime

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-10 15:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-09 14:57 [dpdk-dev] [PATCH] examples/vhost: remove unnecessary method and constant Rami Rosen
2019-01-10 14:39 ` Maxime Coquelin
2019-01-10 15:18 ` Maxime Coquelin

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).