msgring.h revision 302408
1139825Simp/*- 2118131Srwatson * Copyright 2003-2011 Netlogic Microsystems (Netlogic). All rights 3101720Sphk * reserved. 4101720Sphk * 5101720Sphk * Redistribution and use in source and binary forms, with or without 6101720Sphk * modification, are permitted provided that the following conditions are 7101720Sphk * met: 8101720Sphk * 9101720Sphk * 1. Redistributions of source code must retain the above copyright 10101720Sphk * notice, this list of conditions and the following disclaimer. 11136721Srwatson * 2. Redistributions in binary form must reproduce the above copyright 12136721Srwatson * notice, this list of conditions and the following disclaimer in 13136721Srwatson * the documentation and/or other materials provided with the 14136721Srwatson * distribution. 15136721Srwatson * 16136721Srwatson * THIS SOFTWARE IS PROVIDED BY Netlogic Microsystems ``AS IS'' AND 17136721Srwatson * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18136721Srwatson * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 19136721Srwatson * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NETLOGIC OR CONTRIBUTORS BE 20136721Srwatson * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21136721Srwatson * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22136721Srwatson * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23136721Srwatson * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24136721Srwatson * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25136721Srwatson * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 26136721Srwatson * THE POSSIBILITY OF SUCH DAMAGE. 27136721Srwatson * 28136721Srwatson * NETLOGIC_BSD 29136721Srwatson * $FreeBSD: stable/11/sys/mips/nlm/msgring.h 279387 2015-02-28 00:17:29Z jchandra $ 30136721Srwatson */ 31136721Srwatson 321541Srgrimes#ifndef _NLM_MSGRING_H 331541Srgrimes#define _NLM_MSGRING_H 341541Srgrimes#define CMS_DEFAULT_CREDIT 50 351541Srgrimes/* 361541Srgrimes * packets are sent to VC 0 of a thread 371541Srgrimes * freebacks are sent to VC 3 of a thread 381541Srgrimes */ 391541Srgrimes#define XLPGE_RX_VC 0 401541Srgrimes#define XLPGE_FB_VC 3 411541Srgrimes 421541Srgrimesextern uint32_t xlp_msg_thread_mask; 431541Srgrimes 441541Srgrimesstruct nlm_fmn_msg; 451541Srgrimestypedef void (*msgring_handler)(int, int, int, int, struct nlm_fmn_msg *, void *); 461541Srgrimes 471541Srgrimesint register_msgring_handler(int startb, int endb, msgring_handler action, 481541Srgrimes void *arg); 491541Srgrimesint xlp_handle_msg_vc(u_int vcmask, int max_msgs); 501541Srgrimesvoid xlp_msgring_cpu_init(int, int, int); 511541Srgrimesvoid xlp_cms_enable_intr(int , int , int , int); 521541Srgrimes#endif /* _NLM_MSGRING_H */ 531541Srgrimes