Skip to content

Commit bdbaa44

Browse files
Apply code style suggestions from code review
Co-authored-by: Tomas Cejka <[email protected]>
1 parent c2aa223 commit bdbaa44

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

input/dpdk-ring.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ __attribute__((constructor)) static void register_this_plugin()
4141
register_plugin(&rec);
4242
}
4343

44-
DpdkRingCore* DpdkRingCore::m_instance = nullptr;
44+
DpdkRingCore *DpdkRingCore::m_instance = nullptr;
4545

46-
DpdkRingCore& DpdkRingCore::getInstance()
46+
DpdkRingCore &DpdkRingCore::getInstance()
4747
{
4848
if (!m_instance) {
4949
m_instance = new DpdkRingCore();
@@ -145,7 +145,7 @@ void DpdkRingReader::init(const char* params)
145145

146146
struct timeval DpdkRingReader::getTimestamp(rte_mbuf* mbuf)
147147
{
148-
struct timeval tv;
148+
struct timeval tv;
149149
auto now = std::chrono::system_clock::now();
150150
auto now_t = std::chrono::system_clock::to_time_t(now);
151151

input/dpdk-ring.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,27 +87,27 @@ class DpdkRingCore {
8787
*
8888
* @param eal_params DPDK EAL parameters.
8989
*/
90-
void configure(const char* params);
90+
void configure(const char *params);
9191

9292
/**
9393
* @brief Get the singleton dpdk core instance
9494
*/
95-
static DpdkRingCore& getInstance();
95+
static DpdkRingCore &getInstance();
9696
void deinit();
9797

9898
DpdkRingOptParser parser;
9999

100100
private:
101-
std::vector<char *> convertStringToArgvFormat(const std::string& ealParams);
102-
void configureEal(const std::string& ealParams);
101+
std::vector<char *> convertStringToArgvFormat(const std::string &ealParams);
102+
void configureEal(const std::string &ealParams);
103103
~DpdkRingCore();
104104
bool isConfigured = false;
105-
static DpdkRingCore* m_instance;
105+
static DpdkRingCore *m_instance;
106106
};
107107

108108
class DpdkRingReader : public InputPlugin {
109109
public:
110-
Result get(PacketBlock& packets) override;
110+
Result get(PacketBlock &packets) override;
111111

112112
void init(const char* params) override;
113113

@@ -124,13 +124,13 @@ class DpdkRingReader : public InputPlugin {
124124
~DpdkRingReader();
125125
DpdkRingReader();
126126
private:
127-
std::vector<rte_mbuf*> mbufs_;
127+
std::vector<rte_mbuf *> mbufs_;
128128
std::uint16_t pkts_read_;
129129

130130
void createRteMbufs(uint16_t mbufsSize);
131-
struct timeval getTimestamp(rte_mbuf* mbuf);
132-
DpdkRingCore& m_dpdkRingCore;
133-
rte_ring* m_ring;
131+
struct timeval getTimestamp(rte_mbuf *mbuf);
132+
DpdkRingCore &m_dpdkRingCore;
133+
rte_ring *m_ring;
134134
bool is_reader_ready = false;
135135

136136

0 commit comments

Comments
 (0)