packetproc-data_packet.c File Reference

Related to processing packets in the fast path. More...

#include "packetproc-data.h"

Go to the source code of this file.


#define OPT_CREATE_LOOPS   1


static void data_thread_quit (int signo UNUSED)
static void packet_process (struct jbuf *jb, packet_thread_t *thrd)
static void * packet_loop (msp_dataloop_args_t *arg)
int init_packet_loop (void)


packet_thread_t packet_thrd [MSP_MAX_CPUS]

Detailed Description

Related to processing packets in the fast path.

These functions and types manage packet processing in the fast path

Definition in file packetproc-data_packet.c.

Define Documentation

#define OPT_CREATE_LOOPS   1

Options of creating data loops on all data CPUs: 1: Create data loops with msp_data_create_loops(). 2: Create data loops with msp_data_create_loop_on_cpu(). 3: Create data loops with pthread APIs.

Definition at line 29 of file packetproc-data_packet.c.

Function Documentation

static void data_thread_quit ( int signo  UNUSED  )  [static]

SIGUSR1 signal handler.

[in] signo Signal number

Definition at line 45 of file packetproc-data_packet.c.

Referenced by init_packet_loop().

int init_packet_loop ( void   ) 

Initialize data loops

MSP_OK upon successful completion, otherwise MSP error code.

Definition at line 334 of file packetproc-data_packet.c.

References data_thread_quit(), packet_loop(), and packet_thrd.

Referenced by packetproc_data_init().

static void* packet_loop ( msp_dataloop_args_t *  arg  )  [static]

Entry point for packet processing threads

[in] arg Data loop parameters, including user data, loop handle, and CPU number

Definition at line 151 of file packetproc-data_packet.c.

References packet_process(), packet_thrd, packet_thread_s::thrd_cpu, packet_thread_s::thrd_data_hdl, packet_thread_s::thrd_fifo_hdl, and packet_thread_s::thrd_tid.

Referenced by init_packet_loop().

static void packet_process ( struct jbuf *  jb,
packet_thread_t thrd 
) [static]

Packet process

Process received IP packet.

[in] jb Pointer to jbuf
[in] thrd Pointer to the packet thread data structure

Definition at line 65 of file packetproc-data_packet.c.

References packet_thread_s::thrd_data_hdl, and packet_thread_s::thrd_fifo_hdl.

Referenced by packet_loop().

Variable Documentation

packet_thread_t packet_thrd[MSP_MAX_CPUS]

Packet thread data.

Definition at line 36 of file packetproc-data_packet.c.

Referenced by init_packet_loop(), packet_loop(), packetproc_data_init(), and packetproc_data_quit().

2007-2009 Juniper Networks, Inc. All rights reserved. The information contained herein is confidential information of Juniper Networks, Inc., and may not be used, disclosed, distributed, modified, or copied without the prior written consent of Juniper Networks, Inc. in an express license. This information is subject to change by Juniper Networks, Inc. Juniper Networks, the Juniper Networks logo, and JUNOS are registered trademarks of Juniper Networks, Inc. in the United States and other countries. All other trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners.
Generated on Sun May 30 20:27:04 2010 for SDK Your Net Corporation Simple Packet Processing Example 1.0 by Doxygen 1.5.1