A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
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
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Authors: Harsh Patel <thadodaharsh10@gmail.com>
18
* Hrishikesh Hiraskar <hrishihiraskar@gmail.com>
19
*/
20
21
#ifndef DPDK_NET_DEVICE_HELPER_H
22
#define DPDK_NET_DEVICE_HELPER_H
23
24
#include "
emu-fd-net-device-helper.h
"
25
26
namespace
ns3
27
{
28
29
/**
30
* \ingroup fd-net-device
31
* \brief build a DpdkNetDevice object attached to a physical network
32
* interface
33
*/
34
class
DpdkNetDeviceHelper
:
public
EmuFdNetDeviceHelper
35
{
36
public
:
37
/**
38
* Construct a DpdkNetDeviceHelper and initialize DPDK EAL
39
*/
40
DpdkNetDeviceHelper
();
41
42
~DpdkNetDeviceHelper
()
override
43
{
44
}
45
46
/**
47
* \brief Sets list of logical cores to use
48
*
49
* \param lCoreList Comma separated logical core list (e.g., "0,1")
50
*/
51
void
SetLCoreList
(std::string lCoreList);
52
53
/**
54
* \brief Sets PMD Library to be used for the NIC
55
*
56
* \param pmdLibrary The PMD Library
57
*/
58
void
SetPmdLibrary
(std::string pmdLibrary);
59
60
/**
61
* \brief Sets DPDK Driver to bind NIC to
62
*
63
* \param dpdkDriver The DPDK Driver
64
*/
65
void
SetDpdkDriver
(std::string dpdkDriver);
66
67
protected
:
68
/**
69
* \brief This method creates an ns3::FdNetDevice attached to a physical network
70
* interface
71
*
72
* \param node The node to install the device in
73
* \returns A container holding the added net device.
74
*/
75
Ptr<NetDevice>
InstallPriv
(
Ptr<Node>
node)
const override
;
76
77
/**
78
* Logical cores to use
79
*/
80
std::string
m_lCoreList
;
81
82
/**
83
* PMD Library to be used for NIC
84
*/
85
std::string
m_pmdLibrary
;
86
87
/**
88
* DPDK Driver to bind NIC to
89
*/
90
std::string
m_dpdkDriver
;
91
};
92
93
}
// namespace ns3
94
95
#endif
/* DPDK_NET_DEVICE_HELPER_H */
ns3::DpdkNetDeviceHelper
build a DpdkNetDevice object attached to a physical network interface
Definition:
dpdk-net-device-helper.h:35
ns3::DpdkNetDeviceHelper::SetPmdLibrary
void SetPmdLibrary(std::string pmdLibrary)
Sets PMD Library to be used for the NIC.
Definition:
dpdk-net-device-helper.cc:46
ns3::DpdkNetDeviceHelper::~DpdkNetDeviceHelper
~DpdkNetDeviceHelper() override
Definition:
dpdk-net-device-helper.h:42
ns3::DpdkNetDeviceHelper::m_lCoreList
std::string m_lCoreList
Logical cores to use.
Definition:
dpdk-net-device-helper.h:80
ns3::DpdkNetDeviceHelper::SetDpdkDriver
void SetDpdkDriver(std::string dpdkDriver)
Sets DPDK Driver to bind NIC to.
Definition:
dpdk-net-device-helper.cc:52
ns3::DpdkNetDeviceHelper::m_dpdkDriver
std::string m_dpdkDriver
DPDK Driver to bind NIC to.
Definition:
dpdk-net-device-helper.h:90
ns3::DpdkNetDeviceHelper::m_pmdLibrary
std::string m_pmdLibrary
PMD Library to be used for NIC.
Definition:
dpdk-net-device-helper.h:85
ns3::DpdkNetDeviceHelper::SetLCoreList
void SetLCoreList(std::string lCoreList)
Sets list of logical cores to use.
Definition:
dpdk-net-device-helper.cc:40
ns3::DpdkNetDeviceHelper::InstallPriv
Ptr< NetDevice > InstallPriv(Ptr< Node > node) const override
This method creates an ns3::FdNetDevice attached to a physical network interface.
Definition:
dpdk-net-device-helper.cc:58
ns3::DpdkNetDeviceHelper::DpdkNetDeviceHelper
DpdkNetDeviceHelper()
Construct a DpdkNetDeviceHelper and initialize DPDK EAL.
Definition:
dpdk-net-device-helper.cc:30
ns3::EmuFdNetDeviceHelper
build a set of FdNetDevice objects attached to a physical network interface
Definition:
emu-fd-net-device-helper.h:42
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
emu-fd-net-device-helper.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
fd-net-device
helper
dpdk-net-device-helper.h
Generated on Tue May 28 2024 23:35:22 for ns-3 by
1.9.6