NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/36865 (opencrypto - deflate wastes time with useless data copying)


I've a look at the patch.

It looks OK. (The deflate part is running here fine, gzip only validated by a look at the source, because I've disabled the gzip part here completely - see PR44210 and I don't need gzip here.)

But perhaps it would be a good idea to keep the defalte and gzip method as common as possible. Therefore I would have used a "bad3" label in the gzip part too and avoid the "i=0" setup in the declaration.

Then I'm no friend of calling memcpy() for 0 bytes - as done in both version (around line 165 - also done in the gzip part if the last allocated buffer is empty).
Line 165 I would have done it with something like
"if (tocopy == 0) { KASSERT(j == (i - 1)); } else { memcpy(output, buf[j].out, tocopy); }"
but this is of cause a question of the current religion ...

I think this report can be closed.

Best regards

W. Stukenbrock wrote:

Synopsis: opencrypto - deflate wastes time with useless data copying

State-Changed-From-To: closed->feedback
State-Changed-When: Sun, 20 Feb 2011 00:38:24 +0000
Since you asked a question I think you meant feedback, not closed :-)


Dr. Nagler & Company GmbH
Hauptstraße 9
92253 Schnaittenbach

Tel. +49 9622/71 97-42
Fax +49 9622/71 97-50

Hauptsitz: Schnaittenbach
Handelregister: Amberg HRB
Gerichtsstand: Amberg
Steuernummer: 201/118/51825
USt.-ID-Nummer: DE 273143997
Geschäftsführer: Dr. Martin Nagler, Dr. Dr. Karl-Kuno Kunze

Home | Main Index | Thread Index | Old Index