sctp: Allow to disable SCTP checksums via module parameter
This is a new version of my patch, now using a module parameter instead of a sysctl, so that the option is harder to find. Please note that, once the module is loaded, it is still possible to change the value of the parameter in /sys/module/sctp/parameters/, which is useful if you want to do performance comparisons without rebooting. Computation of SCTP checksums significantly affects the performance of SCTP. For example, using two dual-Opteron 246 connected using a Gbe network, it was not possible to achieve more than ~730 Mbps, compared to 941 Mbps after disabling SCTP checksums. Unfortunately, SCTP checksum offloading in NICs is not commonly available (yet). By default, checksums are still enabled, of course. Signed-off-by: Lucas Nussbaum <lucas.nussbaum@ens-lyon.fr> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
85e8d004ec
commit
06e868066e
4 changed files with 10 additions and 2 deletions
|
@ -531,7 +531,7 @@ int sctp_packet_transmit(struct sctp_packet *packet)
|
|||
* Note: Adler-32 is no longer applicable, as has been replaced
|
||||
* by CRC32-C as described in <draft-ietf-tsvwg-sctpcsum-02.txt>.
|
||||
*/
|
||||
if (!(dst->dev->features & NETIF_F_NO_CSUM)) {
|
||||
if (!sctp_checksum_disable && !(dst->dev->features & NETIF_F_NO_CSUM)) {
|
||||
crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len);
|
||||
crc32 = sctp_end_cksum(crc32);
|
||||
} else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue