source: SVN/cambria/redboot/packages/devs/eth/intel/npe/osServices/current/src/IxOsBuffPoolMgt.c @ 1

Last change on this file since 1 was 1, checked in by Tim Harvey, 2 years ago

restored latest version of files from server backup

Signed-off-by: Tim Harvey <tharvey@…>

File size: 2.5 KB
Line 
1/**
2 * @file IxOsBuffPoolMgt.c (Now mapped to OSAL )
3 *
4 * @date 9 Oct 2002
5 *
6 * @brief This file contains the mbuf pool management implementation.
7 *
8 *
9 * @par
10 * IXP400 SW Release version 2.3
11 *
12 * -- Copyright Notice --
13 *
14 * @par
15 * Copyright (c) 2001-2005, Intel Corporation.
16 * All rights reserved.
17 *
18 * @par
19 * Redistribution and use in source and binary forms, with or without
20 * modification, are permitted provided that the following conditions
21 * are met:
22 * 1. Redistributions of source code must retain the above copyright
23 *    notice, this list of conditions and the following disclaimer.
24 * 2. Redistributions in binary form must reproduce the above copyright
25 *    notice, this list of conditions and the following disclaimer in the
26 *    documentation and/or other materials provided with the distribution.
27 * 3. Neither the name of the Intel Corporation nor the names of its contributors
28 *    may be used to endorse or promote products derived from this software
29 *    without specific prior written permission.
30 *
31 *
32 * @par
33 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
34 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
35 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
36 * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
37 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
38 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
39 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
41 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
42 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
43 * SUCH DAMAGE.
44 *
45 *
46 * @par
47 * -- End of Copyright Notice --
48 *
49 * @sa IxOsBuffPoolMgt.h
50 * @sa IxOsBuffMgt.h
51 */
52
53#include "IxOsal.h"
54#include "IxOsBuffMgt.h"
55 
56IX_STATUS
57ixOsalOsIxp400BackwardPoolInit (IX_OSAL_MBUF_POOL ** poolPtrPtr,
58    UINT32 count, UINT32 size, const char *name)
59{
60    *poolPtrPtr = IX_OSAL_MBUF_POOL_INIT (count, size, name);
61    if (*poolPtrPtr == NULL)
62    {
63        return IX_FAIL;
64    }
65    else
66    {
67        return IX_SUCCESS;
68    }
69}
70
71IX_STATUS
72ixOsalOsIxp400BackwardMbufPoolGet (IX_OSAL_MBUF_POOL * poolPtr,
73    IX_OSAL_MBUF ** newBufPtrPtr)
74{
75    *newBufPtrPtr = IX_OSAL_MBUF_POOL_GET (poolPtr);
76    if (*newBufPtrPtr == NULL)
77    {
78        return IX_FAIL;
79    }
80    else
81    {
82        return IX_SUCCESS;
83    }
84}
85
Note: See TracBrowser for help on using the repository browser.