A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
dpdk-net-device-helper.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 NITK Surathkal
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Authors: Harsh Patel <thadodaharsh10@gmail.com>
7 * Hrishikesh Hiraskar <hrishihiraskar@gmail.com>
8 */
9
10#ifndef DPDK_NET_DEVICE_HELPER_H
11#define DPDK_NET_DEVICE_HELPER_H
12
14
15namespace ns3
16{
17
18/**
19 * \ingroup fd-net-device
20 * \brief build a DpdkNetDevice object attached to a physical network
21 * interface
22 */
24{
25 public:
26 /**
27 * Construct a DpdkNetDeviceHelper and initialize DPDK EAL
28 */
30
32 {
33 }
34
35 /**
36 * \brief Sets list of logical cores to use
37 *
38 * \param lCoreList Comma separated logical core list (e.g., "0,1")
39 */
40 void SetLCoreList(std::string lCoreList);
41
42 /**
43 * \brief Sets PMD Library to be used for the NIC
44 *
45 * \param pmdLibrary The PMD Library
46 */
47 void SetPmdLibrary(std::string pmdLibrary);
48
49 /**
50 * \brief Sets DPDK Driver to bind NIC to
51 *
52 * \param dpdkDriver The DPDK Driver
53 */
54 void SetDpdkDriver(std::string dpdkDriver);
55
56 protected:
57 /**
58 * \brief This method creates an ns3::FdNetDevice attached to a physical network
59 * interface
60 *
61 * \param node The node to install the device in
62 * \returns A container holding the added net device.
63 */
64 Ptr<NetDevice> InstallPriv(Ptr<Node> node) const override;
65
66 /**
67 * Logical cores to use
68 */
69 std::string m_lCoreList;
70
71 /**
72 * PMD Library to be used for NIC
73 */
74 std::string m_pmdLibrary;
75
76 /**
77 * DPDK Driver to bind NIC to
78 */
79 std::string m_dpdkDriver;
80};
81
82} // namespace ns3
83
84#endif /* DPDK_NET_DEVICE_HELPER_H */
build a DpdkNetDevice object attached to a physical network interface
void SetPmdLibrary(std::string pmdLibrary)
Sets PMD Library to be used for the NIC.
std::string m_lCoreList
Logical cores to use.
void SetDpdkDriver(std::string dpdkDriver)
Sets DPDK Driver to bind NIC to.
std::string m_dpdkDriver
DPDK Driver to bind NIC to.
std::string m_pmdLibrary
PMD Library to be used for NIC.
void SetLCoreList(std::string lCoreList)
Sets list of logical cores to use.
Ptr< NetDevice > InstallPriv(Ptr< Node > node) const override
This method creates an ns3::FdNetDevice attached to a physical network interface.
DpdkNetDeviceHelper()
Construct a DpdkNetDeviceHelper and initialize DPDK EAL.
build a set of FdNetDevice objects attached to a physical network interface
Smart pointer class similar to boost::intrusive_ptr.
Every class exported by the ns3 library is enclosed in the ns3 namespace.