Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
1b258eee
Commit
1b258eee
authored
Feb 15, 2021
by
Antoine Kaufmann
Browse files
switch,corundum,corundum_bm,i40e_bm,trace: lint fixes
Add explicit for single param constructors.
parent
d0f63f20
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
20 deletions
+19
-20
sims/net/switch/net_switch.cc
sims/net/switch/net_switch.cc
+1
-1
sims/nic/corundum/corundum_verilator.cc
sims/nic/corundum/corundum_verilator.cc
+2
-2
sims/nic/corundum/mem.h
sims/nic/corundum/mem.h
+2
-2
sims/nic/corundum_bm/corundum_bm.h
sims/nic/corundum_bm/corundum_bm.h
+3
-3
sims/nic/i40e_bm/i40e_bm.h
sims/nic/i40e_bm/i40e_bm.h
+9
-10
trace/events.h
trace/events.h
+1
-1
trace/process.h
trace/process.h
+1
-1
No files found.
sims/net/switch/net_switch.cc
View file @
1b258eee
...
@@ -45,7 +45,7 @@ static uint64_t eth_latency = (500 * 1000ULL); // 500ns
...
@@ -45,7 +45,7 @@ static uint64_t eth_latency = (500 * 1000ULL); // 500ns
struct
MAC
{
struct
MAC
{
const
volatile
uint8_t
*
data
;
const
volatile
uint8_t
*
data
;
MAC
(
const
volatile
uint8_t
*
data
)
:
data
(
data
)
{
explicit
MAC
(
const
volatile
uint8_t
*
data
)
:
data
(
data
)
{
}
}
bool
operator
==
(
const
MAC
&
other
)
const
{
bool
operator
==
(
const
MAC
&
other
)
const
{
...
...
sims/nic/corundum/corundum_verilator.cc
View file @
1b258eee
...
@@ -591,7 +591,7 @@ class EthernetTx {
...
@@ -591,7 +591,7 @@ class EthernetTx {
size_t
packet_len
;
size_t
packet_len
;
public:
public:
EthernetTx
(
Vinterface
&
top_
)
:
top
(
top_
),
packet_len
(
0
)
{
explicit
EthernetTx
(
Vinterface
&
top_
)
:
top
(
top_
),
packet_len
(
0
)
{
}
}
void
packet_done
()
{
void
packet_done
()
{
...
@@ -654,7 +654,7 @@ class EthernetRx {
...
@@ -654,7 +654,7 @@ class EthernetRx {
size_t
packet_off
;
size_t
packet_off
;
public:
public:
EthernetRx
(
Vinterface
&
top_
)
explicit
EthernetRx
(
Vinterface
&
top_
)
:
top
(
top_
),
fifo_pos_rd
(
0
),
fifo_pos_wr
(
0
),
packet_off
(
0
)
{
:
top
(
top_
),
fifo_pos_rd
(
0
),
fifo_pos_wr
(
0
),
packet_off
(
0
)
{
for
(
size_t
i
=
0
;
i
<
FIFO_SIZE
;
i
++
)
fifo_lens
[
i
]
=
0
;
for
(
size_t
i
=
0
;
i
<
FIFO_SIZE
;
i
++
)
fifo_lens
[
i
]
=
0
;
}
}
...
...
sims/nic/corundum/mem.h
View file @
1b258eee
...
@@ -91,7 +91,7 @@ class MemReader {
...
@@ -91,7 +91,7 @@ class MemReader {
size_t
cur_off
;
size_t
cur_off
;
public:
public:
MemReader
(
MemReadPort
&
p_
)
:
p
(
p_
),
cur
(
0
),
cur_off
(
0
)
{
explicit
MemReader
(
MemReadPort
&
p_
)
:
p
(
p_
),
cur
(
0
),
cur_off
(
0
)
{
}
}
void
step
();
void
step
();
...
@@ -107,7 +107,7 @@ class MemWriter {
...
@@ -107,7 +107,7 @@ class MemWriter {
size_t
cur_off
;
size_t
cur_off
;
public:
public:
MemWriter
(
MemWritePort
&
p_
)
:
p
(
p_
),
cur
(
0
),
cur_off
(
0
)
{
explicit
MemWriter
(
MemWritePort
&
p_
)
:
p
(
p_
),
cur
(
0
),
cur_off
(
0
)
{
}
}
void
step
();
void
step
();
...
...
sims/nic/corundum_bm/corundum_bm.h
View file @
1b258eee
...
@@ -238,7 +238,7 @@ class EventRing : public DescRing {
...
@@ -238,7 +238,7 @@ class EventRing : public DescRing {
class
CplRing
:
public
DescRing
{
class
CplRing
:
public
DescRing
{
public:
public:
CplRing
(
EventRing
*
eventRing
);
explicit
CplRing
(
EventRing
*
eventRing
);
~
CplRing
();
~
CplRing
();
void
dmaDone
(
DMAOp
*
op
)
override
;
void
dmaDone
(
DMAOp
*
op
)
override
;
...
@@ -256,7 +256,7 @@ class CplRing : public DescRing {
...
@@ -256,7 +256,7 @@ class CplRing : public DescRing {
class
TxRing
:
public
DescRing
{
class
TxRing
:
public
DescRing
{
public:
public:
TxRing
(
CplRing
*
cplRing
);
explicit
TxRing
(
CplRing
*
cplRing
);
~
TxRing
();
~
TxRing
();
void
setHeadPtr
(
ptr_t
ptr
)
override
;
void
setHeadPtr
(
ptr_t
ptr
)
override
;
...
@@ -268,7 +268,7 @@ class TxRing : public DescRing {
...
@@ -268,7 +268,7 @@ class TxRing : public DescRing {
class
RxRing
:
public
DescRing
{
class
RxRing
:
public
DescRing
{
public:
public:
RxRing
(
CplRing
*
cplRing
);
explicit
RxRing
(
CplRing
*
cplRing
);
~
RxRing
();
~
RxRing
();
void
dmaDone
(
DMAOp
*
op
)
override
;
void
dmaDone
(
DMAOp
*
op
)
override
;
...
...
sims/nic/i40e_bm/i40e_bm.h
View file @
1b258eee
...
@@ -71,7 +71,7 @@ class logger : public std::ostream {
...
@@ -71,7 +71,7 @@ class logger : public std::ostream {
std
::
stringstream
ss
;
std
::
stringstream
ss
;
public:
public:
logger
(
const
std
::
string
&
label_
);
explicit
logger
(
const
std
::
string
&
label_
);
logger
&
operator
<<
(
char
c
);
logger
&
operator
<<
(
char
c
);
logger
&
operator
<<
(
int32_t
c
);
logger
&
operator
<<
(
int32_t
c
);
logger
&
operator
<<
(
uint8_t
i
);
logger
&
operator
<<
(
uint8_t
i
);
...
@@ -113,8 +113,7 @@ class queue_base {
...
@@ -113,8 +113,7 @@ class queue_base {
friend
class
queue_base
;
friend
class
queue_base
;
public:
public:
enum
state
enum
state
{
{
DESC_EMPTY
,
DESC_EMPTY
,
DESC_FETCHING
,
DESC_FETCHING
,
DESC_PREPARING
,
DESC_PREPARING
,
...
@@ -146,7 +145,7 @@ class queue_base {
...
@@ -146,7 +145,7 @@ class queue_base {
virtual
void
data_written
(
uint64_t
addr
,
size_t
len
);
virtual
void
data_written
(
uint64_t
addr
,
size_t
len
);
public:
public:
desc_ctx
(
queue_base
&
queue_
);
explicit
desc_ctx
(
queue_base
&
queue_
);
virtual
~
desc_ctx
();
virtual
~
desc_ctx
();
virtual
void
prepare
();
virtual
void
prepare
();
...
@@ -309,7 +308,7 @@ class host_mem_cache {
...
@@ -309,7 +308,7 @@ class host_mem_cache {
bool
failed
;
bool
failed
;
};
};
host_mem_cache
(
i40e_bm
&
dev
);
explicit
host_mem_cache
(
i40e_bm
&
dev
);
void
reset
();
void
reset
();
void
reg_updated
(
uint64_t
addr
);
void
reg_updated
(
uint64_t
addr
);
...
@@ -323,7 +322,7 @@ class lan_queue_base : public queue_base {
...
@@ -323,7 +322,7 @@ class lan_queue_base : public queue_base {
public:
public:
lan_queue_base
&
lq
;
lan_queue_base
&
lq
;
qctx_fetch
(
lan_queue_base
&
lq_
);
explicit
qctx_fetch
(
lan_queue_base
&
lq_
);
virtual
void
done
();
virtual
void
done
();
};
};
...
@@ -365,7 +364,7 @@ class lan_queue_tx : public lan_queue_base {
...
@@ -365,7 +364,7 @@ class lan_queue_tx : public lan_queue_base {
public:
public:
i40e_tx_desc
*
d
;
i40e_tx_desc
*
d
;
tx_desc_ctx
(
lan_queue_tx
&
queue_
);
explicit
tx_desc_ctx
(
lan_queue_tx
&
queue_
);
virtual
void
prepare
();
virtual
void
prepare
();
virtual
void
process
();
virtual
void
process
();
...
@@ -416,7 +415,7 @@ class lan_queue_rx : public lan_queue_base {
...
@@ -416,7 +415,7 @@ class lan_queue_rx : public lan_queue_base {
virtual
void
data_written
(
uint64_t
addr
,
size_t
len
);
virtual
void
data_written
(
uint64_t
addr
,
size_t
len
);
public:
public:
rx_desc_ctx
(
lan_queue_rx
&
queue_
);
explicit
rx_desc_ctx
(
lan_queue_rx
&
queue_
);
virtual
void
process
();
virtual
void
process
();
void
packet_received
(
const
void
*
data
,
size_t
len
,
bool
last
);
void
packet_received
(
const
void
*
data
,
size_t
len
,
bool
last
);
};
};
...
@@ -450,7 +449,7 @@ class rss_key_cache {
...
@@ -450,7 +449,7 @@ class rss_key_cache {
void
build
();
void
build
();
public:
public:
rss_key_cache
(
const
uint32_t
(
&
key_
)[
key_len
/
4
]);
explicit
rss_key_cache
(
const
uint32_t
(
&
key_
)[
key_len
/
4
]);
void
set_dirty
();
void
set_dirty
();
uint32_t
hash_ipv4
(
uint32_t
sip
,
uint32_t
dip
,
uint16_t
sp
,
uint16_t
dp
);
uint32_t
hash_ipv4
(
uint32_t
sip
,
uint32_t
dip
,
uint16_t
sp
,
uint16_t
dp
);
};
};
...
@@ -487,7 +486,7 @@ class shadow_ram {
...
@@ -487,7 +486,7 @@ class shadow_ram {
logger
log
;
logger
log
;
public:
public:
shadow_ram
(
i40e_bm
&
dev
);
explicit
shadow_ram
(
i40e_bm
&
dev
);
void
reg_updated
();
void
reg_updated
();
uint16_t
read
(
uint16_t
addr
);
uint16_t
read
(
uint16_t
addr
);
void
write
(
uint16_t
addr
,
uint16_t
val
);
void
write
(
uint16_t
addr
,
uint16_t
val
);
...
...
trace/events.h
View file @
1b258eee
...
@@ -30,7 +30,7 @@ class event {
...
@@ -30,7 +30,7 @@ class event {
public:
public:
uint64_t
ts
;
uint64_t
ts
;
event
(
uint64_t
ts_
)
:
ts
(
ts_
)
{
explicit
event
(
uint64_t
ts_
)
:
ts
(
ts_
)
{
}
}
virtual
~
event
()
{
virtual
~
event
()
{
...
...
trace/process.h
View file @
1b258eee
...
@@ -92,7 +92,7 @@ class gem5_parser : public log_parser {
...
@@ -92,7 +92,7 @@ class gem5_parser : public log_parser {
char
*
msg
,
size_t
msg_len
);
char
*
msg
,
size_t
msg_len
);
public:
public:
gem5_parser
(
sym_map
&
syms_
);
explicit
gem5_parser
(
sym_map
&
syms_
);
virtual
~
gem5_parser
();
virtual
~
gem5_parser
();
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment