Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance Analyses for DPDK Applications Using the Ethdev Library #83

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.tracecompass.tmf.core,
org.eclipse.tracecompass.tmf.ctf.core,
org.eclipse.tracecompass.analysis.os.linux.core,
org.eclipse.tracecompass.analysis.lami.core,
org.eclipse.jdt.annotation;bundle-version="2.2.400"
Export-Package: org.eclipse.tracecompass.incubator.dpdk.core.trace,
org.eclipse.tracecompass.incubator.internal.dpdk.core.ethdev.spin.analysis,
org.eclipse.tracecompass.incubator.internal.dpdk.core.ethdev.throughput.analysis,
org.eclipse.tracecompass.incubator.internal.dpdk.core.lcore.analysis;x-friends:="org.eclipse.tracecompass.incubator.dpdk.core.tests"
Automatic-Module-Name: org.eclipse.tracecompass.incubator.dpdk.core
Import-Package: com.google.common.collect,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,54 @@
class="org.eclipse.tracecompass.incubator.dpdk.core.trace.DpdkTrace">
</tracetype>
</module>
<module
analysis_module="org.eclipse.tracecompass.incubator.internal.dpdk.core.ethdev.throughput.analysis.DpdkEthdevThroughputAnalysisModule"
id="org.eclipse.tracecompass.incubator.dpdk.ethdev.throughput.analysis"
name="DPDK Ethernet Throughput Analysis">
<tracetype
applies="true"
class="org.eclipse.tracecompass.incubator.dpdk.core.trace.DpdkTrace">
</tracetype>
</module>
<module
analysis_module="org.eclipse.tracecompass.incubator.internal.dpdk.core.ethdev.spin.analysis.DpdkEthdevSpinAnalysisModule"
id="org.eclipse.tracecompass.incubator.internal.dpdk.core.ethdev.spin.analysis"
name="DPDK Ethernet Spin Analysis">
<tracetype
applies="true"
class="org.eclipse.tracecompass.incubator.dpdk.core.trace.DpdkTrace">
</tracetype>
</module>
</extension>
<extension
point="org.eclipse.tracecompass.tmf.core.analysis.ondemand">
<analysis
class="org.eclipse.tracecompass.incubator.internal.dpdk.core.ethdev.poll.distribution.analysis.DpdkPollDistributionAnalysis"
id="org.eclipse.tracecompass.incubator.dpdk.core.ethdev.poll.distribution">
</analysis>
<analysis
class="org.eclipse.tracecompass.incubator.internal.dpdk.core.ethdev.poll.stats.analysis.DpdkPollStatsAnalysis"
id="org.eclipse.tracecompass.incubator.dpdk.core.ethdev.poll.stats">
</analysis>
</extension>
<extension
point="org.eclipse.tracecompass.tmf.core.dataprovider">
<dataProviderFactory
class="org.eclipse.tracecompass.incubator.internal.dpdk.core.lcore.analysis.DpdkLogicalCoreDataProviderFactory"
id="org.eclipse.tracecompass.incubator.dpdk.lcore.dataprovider">
</dataProviderFactory>
<dataProviderFactory
class="org.eclipse.tracecompass.incubator.internal.dpdk.core.ethdev.throughput.analysis.DpdkEthdevThroughputBpsDataProviderFactory"
id="org.eclipse.tracecompass.incubator.dpdk.ethdev.throughput.bps.dataprovider">
</dataProviderFactory>
<dataProviderFactory
class="org.eclipse.tracecompass.incubator.internal.dpdk.core.ethdev.throughput.analysis.DpdkEthdevThroughputPpsDataProviderFactory"
id="org.eclipse.tracecompass.incubator.dpdk.ethdev.throughput.pps.dataprovider">
</dataProviderFactory>
<dataProviderFactory
class="org.eclipse.tracecompass.incubator.internal.dpdk.core.ethdev.spin.analysis.DpdkEthdevSpinDataProviderFactory"
id="org.eclipse.tracecompass.incubator.internal.dpdk.core.ethdev.spin.dataprovider">
</dataProviderFactory>
</extension>
<extension
point="org.eclipse.linuxtools.tmf.core.tracetype">
Expand All @@ -31,5 +72,4 @@
trace_type="org.eclipse.tracecompass.incubator.dpdk.core.trace.DpdkTrace">
</type>
</extension>

</plugin>
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
/**********************************************************************
* Copyright (c) 2024 École Polytechnique de Montréal
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License 2.0 which
* accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
**********************************************************************/
package org.eclipse.tracecompass.incubator.internal.dpdk.core.ethdev.analysis;

/**
* This class specifies the names of events required for the analysis of
* Ethdev-based applications, and their fields.
*
* To start using an Ethernet port, a Dpdk application must perform the
* following steps:
*
* 1. **Configure the Ethernet port** by calling the API function
* `rte_eth_dev_configure()`. This function requires specifying the number of RX
* and TX queues to enable, along with other parameters that determine the
* features and capabilities of the port (e.g., RSS).
*
* 2. **Set up the receive and transmit queues** by calling the API functions
* `rte_eth_rx_queue_setup()` and `rte_eth_tx_queue_setup()`. The main
* parameters for these functions are the number of descriptors and the memory
* pool from which to allocate the `rte_mbuf` network memory buffers.
*
* 3. **Start the device** by calling the API function `rte_eth_dev_start()`.
* From this point onward, the device becomes operational, and enqueue and
* dequeue operations can be performed on its queues.
*
* 4. **Use the port queues** by polling the RX queues for incoming packets
* using `rte_eth_rx_burst()` and transmit packets by sending them to the TX
* queues using `rte_eth_tx_burst()`.
*
* 5. **Stop the Ethernet port** by calling `rte_eth_dev_stop()`.
*
* 6. **Close the Ethernet port** by calling `rte_eth_dev_close()`.
*
* @author Adel Belkhiri
*/
public class DpdkEthdevEventLayout {
/* Event names */
private static final String ETH_DEV_RX_BURST_EMPTY = "lib.ethdev.rx.burst.empty"; //$NON-NLS-1$
private static final String ETH_DEV_RX_BURST_NON_EMPTY = "lib.ethdev.rx.burst.nonempty"; //$NON-NLS-1$
private static final String ETH_DEV_TX_BURST = "lib.ethdev.tx.burst"; //$NON-NLS-1$
private static final String PROFILE_ETH_DEV_RX_BURST = "lib.ethdev.rx.burst.extended"; //$NON-NLS-1$
private static final String PROFILE_ETH_DEV_TX_BURST = "lib.ethdev.tx.burst.extended"; //$NON-NLS-1$

/* Event field names */
private static final String PORT_ID = "port_id"; //$NON-NLS-1$
private static final String QUEUE_ID = "queue_id"; //$NON-NLS-1$
private static final String NB_RX = "nb_rx"; //$NON-NLS-1$
private static final String NB_TX = "nb_tx"; //$NON-NLS-1$
private static final String NB_PKTS = "nb_pkts"; //$NON-NLS-1$
private static final String SIZE = "size"; //$NON-NLS-1$
private static final String THREAD_NAME = "context.name"; //$NON-NLS-1$
private static final String CPU_ID = "context.cpu_id"; //$NON-NLS-1$

// ------------------------------------------------------------------------
// Event names
// ------------------------------------------------------------------------

/**
* This event is generated when an empty burst of packets is received
*
* @return The event name
*/
public String eventEthdevRxBurstEmpty() {
return ETH_DEV_RX_BURST_EMPTY;
}

/**
* This event is generated when a burst of one or more packets is received
*
* @return The event name
*/
public String eventEthdevRxBurstNonEmpty() {
return ETH_DEV_RX_BURST_NON_EMPTY;
}

/**
* This event is generated when a burst of packets is sent
*
* @return The event name
*/
public String eventEthdevTxBurst() {
return ETH_DEV_TX_BURST;
}

/**
* This event is emitted by the Ethdev profiling library when a non empty
* burst of packets is received
*
* @return The event name
*/
public String eventProfileEthdevRxBurst() {
return PROFILE_ETH_DEV_RX_BURST;
}

/**
* This event is emitted by the Ethdev profiling library when a burst of
* packets is sent
*
* @return The event name
*/
public String eventProfileEthdevTxBurst() {
return PROFILE_ETH_DEV_TX_BURST;
}

// ------------------------------------------------------------------------
// Event field names
// ------------------------------------------------------------------------

/**
* @return The name of the field specifying the NIC port identifier
*/
public String fieldPortId() {
return PORT_ID;
}

/**
* @return The name of the field indicating the id of a queue attached to a
* port
*/
public String fieldQueueId() {
return QUEUE_ID;
}

/**
* @return The name of the field specifying the number of packets received
* in a burst
*/
public String fieldNbRxPkts() {
return NB_RX;
}

/**
* @return The field name specifying the number of packets transmitted as a
* burst
*/
public String fieldNbPkts() {
return NB_PKTS;
}

/**
* @return The field name specifying the number of packets transmitted as a
* burst in the profiling event
*/
public String fieldNbTxPkts() {
return NB_TX;
}

/**
* @return The name of the field specifying the number of bytes denoting the
* size of the received or transmitted burst
*/
public String fieldSize() {
return SIZE;
}

/**
* @return The name of the thread issuing the DPDK event
*/
public String fieldThreadName() {
return THREAD_NAME;
}

/**
* @return The identifier of the CPU on which the DPDK event was recorded
*/
public String fieldCpuId() {
return CPU_ID;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**********************************************************************
* Copyright (c) 2024 École Polytechnique de Montréal
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License 2.0 which
* accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
**********************************************************************/
@org.eclipse.jdt.annotation.NonNullByDefault
package org.eclipse.tracecompass.incubator.internal.dpdk.core.ethdev.analysis;
Loading
Loading