1226584Sdim/*-
2226584Sdim * Copyright (c) 2003-2012 Broadcom Corporation
3226584Sdim * All Rights Reserved
4226584Sdim *
5226584Sdim * Redistribution and use in source and binary forms, with or without
6226584Sdim * modification, are permitted provided that the following conditions
7226584Sdim * are met:
8226584Sdim *
9226584Sdim * 1. Redistributions of source code must retain the above copyright
10226584Sdim *    notice, this list of conditions and the following disclaimer.
11226584Sdim * 2. Redistributions in binary form must reproduce the above copyright
12226584Sdim *    notice, this list of conditions and the following disclaimer in
13226584Sdim *    the documentation and/or other materials provided with the
14226584Sdim *    distribution.
15226584Sdim *
16226584Sdim * THIS SOFTWARE IS PROVIDED BY BROADCOM ``AS IS'' AND ANY EXPRESS OR
17226584Sdim * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18226584Sdim * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19226584Sdim * ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM OR CONTRIBUTORS BE LIABLE
20226584Sdim * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21226584Sdim * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22226584Sdim * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23226584Sdim * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24226584Sdim * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25226584Sdim * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26226584Sdim * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27226584Sdim *
28296417Sdim * $FreeBSD$
29226584Sdim */
30226584Sdim
31226584Sdim#include "ucore.h"
32296417Sdim
33226584Sdimint main(void)
34226584Sdim{
35226584Sdim#if 0
36226584Sdim	volatile unsigned int *pkt =
37226584Sdim	    (volatile unsigned int *) (PACKET_MEMORY + PACKET_DATA_OFFSET);
38226584Sdim	int intf, hw_parser_error, context;
39226584Sdim#endif
40226584Sdim	unsigned int pktrdy;
41226584Sdim	int num_cachelines = 1518 / 64 ; /* pktsize / L3 cacheline size */
42226584Sdim
43226584Sdim
44226584Sdim	/* Spray packets to using distribution vector */
45226584Sdim	while (1) {
46226584Sdim		pktrdy = nlm_read_ucore_rxpktrdy();
47226584Sdim#if 0
48226584Sdim		intf = pktrdy & 0x1f;
49226584Sdim		context = (pktrdy >> 13) & 0x3ff;
50226584Sdim		hw_parser_error = (pktrdy >> 23) & 0x1;
51226584Sdim#endif
52226584Sdim		nlm_ucore_setup_poepktdistr(FWD_DIST_VEC, 0, 0, 0, 0);
53226584Sdim		nlm_ucore_pkt_done(num_cachelines, 0, 0, 0, 0, 0, 0, 0, 0, 0,
54226584Sdim		    0, 0);
55226584Sdim	}
56226584Sdim
57296417Sdim	return (0);
58226584Sdim}
59226584Sdim