projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stat: collapse buf output flush and free
[fio.git]
/
engines
/
net.c
diff --git
a/engines/net.c
b/engines/net.c
index 7c0a4eb41c010f75f97a25023f1a5897160a10c3..cd19535294a083eff56c97036aef75f8c4615541 100644
(file)
--- a/
engines/net.c
+++ b/
engines/net.c
@@
-484,8
+484,11
@@
static void store_udp_seq(struct netio_data *nd, struct io_u *io_u)
{
struct udp_seq *us;
{
struct udp_seq *us;
+ if (io_u->xfer_buflen < sizeof(*us))
+ return;
+
us = io_u->xfer_buf + io_u->xfer_buflen - sizeof(*us);
us = io_u->xfer_buf + io_u->xfer_buflen - sizeof(*us);
- us->magic = cpu_to_le64(FIO_UDP_SEQ_MAGIC);
+ us->magic = cpu_to_le64(
(uint64_t)
FIO_UDP_SEQ_MAGIC);
us->bs = cpu_to_le64((uint64_t) io_u->xfer_buflen);
us->seq = cpu_to_le64(nd->udp_send_seq++);
}
us->bs = cpu_to_le64((uint64_t) io_u->xfer_buflen);
us->seq = cpu_to_le64(nd->udp_send_seq++);
}
@@
-496,6
+499,9
@@
static void verify_udp_seq(struct thread_data *td, struct netio_data *nd,
struct udp_seq *us;
uint64_t seq;
struct udp_seq *us;
uint64_t seq;
+ if (io_u->xfer_buflen < sizeof(*us))
+ return;
+
if (nd->seq_off)
return;
if (nd->seq_off)
return;
@@
-1308,6
+1314,8
@@
static int fio_netio_init(struct thread_data *td)
return 1;
}
return 1;
}
+ o->port += td->subjob_number;
+
if (!is_tcp(o)) {
if (o->listen) {
log_err("fio: listen only valid for TCP proto IO\n");
if (!is_tcp(o)) {
if (o->listen) {
log_err("fio: listen only valid for TCP proto IO\n");