DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] eal: increase max file descriptor for secondary process device
@ 2024-09-05 16:20 Stephen Hemminger
  2024-09-06  1:19 ` fengchengwen
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Stephen Hemminger @ 2024-09-05 16:20 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger, Tyler Retzlaff

The TAP and XDP driver both are limited to only 8 queues when
because of the small limit imposed by EAL. Increase the limit
now since this release allows changing ABI.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 doc/guides/rel_notes/release_24_11.rst | 5 +++++
 lib/eal/include/rte_eal.h              | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/doc/guides/rel_notes/release_24_11.rst b/doc/guides/rel_notes/release_24_11.rst
index 0ff70d9057..5af70e04c5 100644
--- a/doc/guides/rel_notes/release_24_11.rst
+++ b/doc/guides/rel_notes/release_24_11.rst
@@ -100,6 +100,11 @@ ABI Changes
    Also, make sure to start the actual text at the margin.
    =======================================================
 
+* The maximum number of file descriptors that can be passed to a secondary process
+  has been increased from 8 to 253 (which is the maximum possible with Unix domain
+  socket). This allows for more queues when using software devices such as TAP
+  and XDP.
+
 
 Known Issues
 ------------
diff --git a/lib/eal/include/rte_eal.h b/lib/eal/include/rte_eal.h
index c2256f832e..c826e143f1 100644
--- a/lib/eal/include/rte_eal.h
+++ b/lib/eal/include/rte_eal.h
@@ -155,7 +155,7 @@ int rte_eal_primary_proc_alive(const char *config_file_path);
  */
 bool rte_mp_disable(void);
 
-#define RTE_MP_MAX_FD_NUM	8    /* The max amount of fds */
+#define RTE_MP_MAX_FD_NUM	253  /* The max amount of fds (see SCM_MAX_FD) */
 #define RTE_MP_MAX_NAME_LEN	64   /* The max length of action name */
 #define RTE_MP_MAX_PARAM_LEN	256  /* The max length of param */
 struct rte_mp_msg {
-- 
2.45.2


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

* Re: [PATCH] eal: increase max file descriptor for secondary process device
  2024-09-05 16:20 [PATCH] eal: increase max file descriptor for secondary process device Stephen Hemminger
@ 2024-09-06  1:19 ` fengchengwen
  2024-09-06  6:23 ` Morten Brørup
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: fengchengwen @ 2024-09-06  1:19 UTC (permalink / raw)
  To: Stephen Hemminger, dev; +Cc: Tyler Retzlaff

Acked-by: Chengwen Feng <fengchengwen@huawei.com>

On 2024/9/6 0:20, Stephen Hemminger wrote:
> The TAP and XDP driver both are limited to only 8 queues when
> because of the small limit imposed by EAL. Increase the limit
> now since this release allows changing ABI.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  doc/guides/rel_notes/release_24_11.rst | 5 +++++
>  lib/eal/include/rte_eal.h              | 2 +-
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/guides/rel_notes/release_24_11.rst b/doc/guides/rel_notes/release_24_11.rst
> index 0ff70d9057..5af70e04c5 100644
> --- a/doc/guides/rel_notes/release_24_11.rst
> +++ b/doc/guides/rel_notes/release_24_11.rst
> @@ -100,6 +100,11 @@ ABI Changes
>     Also, make sure to start the actual text at the margin.
>     =======================================================
>  
> +* The maximum number of file descriptors that can be passed to a secondary process
> +  has been increased from 8 to 253 (which is the maximum possible with Unix domain
> +  socket). This allows for more queues when using software devices such as TAP
> +  and XDP.
> +
>  
>  Known Issues
>  ------------
> diff --git a/lib/eal/include/rte_eal.h b/lib/eal/include/rte_eal.h
> index c2256f832e..c826e143f1 100644
> --- a/lib/eal/include/rte_eal.h
> +++ b/lib/eal/include/rte_eal.h
> @@ -155,7 +155,7 @@ int rte_eal_primary_proc_alive(const char *config_file_path);
>   */
>  bool rte_mp_disable(void);
>  
> -#define RTE_MP_MAX_FD_NUM	8    /* The max amount of fds */
> +#define RTE_MP_MAX_FD_NUM	253  /* The max amount of fds (see SCM_MAX_FD) */
>  #define RTE_MP_MAX_NAME_LEN	64   /* The max length of action name */
>  #define RTE_MP_MAX_PARAM_LEN	256  /* The max length of param */
>  struct rte_mp_msg {
> 

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

* RE: [PATCH] eal: increase max file descriptor for secondary process device
  2024-09-05 16:20 [PATCH] eal: increase max file descriptor for secondary process device Stephen Hemminger
  2024-09-06  1:19 ` fengchengwen
@ 2024-09-06  6:23 ` Morten Brørup
  2024-09-06  7:55 ` Ferruh Yigit
  2024-10-10  9:51 ` David Marchand
  3 siblings, 0 replies; 6+ messages in thread
From: Morten Brørup @ 2024-09-06  6:23 UTC (permalink / raw)
  To: Stephen Hemminger, dev; +Cc: Tyler Retzlaff

> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Thursday, 5 September 2024 18.20
> 
> The TAP and XDP driver both are limited to only 8 queues when
> because of the small limit imposed by EAL. Increase the limit
> now since this release allows changing ABI.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---

Acked-by: Morten Brørup <mb@smartsharesystems.com>


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

* Re: [PATCH] eal: increase max file descriptor for secondary process device
  2024-09-05 16:20 [PATCH] eal: increase max file descriptor for secondary process device Stephen Hemminger
  2024-09-06  1:19 ` fengchengwen
  2024-09-06  6:23 ` Morten Brørup
@ 2024-09-06  7:55 ` Ferruh Yigit
  2024-10-10  9:51 ` David Marchand
  3 siblings, 0 replies; 6+ messages in thread
From: Ferruh Yigit @ 2024-09-06  7:55 UTC (permalink / raw)
  To: Stephen Hemminger, dev; +Cc: Tyler Retzlaff

On 9/5/2024 5:20 PM, Stephen Hemminger wrote:
> The TAP and XDP driver both are limited to only 8 queues when
> because of the small limit imposed by EAL. Increase the limit
> now since this release allows changing ABI.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  doc/guides/rel_notes/release_24_11.rst | 5 +++++
>  lib/eal/include/rte_eal.h              | 2 +-
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/guides/rel_notes/release_24_11.rst b/doc/guides/rel_notes/release_24_11.rst
> index 0ff70d9057..5af70e04c5 100644
> --- a/doc/guides/rel_notes/release_24_11.rst
> +++ b/doc/guides/rel_notes/release_24_11.rst
> @@ -100,6 +100,11 @@ ABI Changes
>     Also, make sure to start the actual text at the margin.
>     =======================================================
>  
> +* The maximum number of file descriptors that can be passed to a secondary process
> +  has been increased from 8 to 253 (which is the maximum possible with Unix domain
> +  socket). This allows for more queues when using software devices such as TAP
> +  and XDP.
> +
>  
>  Known Issues
>  ------------
> diff --git a/lib/eal/include/rte_eal.h b/lib/eal/include/rte_eal.h
> index c2256f832e..c826e143f1 100644
> --- a/lib/eal/include/rte_eal.h
> +++ b/lib/eal/include/rte_eal.h
> @@ -155,7 +155,7 @@ int rte_eal_primary_proc_alive(const char *config_file_path);
>   */
>  bool rte_mp_disable(void);
>  
> -#define RTE_MP_MAX_FD_NUM	8    /* The max amount of fds */
> +#define RTE_MP_MAX_FD_NUM	253  /* The max amount of fds (see SCM_MAX_FD) */
>  #define RTE_MP_MAX_NAME_LEN	64   /* The max length of action name */
>  #define RTE_MP_MAX_PARAM_LEN	256  /* The max length of param */
>  struct rte_mp_msg {
>

It would be nice to add this to deprecation notice first, but it seems
we missed, I think it is safe to update in ABI break release and good to
remove this restriction.

Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>



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

* Re: [PATCH] eal: increase max file descriptor for secondary process device
  2024-09-05 16:20 [PATCH] eal: increase max file descriptor for secondary process device Stephen Hemminger
                   ` (2 preceding siblings ...)
  2024-09-06  7:55 ` Ferruh Yigit
@ 2024-10-10  9:51 ` David Marchand
  2024-10-11 14:50   ` David Marchand
  3 siblings, 1 reply; 6+ messages in thread
From: David Marchand @ 2024-10-10  9:51 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: dev, Tyler Retzlaff, Morten Brørup, Chengwen Feng, Ferruh Yigit

On Thu, Sep 5, 2024 at 6:22 PM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> The TAP and XDP driver both are limited to only 8 queues when
> because of the small limit imposed by EAL. Increase the limit
> now since this release allows changing ABI.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

Applied, thanks.


-- 
David Marchand


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

* Re: [PATCH] eal: increase max file descriptor for secondary process device
  2024-10-10  9:51 ` David Marchand
@ 2024-10-11 14:50   ` David Marchand
  0 siblings, 0 replies; 6+ messages in thread
From: David Marchand @ 2024-10-11 14:50 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: dev, Tyler Retzlaff, Morten Brørup, Chengwen Feng, Ferruh Yigit

On Thu, Oct 10, 2024 at 11:51 AM David Marchand
<david.marchand@redhat.com> wrote:
>
> On Thu, Sep 5, 2024 at 6:22 PM Stephen Hemminger
> <stephen@networkplumber.org> wrote:
> >
> > The TAP and XDP driver both are limited to only 8 queues when
> > because of the small limit imposed by EAL. Increase the limit
> > now since this release allows changing ABI.
> >
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>
> Applied, thanks.

I suspect this triggered some coverity hiccup:

*** CID 445386:  Memory - illegal accesses  (OVERRUN)
/drivers/net/tap/rte_eth_tap.c
: 2401 in tap_mp_sync_queues()
2395                    TAP_LOG(ERR, "Number of rx/tx queues %u
exceeds max number of fds %u",
2396                            dev->data->nb_rx_queues, RTE_MP_MAX_FD_NUM);
2397                    return -1;
2398            }
2399
2400            for (queue = 0; queue < dev->data->nb_rx_queues; queue++) {
>>>     CID 445386:  Memory - illegal accesses  (OVERRUN)
>>>     Overrunning array "process_private->fds" of 16 4-byte elements at element index 252 (byte offset 1011) using index "queue" (which evaluates to 252).
2401                    reply.fds[reply.num_fds++] =
process_private->fds[queue];
2402                    reply_param->q_count++;
2403            }
2404
2405            /* Send reply */
2406            strlcpy(reply.name, request->name, sizeof(reply.name));

Can you have a look?

Thanks.


-- 
David Marchand


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

end of thread, other threads:[~2024-10-11 14:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-05 16:20 [PATCH] eal: increase max file descriptor for secondary process device Stephen Hemminger
2024-09-06  1:19 ` fengchengwen
2024-09-06  6:23 ` Morten Brørup
2024-09-06  7:55 ` Ferruh Yigit
2024-10-10  9:51 ` David Marchand
2024-10-11 14:50   ` David Marchand

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