require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_IX_H_)) {
    eval 'sub _IX_H_ () {1;}' unless defined(&_IX_H_);
    require 'dev/pci/ixgbe.ph';
    if(0) {
	require 'tcp_lro.ph';
    }
    eval 'sub DEFAULT_TXD () {256;}' unless defined(&DEFAULT_TXD);
    eval 'sub PERFORM_TXD () {2048;}' unless defined(&PERFORM_TXD);
    eval 'sub MAX_TXD () {4096;}' unless defined(&MAX_TXD);
    eval 'sub MIN_TXD () {64;}' unless defined(&MIN_TXD);
    eval 'sub DEFAULT_RXD () {256;}' unless defined(&DEFAULT_RXD);
    eval 'sub PERFORM_RXD () {2048;}' unless defined(&PERFORM_RXD);
    eval 'sub MAX_RXD () {4096;}' unless defined(&MAX_RXD);
    eval 'sub MIN_RXD () {64;}' unless defined(&MIN_RXD);
    eval 'sub DBA_ALIGN () {128;}' unless defined(&DBA_ALIGN);
    eval 'sub MAX_INTR () {10;}' unless defined(&MAX_INTR);
    eval 'sub IXGBE_TX_TIMEOUT () {5;}' unless defined(&IXGBE_TX_TIMEOUT);
    eval 'sub IXGBE_TX_CLEANUP_THRESHOLD () {( ($sc->{num_tx_desc}) / 8);}' unless defined(&IXGBE_TX_CLEANUP_THRESHOLD);
    eval 'sub IXGBE_TX_OP_THRESHOLD () {( ($sc->{num_tx_desc}) / 32);}' unless defined(&IXGBE_TX_OP_THRESHOLD);
    eval 'sub IXGBE_MAX_FRAME_SIZE () {0x3f00;}' unless defined(&IXGBE_MAX_FRAME_SIZE);
    eval 'sub IXGBE_FC_PAUSE () {0x680;}' unless defined(&IXGBE_FC_PAUSE);
    eval 'sub IXGBE_FC_HI () {0x20000;}' unless defined(&IXGBE_FC_HI);
    eval 'sub IXGBE_FC_LO () {0x10000;}' unless defined(&IXGBE_FC_LO);
    eval 'sub DEBUG_INIT () {0;}' unless defined(&DEBUG_INIT);
    eval 'sub DEBUG_IOCTL () {0;}' unless defined(&DEBUG_IOCTL);
    eval 'sub DEBUG_HW () {0;}' unless defined(&DEBUG_HW);
    eval 'sub INIT_DEBUGOUT {
        my($S) = @_;
	    eval q( &if ( &DEBUG_INIT)  &printf($S \\"\\\\n\\"));
    }' unless defined(&INIT_DEBUGOUT);
    eval 'sub INIT_DEBUGOUT1 {
        my($S, $A) = @_;
	    eval q( &if ( &DEBUG_INIT)  &printf($S \\"\\\\n\\", $A));
    }' unless defined(&INIT_DEBUGOUT1);
    eval 'sub INIT_DEBUGOUT2 {
        my($S, $A, $B) = @_;
	    eval q( &if ( &DEBUG_INIT)  &printf($S \\"\\\\n\\", $A, $B));
    }' unless defined(&INIT_DEBUGOUT2);
    eval 'sub IOCTL_DEBUGOUT {
        my($S) = @_;
	    eval q( &if ( &DEBUG_IOCTL)  &printf($S \\"\\\\n\\"));
    }' unless defined(&IOCTL_DEBUGOUT);
    eval 'sub IOCTL_DEBUGOUT1 {
        my($S, $A) = @_;
	    eval q( &if ( &DEBUG_IOCTL)  &printf($S \\"\\\\n\\", $A));
    }' unless defined(&IOCTL_DEBUGOUT1);
    eval 'sub IOCTL_DEBUGOUT2 {
        my($S, $A, $B) = @_;
	    eval q( &if ( &DEBUG_IOCTL)  &printf($S \\"\\\\n\\", $A, $B));
    }' unless defined(&IOCTL_DEBUGOUT2);
    eval 'sub HW_DEBUGOUT {
        my($S) = @_;
	    eval q( &if ( &DEBUG_HW)  &printf($S \\"\\\\n\\"));
    }' unless defined(&HW_DEBUGOUT);
    eval 'sub HW_DEBUGOUT1 {
        my($S, $A) = @_;
	    eval q( &if ( &DEBUG_HW)  &printf($S \\"\\\\n\\", $A));
    }' unless defined(&HW_DEBUGOUT1);
    eval 'sub HW_DEBUGOUT2 {
        my($S, $A, $B) = @_;
	    eval q( &if ( &DEBUG_HW)  &printf($S \\"\\\\n\\", $A, $B));
    }' unless defined(&HW_DEBUGOUT2);
    eval 'sub MAX_NUM_MULTICAST_ADDRESSES () {128;}' unless defined(&MAX_NUM_MULTICAST_ADDRESSES);
    eval 'sub IXGBE_MAX_SCATTER () {100;}' unless defined(&IXGBE_MAX_SCATTER);
    eval 'sub IXGBE_MSIX_BAR () {3;}' unless defined(&IXGBE_MSIX_BAR);
    if(0) {
	eval 'sub IXGBE_TSO_SIZE () {65535;}' unless defined(&IXGBE_TSO_SIZE);
    } else {
	eval 'sub IXGBE_TSO_SIZE () { &IXGBE_MAX_FRAME_SIZE;}' unless defined(&IXGBE_TSO_SIZE);
    }
    eval 'sub IXGBE_TX_BUFFER_SIZE () {(( &uint32_t) 1514);}' unless defined(&IXGBE_TX_BUFFER_SIZE);
    eval 'sub IXGBE_RX_HDR_SIZE () {(( &uint32_t) 256);}' unless defined(&IXGBE_RX_HDR_SIZE);
    eval 'sub CSUM_OFFLOAD () {7;}' unless defined(&CSUM_OFFLOAD);
    eval 'sub IXGBE_MSGS () {18;}' unless defined(&IXGBE_MSGS);
    if((defined(&__FreeBSD_version) ? &__FreeBSD_version : 0) < 700000) {
	eval 'sub ETHER_BPF_MTAP () { &BPF_MTAP;}' unless defined(&ETHER_BPF_MTAP);
	eval 'sub CSUM_TSO () {0;}' unless defined(&CSUM_TSO);
	eval 'sub IFCAP_TSO4 () {0;}' unless defined(&IFCAP_TSO4);
	eval 'sub FILTER_STRAY () {1;}' unless defined(&FILTER_STRAY);
	eval 'sub FILTER_HANDLED () {1;}' unless defined(&FILTER_HANDLED);
    }
    eval 'sub MAX_IRQ_SEC () {8000;}' unless defined(&MAX_IRQ_SEC);
    eval 'sub DEFAULT_ITR () {1000000000/( &MAX_IRQ_SEC * 256);}' unless defined(&DEFAULT_ITR);
    eval 'sub LINK_ITR () {1000000000/(1950* 256);}' unless defined(&LINK_ITR);
    if(0) {
    }
}
1;
