From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 15CEF45F87 for ; Tue, 31 Dec 2024 18:49:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 90D4C40273; Tue, 31 Dec 2024 18:49:45 +0100 (CET) Received: from mail-oa1-f48.google.com (mail-oa1-f48.google.com [209.85.160.48]) by mails.dpdk.org (Postfix) with ESMTP id BCEB64021E for ; Tue, 31 Dec 2024 18:49:43 +0100 (CET) Received: by mail-oa1-f48.google.com with SMTP id 586e51a60fabf-29e70c9dc72so5128574fac.0 for ; Tue, 31 Dec 2024 09:49:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735667383; x=1736272183; darn=dpdk.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=sW2DCaUU1xpqqHO0PfYwEnkOrMuLJ5JsgplnVoOjAA0=; b=aGlcUey7tSe5cJRg8o3z3H2r2pnoN0zk4/HAH3eGmgiIGnVXGrmIaSeLP1yu87DgF3 j4A2ySKxTR3TrdGkzualbr4anpSMOWgUFxPP1+NmIcTlu43UsFUN3q3GU42YHz82uwSI zi02T1PWByCe7l4hMon6ODnR6G4gLGe5VU2U3YsA2078V2ADlrZTum0wZGc4DMtqUsXn LFUxLRArdHfrX1l0Hcq6LJUdI+IBitv9e6NwuCGwemGhX8A6hcNOaFfZRYLIB7vcORPQ /n632I7Fd7rVL+beljv9Rq5HPwN80GLyr3agUkwvi7+bHVS8kB06ZXMMpyN+hkNRAX0a WoHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735667383; x=1736272183; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=sW2DCaUU1xpqqHO0PfYwEnkOrMuLJ5JsgplnVoOjAA0=; b=MGHvHGy9SWQl/SlIPnc33sNTzl9+W4JpI9pfjUHCQe6Ap8tIeeUzsUbggtjbAyH+gd qubHnEUOSJJVe/7+vz/Oi6nXw28+QsdwRqhX+Axqy/qX3i95fY1SYV/B+yajJxPevE5b eFVSYUMeBhvE79t5Hpl60l4EpPgo1MMiD6ue0YvGuZ2L1hvpAzJyANlwMU+XXOSw+0so 6diDyrR++ZHKyorZcXXarP4WCauzYNFcyieMQR4TFuA4Q2/D83uMCcPXhGsF00H0KgTN p+evPScRVK+Mhhoqj/PhyvJCxtSl3zpbKQl1edNMdEQ1lSy1Ewa49UUFejs5n52tmj7N bDXw== X-Gm-Message-State: AOJu0Yzu7pUP99O0jN3S7Bfe+i+2XU4ksjCxd2VETaXLs/d8DNtHclJ6 VR9WqpEfCdcoiXXqrbV+FrT0FV+BBp95gkZ1CRyRr9Sy6sOx3k9W9KRLg1+9z1tlkTg7PLlGSMF K3nbM8bSAUj5egfIETeJfudHyZHXNLA== X-Gm-Gg: ASbGncu1KY1eiy0ssDTp+AnfTNxqDcQsQLQUSmzHnkAMqeJcrhFVpbSle7j8TVToSS4 DhkUnvVxGLAQhmca62W90BCWC64QNMNR3PYbl X-Google-Smtp-Source: AGHT+IEBMY0xpnlK757oAVjLuNJb50IitdhOmRqP3ZkzRGhSnF96nUA71WW9uFc5cnq0ft2f095xq2eQ7SgAXgliZyo= X-Received: by 2002:a05:6871:7b04:b0:29e:19ee:4832 with SMTP id 586e51a60fabf-2a7fb0cf2f5mr24217542fac.18.1735667382626; Tue, 31 Dec 2024 09:49:42 -0800 (PST) MIME-Version: 1.0 From: Alan Beadle Date: Tue, 31 Dec 2024 12:49:32 -0500 Message-ID: Subject: Multiprocess App Problems with tx_burst To: users@dpdk.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Hi everyone, I am working on a multi-process DPDK application. It uses one NIC, one port, and both separate processes send as well as receive, and they share memory for synchronization and IPC. I had previously made a mistake in setting up the lcores, and all of the processes were assigned to the same physical core. This seems to have concealed some DPDK thread safety issues which I am now dealing with. I understand that rte_eth_tx_burst() and rte_eth_rx_burst() are not thread safe. Previously I did not have any synchronization around these functions. Now that I am successfully using separate cores, I have added a shared spinlock around all invocations of these functions, as well as around all mbuf frees and allocations. However, when my code sends a packet, it checks the return value of rte_eth_tx_burst() to ensure that the packet was actually sent. If it fails to send, my app exits with an error. This was not previously happening, but now it happens every time I run it. I thought this was due to the lack of synchronization but it is still happening after I added the lock. Why would rte_eth_tx_burst() be failing now? Thank you, -Alan