mbox series

[v2,0/6] port ioatfwd app to dmadev

Message ID 20210917164136.3499904-1-kevin.laatz@intel.com (mailing list archive)
Headers
Series port ioatfwd app to dmadev |

Message

Kevin Laatz Sept. 17, 2021, 4:41 p.m. UTC
  This patchset first adds some additional command line options to the
existing ioatfwd application to enhance usability.

The last 3 patches of this set then port the ioatfwd application to use the
dmadev library APIs instead of the IOAT rawdev APIs. Following the port,
all variables etc are renamed to be more appropriate for using with the
DMAdev library. Lastly, the application itself is renamed to "dmafwd".

Depends-on: series-18960 ("support dmadev")

Kevin Laatz (3):
  examples/ioat: port application to dmadev APIs
  examples/ioat: update naming to match change to dmadev
  examples/ioat: rename application to dmafwd

Konstantin Ananyev (3):
  examples/ioat: always use same lcore for both DMA requests enqueue and
    dequeue
  examples/ioat: add cmd-line option to control DMA batch size
  examples/ioat: add cmd line option to control max frame size

 MAINTAINERS                                   |   7 +-
 .../sample_app_ug/{ioat.rst => dma.rst}       | 114 ++--
 doc/guides/sample_app_ug/index.rst            |   2 +-
 doc/guides/sample_app_ug/intro.rst            |   4 +-
 examples/{ioat => dma}/Makefile               |   4 +-
 examples/{ioat/ioatfwd.c => dma/dmafwd.c}     | 586 +++++++++---------
 examples/{ioat => dma}/meson.build            |  10 +-
 examples/meson.build                          |   2 +-
 8 files changed, 380 insertions(+), 349 deletions(-)
 rename doc/guides/sample_app_ug/{ioat.rst => dma.rst} (73%)
 rename examples/{ioat => dma}/Makefile (97%)
 rename examples/{ioat/ioatfwd.c => dma/dmafwd.c} (63%)
 rename examples/{ioat => dma}/meson.build (63%)
  

Comments

Chengwen Feng Sept. 23, 2021, 1:53 p.m. UTC | #1
Hi Kevin,

Can you add the following functions?
1. Add dump dmadev which trigger by signal, like:
    ...
    static void
    dma_dump(void)
    {
        uint32_t i, j;

        if (copy_mode != COPY_MODE_DMA_NUM)
            return;

        for (i = 0; i < cfg.nb_ports; i++) {
            for (j = 0; j < cfg.ports[i].nb_queues; j++)
                rte_dma_dump(cfg.ports[i].dmadev_ids[j], stdout);
        }
    }
    ...
    static void
    signal_handler(int signum)
    {
        if (signum == SIGINT || signum == SIGTERM) {
            printf("\n\nSignal %d received, preparing to exit...\n",
                signum);
            force_quit = true;
        } else if (signum == SIGUSR1) {
            dma_dump();
        }
    }
    ...
    signal(SIGUSR1, signal_handler);

2. Controls the output frequency of print_stats. currently fix 1s, hope could control by parameters.

Thanks.


On 2021/9/18 0:41, Kevin Laatz wrote:
> This patchset first adds some additional command line options to the
> existing ioatfwd application to enhance usability.
> 
> The last 3 patches of this set then port the ioatfwd application to use the
> dmadev library APIs instead of the IOAT rawdev APIs. Following the port,
> all variables etc are renamed to be more appropriate for using with the
> DMAdev library. Lastly, the application itself is renamed to "dmafwd".
> 
> Depends-on: series-18960 ("support dmadev")
> 
> Kevin Laatz (3):
>   examples/ioat: port application to dmadev APIs
>   examples/ioat: update naming to match change to dmadev
>   examples/ioat: rename application to dmafwd
> 
> Konstantin Ananyev (3):
>   examples/ioat: always use same lcore for both DMA requests enqueue and
>     dequeue
>   examples/ioat: add cmd-line option to control DMA batch size
>   examples/ioat: add cmd line option to control max frame size
> 
>  MAINTAINERS                                   |   7 +-
>  .../sample_app_ug/{ioat.rst => dma.rst}       | 114 ++--
>  doc/guides/sample_app_ug/index.rst            |   2 +-
>  doc/guides/sample_app_ug/intro.rst            |   4 +-
>  examples/{ioat => dma}/Makefile               |   4 +-
>  examples/{ioat/ioatfwd.c => dma/dmafwd.c}     | 586 +++++++++---------
>  examples/{ioat => dma}/meson.build            |  10 +-
>  examples/meson.build                          |   2 +-
>  8 files changed, 380 insertions(+), 349 deletions(-)
>  rename doc/guides/sample_app_ug/{ioat.rst => dma.rst} (73%)
>  rename examples/{ioat => dma}/Makefile (97%)
>  rename examples/{ioat/ioatfwd.c => dma/dmafwd.c} (63%)
>  rename examples/{ioat => dma}/meson.build (63%)
>
  
Kevin Laatz Sept. 23, 2021, 2 p.m. UTC | #2
Hi Chengwen,

On 23/09/2021 14:53, fengchengwen wrote:
> Hi Kevin,
>
> Can you add the following functions?
> 1. Add dump dmadev which trigger by signal, like:
>      ...
>      static void
>      dma_dump(void)
>      {
>          uint32_t i, j;
>
>          if (copy_mode != COPY_MODE_DMA_NUM)
>              return;
>
>          for (i = 0; i < cfg.nb_ports; i++) {
>              for (j = 0; j < cfg.ports[i].nb_queues; j++)
>                  rte_dma_dump(cfg.ports[i].dmadev_ids[j], stdout);
>          }
>      }
>      ...
>      static void
>      signal_handler(int signum)
>      {
>          if (signum == SIGINT || signum == SIGTERM) {
>              printf("\n\nSignal %d received, preparing to exit...\n",
>                  signum);
>              force_quit = true;
>          } else if (signum == SIGUSR1) {
>              dma_dump();
>          }
>      }
>      ...
>      signal(SIGUSR1, signal_handler);

Yes, can add this in the v3.


>
> 2. Controls the output frequency of print_stats. currently fix 1s, hope could control by parameters.

Are you asking for a function to control this? It would probably be 
better as a cmdline option IMO. I can add this in v3 also.

Thanks for the feedback!


>
> Thanks.
>
>
> On 2021/9/18 0:41, Kevin Laatz wrote:
>> This patchset first adds some additional command line options to the
>> existing ioatfwd application to enhance usability.
>>
>> The last 3 patches of this set then port the ioatfwd application to use the
>> dmadev library APIs instead of the IOAT rawdev APIs. Following the port,
>> all variables etc are renamed to be more appropriate for using with the
>> DMAdev library. Lastly, the application itself is renamed to "dmafwd".
>>
>> Depends-on: series-18960 ("support dmadev")
>>
>> Kevin Laatz (3):
>>    examples/ioat: port application to dmadev APIs
>>    examples/ioat: update naming to match change to dmadev
>>    examples/ioat: rename application to dmafwd
>>
>> Konstantin Ananyev (3):
>>    examples/ioat: always use same lcore for both DMA requests enqueue and
>>      dequeue
>>    examples/ioat: add cmd-line option to control DMA batch size
>>    examples/ioat: add cmd line option to control max frame size
>>
>>   MAINTAINERS                                   |   7 +-
>>   .../sample_app_ug/{ioat.rst => dma.rst}       | 114 ++--
>>   doc/guides/sample_app_ug/index.rst            |   2 +-
>>   doc/guides/sample_app_ug/intro.rst            |   4 +-
>>   examples/{ioat => dma}/Makefile               |   4 +-
>>   examples/{ioat/ioatfwd.c => dma/dmafwd.c}     | 586 +++++++++---------
>>   examples/{ioat => dma}/meson.build            |  10 +-
>>   examples/meson.build                          |   2 +-
>>   8 files changed, 380 insertions(+), 349 deletions(-)
>>   rename doc/guides/sample_app_ug/{ioat.rst => dma.rst} (73%)
>>   rename examples/{ioat => dma}/Makefile (97%)
>>   rename examples/{ioat/ioatfwd.c => dma/dmafwd.c} (63%)
>>   rename examples/{ioat => dma}/meson.build (63%)
>>