]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Do not rely on data alignment after m_pullup().
authorAlexander Motin <mav@FreeBSD.org>
Tue, 14 Feb 2017 16:33:42 +0000 (16:33 +0000)
committerAlexander Motin <mav@FreeBSD.org>
Tue, 14 Feb 2017 16:33:42 +0000 (16:33 +0000)
commitd0d587c787344615f6b17017dd7a3641212f21c4
tree64e9077f5937893168edc1b63441cb85c90f7f95
parent937c1b0757fec1c460e886ad897ed90872bb26cf
Do not rely on data alignment after m_pullup().

In general case m_pullup() does not really guarantee any data alignment.
Instead of depenting on side effects caused by data being always copied
out of mbuf cluster (which is probably a bug by itself), always allocate
aligned BHS buffer and read data there directly from socket.

While there, reuse new icl_conn_receive_buf() function to read digests.
The code could probably be even more optimized to aggregate those reads,
but until that done, this is still easier then the way it was before.

MFC after: 2 weeks
sys/dev/iscsi/icl_soft.c