Classes | Defines | Typedefs | Enumerations | Functions
bmet_transport.h File Reference

This is a very slim library implementation on top of Keystone NetCP to send a buffer with a pre-compiled packet header. This file has Bare metal transport definitions and API's to configure the Bare Metal Ethernet Transport Module. More...

#include "ti/drv/qmss/qmss_drv.h"
#include "ti/csl/cslr_device.h"
#include "ti/csl/csl_chip.h"
#include "ti/csl/csl_chipAux.h"
#include "ti/drv/cppi/cppi_drv.h"
#include "ti/drv/cppi/cppi_desc.h"

Classes

struct  Bmet_EthHeader
 This is the EthHeader. More...
struct  Bmet_VLANHeader
 This is the VLANHeader. More...
struct  Bmet_IPHeader
 This is the IPHeader. More...
struct  Bmet_UDPHeader
 This is the UDPHeader. More...
struct  bmetChStats
 This structure contains BMET Channel Statistics Information. More...
struct  bmetChConfig
 bmet channel configuration structure More...
struct  bmetDescArrayIndex
 structure with index info for the array of Packet descriptors More...
struct  bmetDescInfo
 Structure with info for each descriptor that can be used for transporting. More...
struct  bmetInst
 BMET Instance Structure. More...

Defines

#define htons(a)   ( (((a)>>8)&0xff) + (((a)<<8)&0xff00) )
 Macros for the transport.
#define BMET_ETH_TX_QUEUE_NUM_KEYSTONE1   648
 Keystone I Ethernet Queue number.
#define BMET_MAX_NUM_TRANSPORT_DESC   1024
 Maximum number of descriptors the bare metal ethernet transport can handle.
#define BMET_ETHHDR_SIZE   14
 Maximum number of descriptors the bare metal ethernet transport can handle.
#define BMET_PKT_HEADER_SIZE   (BMET_ETHHDR_SIZE + BMET_VLANHDR_SIZE + BMET_IPHDR_SIZE + BMET_UDPHDR_SIZE)
 Total network packet header size.
#define BMET_ETH_IP   0x800
 This is the protocol identification field in the Ethernet header which identifies the packet as an IPv4 packet.
#define BMET_ETH_VLAN   0x8100
 This is the protocol identification field in the Ethernet header which identifies the packet as a VLAN Packet.
#define BMET_IPPROTO_UDP   17
 This is the protocol identification field in the IPv4 header which identifies the packet as a UDP packet.
#define BMET_INST_SIZE   sizeof (bmetInst_t)
 BMET Instance Size.
#define BMET_INST_ALIGN   128
 Alignment for the BMET instance.

Typedefs

typedef void * transport_HANDLE
 This is the transport_HANDLE.
typedef struct Bmet_EthHeader Bmet_EthHeader
 This is the EthHeader.
typedef struct Bmet_VLANHeader Bmet_VLANHeader
 This is the VLANHeader.
typedef struct Bmet_IPHeader Bmet_IPHeader
 This is the IPHeader.
typedef struct Bmet_UDPHeader Bmet_UDPHeader
 This is the UDPHeader.
typedef enum bmetStatus bmetStatus_e
 This structure contains BMET Status information.
typedef struct bmetChStats bmetChStats_t
 This structure contains BMET Channel Statistics Information.
typedef enum bmetVlanHdrInfo bmetVlanHdrInfo_e
 Indicates the VLAN Header presense.
typedef struct bmetChConfig bmetChConfig_t
 bmet channel configuration structure
typedef struct bmetDescArrayIndex bmetDescArrayIndex_t
 structure with index info for the array of Packet descriptors
typedef struct bmetDescInfo bmetDescInfo_t
 Structure with info for each descriptor that can be used for transporting.
typedef struct bmetInst bmetInst_t
 BMET Instance Structure.

Enumerations

enum  bmetStatus {
  BMET_ATTCHED_BD_NULL = -9, BMET_ATTCHED_BD_NOT_MATCHED = -8, BMET_DESC_FOUND_FREE_BEFORE_FREE = -7, BMET_DESC_INDEX_EXCEED_FAIL = -6,
  BMET_QUEUEOPEN_FAIL = -5, BMET_DESC_ALOCFAIL = -4, BMET_FAIL = -3, BMET_UNSUPPORTED = -2,
  BMET_DESC_NOTAVAILABLE = -1, BMET_SUCCESS = 0
}
 This structure contains BMET Status information. More...
enum  bmetVlanHdrInfo { BMET_NO_VLAN_HEADER, BMET_PUT_VLAN_HEADER }
 Indicates the VLAN Header presense. More...

Functions

bmetStatus_e bmet_destroy (transport_HANDLE handle)
int32_t bmet_send (transport_HANDLE handle, uint8_t *logBuf, int32_t identity)
int32_t bmet_get_status (transport_HANDLE handle)
transport_HANDLE bmet_create (bmetChConfig_t bmetConfig)

Detailed Description

This is a very slim library implementation on top of Keystone NetCP to send a buffer with a pre-compiled packet header. This file has Bare metal transport definitions and API's to configure the Bare Metal Ethernet Transport Module.

============================================================================
(C) Copyright 2012, Texas Instruments, Inc.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of Texas Instruments Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Copyright 2014, Texas Instruments Incorporated