Vendor Unique Iscsi Crc32C; Build Instructions; Main Function And Defines - Oracle StorageTek T10000 Reference Manual

Hide thumbs Also See for StorageTek T10000:
Table of Contents

Advertisement

Vendor Unique iSCSI CRC32C

Vendor Unique iSCSI CRC32C

Build Instructions

The following instructions must be put into a Makefile. Include all of the "C" code
identified in all sections below into a file called main.c and put the SPARC assembler
in a file called crc32.il. Then run "make".
MACH:sh = uname -p
# SunOS
i386_CFLAGS =
sparc_CFLAGS = crc32.il
# Linux
x86_64_CFLAGS =
CFLAGS = $($(MACH)_CFLAGS)
main : main.c
cc $(CFLAGS) -o main main.c

Main Function and Defines

#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if defined(__sparc)
#define CRC32C_SIZE
#else
#if defined(__amd64) || defined(__x86_64)
#define CRC32C_INST
#define CRC32C_SIZE
#else
#define CRC32C_INST
bit code */
#define CRC32C_SIZE
#endif
#define
#define
value */
#define
#define
#if defined(__sun__) || defined(__SunOS)
/********************/
/* Solaris ONLY */
256 T10000: Interface Reference Manual
8
"0x48, " /* byte code for 64-bit code */
8
4
CRC32C_ALIGN
CRC32C_XOR 0xFFFFFFFF
CRC32C_INIT
0xFFFFFFFF
CRC32C_LEN
4
/* 8 data bytes per cpu crc inst */
/* 8 data bytes per cpu crc inst */
/* no inst byte code for 32-
/* 4 data bytes per cpu crc inst */
(CRC32C_SIZE - 1)
/* ending polynomial crc xor
/* crc length in bytes */
August 2016

Advertisement

Table of Contents
loading

Table of Contents