aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/socklib.c
Commit message (Expand)AuthorAge
* SUNRPC: temp var should match return type of xdr_skb_read_actorChuck Lever2008-01-30
* SUNRPC: add EXPORT_SYMBOL_GPL for generic transport functions\"Talpey, Thomas\2007-10-09
* [NET]: Treat CHECKSUM_PARTIAL as CHECKSUM_UNNECESSARYHerbert Xu2007-04-26
* SUNRPC: Rename skb_reader_t and friendsChuck Lever2006-12-06
* SUNRPC: skb_read_bits is the same as xs_tcp_copy_dataChuck Lever2006-12-06
* [NET]: Annotate callers of the reset of checksum.h stuff.Al Viro2006-12-03
* [NET]: Annotate callers of csum_fold() in net/*Al Viro2006-12-03
* [NET]: Replace CHECKSUM_HW by CHECKSUM_PARTIAL/CHECKSUM_COMPLETEPatrick McHardy2006-09-22
* [NET]: Detect hardware rx checksum faults correctlyHerbert Xu2005-11-10
* [PATCH] RPC: extract socket logic common to both client and serverChuck Lever2005-09-23
om"> * */ static void crc32init_le(void) { unsigned i, j; uint32_t crc = 1; crc32table_le[0] = 0; for (i = 1 << (CRC_LE_BITS - 1); i; i >>= 1) { crc = (crc >> 1) ^ ((crc & 1) ? CRCPOLY_LE : 0); for (j = 0; j < LE_TABLE_SIZE; j += 2 * i) crc32table_le[i + j] = crc ^ crc32table_le[j]; } } /** * crc32init_be() - allocate and initialize BE table data */ static void crc32init_be(void) { unsigned i, j; uint32_t crc = 0x80000000; crc32table_be[0] = 0; for (i = 1; i < BE_TABLE_SIZE; i <<= 1) { crc = (crc << 1) ^ ((crc & 0x80000000) ? CRCPOLY_BE : 0); for (j = 0; j < i; j++) crc32table_be[i + j] = crc ^ crc32table_be[j]; } } static void output_table(uint32_t table[], int len, char *trans) { int i; for (i = 0; i < len - 1; i++) { if (i % ENTRIES_PER_LINE == 0) printf("\n"); printf("%s(0x%8.8xL), ", trans, table[i]); } printf("%s(0x%8.8xL)\n", trans, table[len - 1]); } int main(int argc, char** argv) { printf("/* this file is generated - do not edit */\n\n"); if (CRC_LE_BITS > 1) { crc32init_le(); printf("static const u32 crc32table_le[] = {"); output_table(crc32table_le, LE_TABLE_SIZE, "tole"); printf("};\n"); } if (CRC_BE_BITS > 1) { crc32init_be(); printf("static const u32 crc32table_be[] = {"); output_table(crc32table_be, BE_TABLE_SIZE, "tobe"); printf("};\n"); } return 0; }