1233545Sjchandra/*- 2233545Sjchandra * Copyright (c) 2003-2012 Broadcom Corporation 3233545Sjchandra * All Rights Reserved 4233545Sjchandra * 5233545Sjchandra * Redistribution and use in source and binary forms, with or without 6233545Sjchandra * modification, are permitted provided that the following conditions 7233545Sjchandra * are met: 8233545Sjchandra * 9233545Sjchandra * 1. Redistributions of source code must retain the above copyright 10233545Sjchandra * notice, this list of conditions and the following disclaimer. 11233545Sjchandra * 2. Redistributions in binary form must reproduce the above copyright 12233545Sjchandra * notice, this list of conditions and the following disclaimer in 13233545Sjchandra * the documentation and/or other materials provided with the 14233545Sjchandra * distribution. 15233545Sjchandra * 16233545Sjchandra * THIS SOFTWARE IS PROVIDED BY BROADCOM ``AS IS'' AND ANY EXPRESS OR 17233545Sjchandra * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18233545Sjchandra * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19233545Sjchandra * ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM OR CONTRIBUTORS BE LIABLE 20233545Sjchandra * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21233545Sjchandra * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22233545Sjchandra * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23233545Sjchandra * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24233545Sjchandra * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25233545Sjchandra * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26233545Sjchandra * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27233545Sjchandra * 28233545Sjchandra * $FreeBSD: releng/10.2/sys/mips/nlm/dev/net/ucore/ucore_app.c 233657 2012-03-29 11:46:29Z jchandra $ 29233545Sjchandra */ 30233545Sjchandra 31233545Sjchandra#include "ucore.h" 32233545Sjchandra 33233545Sjchandraint main(void) 34233545Sjchandra{ 35233545Sjchandra#if 0 36233545Sjchandra volatile unsigned int *pkt = 37233545Sjchandra (volatile unsigned int *) (PACKET_MEMORY + PACKET_DATA_OFFSET); 38233545Sjchandra int intf, hw_parser_error, context; 39233545Sjchandra#endif 40233545Sjchandra unsigned int pktrdy; 41233657Sjchandra int num_cachelines = 1518 / 64 ; /* pktsize / L3 cacheline size */ 42233545Sjchandra 43233545Sjchandra 44233545Sjchandra /* Spray packets to using distribution vector */ 45233545Sjchandra while (1) { 46233545Sjchandra pktrdy = nlm_read_ucore_rxpktrdy(); 47233545Sjchandra#if 0 48233545Sjchandra intf = pktrdy & 0x1f; 49233545Sjchandra context = (pktrdy >> 13) & 0x3ff; 50233545Sjchandra hw_parser_error = (pktrdy >> 23) & 0x1; 51233545Sjchandra#endif 52233545Sjchandra nlm_ucore_setup_poepktdistr(FWD_DIST_VEC, 0, 0, 0, 0); 53233545Sjchandra nlm_ucore_pkt_done(num_cachelines, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54233545Sjchandra 0, 0); 55233545Sjchandra } 56233545Sjchandra 57233545Sjchandra return (0); 58233545Sjchandra} 59