DPDK patches and discussions
 help / color / mirror / Atom feed
* DPDK PDUMP pcapng usage
@ 2022-10-11 15:11 Sylvia Grundwürmer
  2022-10-12 15:16 ` Stephen Hemminger
  2022-10-19 16:37 ` [PATCH] pdump: do not allow enable/disable in primary process Stephen Hemminger
  0 siblings, 2 replies; 4+ messages in thread
From: Sylvia Grundwürmer @ 2022-10-11 15:11 UTC (permalink / raw)
  To: dev


[-- Attachment #1.1: Type: text/plain, Size: 2514 bytes --]

Hi,

i am running DPDK 22.03 on a NXP platform, using 2 eth ports (dpmac, dpni, dprc config should be OK, as i get bursts of packets with testpmd and in a little customized app
which is just checking if packets are bursted in mempool.

So then i tried to use pdump and pcapng to write out a capture.pcapng file.

I created mempool and ringbuffer according tot o the dumpcap-example, (rte_eth_dev_configure, rte_eth_dev_adjust_nb_rx_tx_desc, rte_eth_rx/tx_queue_setup, rte_eth_dev_start with the portid i have and which was veryfied by my little customized app as working properly)
but when i call enable_pdump i am running into a segmentation fault.

Validation of port, ring, mp, flags are ok.
the problem seems to come from snprintf. There is no different behaviour no matter if i use enable_pdump or enable_pdump_by_deviceID or enable_pdump_bpf.
PDUMP seems to have trouble whith my portID or deviceID.

Can you give any hint, what might go wrong here? Or what i could try to get this stuff running?
Thanks in advance.

[cid:image003.png@01D8DD94.70449230]


Mit freundlichen Grüßen / Best regards

i.A. Sylvia Grundwürmer
Software-Entwicklerin / Software Developer

b-plus GmbH
Ulrichsberger Straße 17 | 94469 Deggendorf
sylvia.grundwuermer@b-plus.com

Besucheradresse / Visitor address:
b-plus GmbH
Ulrichsberger Str. 17, 94469 Deggendorf, Germany
Website<http://www.b-plus.com/> | XING<https://www.xing.com/companies/b-plusgmbh> | FACEBOOK<https://www.facebook.com/bplusGmbH/> | LinkedIn<https://www.linkedin.com/company/b-plus-gmbh/>


[cid:image004.jpg@01D8DD94.70449230]<https://karriere.b-plus.com/jobs>
b-plus GmbH
Geschäftsführer / Managing Director: Dipl.-Ing.(FH) Michael Sieg
Gerichtsstand /Handelsregister / Place of jurisdiction / Commercial register: HRB 1753 Deggendorf / Germany
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und löschen Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the contents in this e-mail is strictly forbidden.



















[-- Attachment #1.2: Type: text/html, Size: 10937 bytes --]

[-- Attachment #2: image003.png --]
[-- Type: image/png, Size: 313423 bytes --]

[-- Attachment #3: image004.jpg --]
[-- Type: image/jpeg, Size: 12799 bytes --]

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

* Re: DPDK PDUMP pcapng usage
  2022-10-11 15:11 DPDK PDUMP pcapng usage Sylvia Grundwürmer
@ 2022-10-12 15:16 ` Stephen Hemminger
  2022-10-19 16:37 ` [PATCH] pdump: do not allow enable/disable in primary process Stephen Hemminger
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2022-10-12 15:16 UTC (permalink / raw)
  To: Sylvia Grundwürmer; +Cc: dev

On Tue, 11 Oct 2022 15:11:02 +0000
Sylvia Grundwürmer <sylvia.grundwuermer@b-plus.com> wrote:

> Hi,
> 
> i am running DPDK 22.03 on a NXP platform, using 2 eth ports (dpmac, dpni, dprc config should be OK, as i get bursts of packets with testpmd and in a little customized app
> which is just checking if packets are bursted in mempool.
> 
> So then i tried to use pdump and pcapng to write out a capture.pcapng file.
> 
> I created mempool and ringbuffer according tot o the dumpcap-example, (rte_eth_dev_configure, rte_eth_dev_adjust_nb_rx_tx_desc, rte_eth_rx/tx_queue_setup, rte_eth_dev_start with the portid i have and which was veryfied by my little customized app as working properly)
> but when i call enable_pdump i am running into a segmentation fault.
> 
> Validation of port, ring, mp, flags are ok.
> the problem seems to come from snprintf. There is no different behaviour no matter if i use enable_pdump or enable_pdump_by_deviceID or enable_pdump_bpf.
> PDUMP seems to have trouble whith my portID or deviceID.
> 
> Can you give any hint, what might go wrong here? Or what i could try to get this stuff running?
> Thanks in advance.
> 
> [cid:image003.png@01D8DD94.70449230]

Sample code would help, and the dpdk mailing list blocked your image attachment

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

* [PATCH] pdump: do not allow enable/disable in primary process
  2022-10-11 15:11 DPDK PDUMP pcapng usage Sylvia Grundwürmer
  2022-10-12 15:16 ` Stephen Hemminger
@ 2022-10-19 16:37 ` Stephen Hemminger
  2022-10-21 13:08   ` David Marchand
  1 sibling, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2022-10-19 16:37 UTC (permalink / raw)
  To: dev
  Cc: Stephen Hemminger, Sylvia Grundwürmer, Reshma Pattan,
	Anatoly Burakov, Jianfeng Tan

Attempts to enable or disable pdump in primary process
will fail with core dump because it is not valid to call
rte_mp_request_sync() unless in a secondary process.

Trap the error in the common code used for both enable
and disable requests.

Reported-by: Sylvia Grundwürmer <sylvia.grundwuermer@b-plus.com>
Fixes: 660098d61f57 ("pdump: use generic multi-process channel")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/pdump/rte_pdump.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/pdump/rte_pdump.c b/lib/pdump/rte_pdump.c
index 98dcbc037bb8..a81544cb5772 100644
--- a/lib/pdump/rte_pdump.c
+++ b/lib/pdump/rte_pdump.c
@@ -537,6 +537,12 @@ pdump_prepare_client_request(const char *device, uint16_t queue,
 	struct pdump_request *req = (struct pdump_request *)mp_req.param;
 	struct pdump_response *resp;
 
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+		PDUMP_LOG(ERR,
+			  "pdump enable/disable not allowed in primary process\n");
+		return -EINVAL;
+	}
+
 	memset(req, 0, sizeof(*req));
 
 	req->ver = (flags & RTE_PDUMP_FLAG_PCAPNG) ? V2 : V1;
-- 
2.35.1


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

* Re: [PATCH] pdump: do not allow enable/disable in primary process
  2022-10-19 16:37 ` [PATCH] pdump: do not allow enable/disable in primary process Stephen Hemminger
@ 2022-10-21 13:08   ` David Marchand
  0 siblings, 0 replies; 4+ messages in thread
From: David Marchand @ 2022-10-21 13:08 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: dev, Sylvia Grundwürmer, Reshma Pattan, Anatoly Burakov,
	Jianfeng Tan

On Wed, Oct 19, 2022 at 6:37 PM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> Attempts to enable or disable pdump in primary process
> will fail with core dump because it is not valid to call
> rte_mp_request_sync() unless in a secondary process.
>
> Trap the error in the common code used for both enable
> and disable requests.
>
> Fixes: 660098d61f57 ("pdump: use generic multi-process channel")
Cc: stable@dpdk.org

> Reported-by: Sylvia Grundwürmer <sylvia.grundwuermer@b-plus.com>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

Applied, thanks.


-- 
David Marchand


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

end of thread, other threads:[~2022-10-21 13:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-11 15:11 DPDK PDUMP pcapng usage Sylvia Grundwürmer
2022-10-12 15:16 ` Stephen Hemminger
2022-10-19 16:37 ` [PATCH] pdump: do not allow enable/disable in primary process Stephen Hemminger
2022-10-21 13:08   ` 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).