Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
vxge-traffic.c File Reference
#include <linux/etherdevice.h>
#include <linux/prefetch.h>
#include "vxge-traffic.h"
#include "vxge-config.h"
#include "vxge-main.h"

Go to the source code of this file.

Functions

enum vxge_hw_status vxge_hw_vpath_intr_enable (struct __vxge_hw_vpath_handle *vp)
 
enum vxge_hw_status vxge_hw_vpath_intr_disable (struct __vxge_hw_vpath_handle *vp)
 
void vxge_hw_vpath_tti_ci_set (struct __vxge_hw_fifo *fifo)
 
void vxge_hw_vpath_dynamic_rti_ci_set (struct __vxge_hw_ring *ring)
 
void vxge_hw_vpath_dynamic_tti_rtimer_set (struct __vxge_hw_fifo *fifo)
 
void vxge_hw_vpath_dynamic_rti_rtimer_set (struct __vxge_hw_ring *ring)
 
void vxge_hw_channel_msix_mask (struct __vxge_hw_channel *channel, int msix_id)
 
void vxge_hw_channel_msix_unmask (struct __vxge_hw_channel *channel, int msix_id)
 
void vxge_hw_channel_msix_clear (struct __vxge_hw_channel *channel, int msix_id)
 
u32 vxge_hw_device_set_intr_type (struct __vxge_hw_device *hldev, u32 intr_mode)
 
void vxge_hw_device_intr_enable (struct __vxge_hw_device *hldev)
 
void vxge_hw_device_intr_disable (struct __vxge_hw_device *hldev)
 
void vxge_hw_device_mask_all (struct __vxge_hw_device *hldev)
 
void vxge_hw_device_unmask_all (struct __vxge_hw_device *hldev)
 
void vxge_hw_device_flush_io (struct __vxge_hw_device *hldev)
 
enum vxge_hw_status vxge_hw_device_begin_irq (struct __vxge_hw_device *hldev, u32 skip_alarms, u64 *reason)
 
void vxge_hw_device_clear_tx_rx (struct __vxge_hw_device *hldev)
 
void vxge_hw_channel_dtr_try_complete (struct __vxge_hw_channel *channel, void **dtrh)
 
void vxge_hw_channel_dtr_complete (struct __vxge_hw_channel *channel)
 
void vxge_hw_channel_dtr_free (struct __vxge_hw_channel *channel, void *dtrh)
 
int vxge_hw_channel_dtr_count (struct __vxge_hw_channel *channel)
 
enum vxge_hw_status vxge_hw_ring_rxd_reserve (struct __vxge_hw_ring *ring, void **rxdh)
 
void vxge_hw_ring_rxd_free (struct __vxge_hw_ring *ring, void *rxdh)
 
void vxge_hw_ring_rxd_pre_post (struct __vxge_hw_ring *ring, void *rxdh)
 
void vxge_hw_ring_rxd_post_post (struct __vxge_hw_ring *ring, void *rxdh)
 
void vxge_hw_ring_rxd_post (struct __vxge_hw_ring *ring, void *rxdh)
 
void vxge_hw_ring_rxd_post_post_wmb (struct __vxge_hw_ring *ring, void *rxdh)
 
enum vxge_hw_status vxge_hw_ring_rxd_next_completed (struct __vxge_hw_ring *ring, void **rxdh, u8 *t_code)
 
enum vxge_hw_status vxge_hw_ring_handle_tcode (struct __vxge_hw_ring *ring, void *rxdh, u8 t_code)
 
u32 vxge_hw_fifo_free_txdl_count_get (struct __vxge_hw_fifo *fifoh)
 
enum vxge_hw_status vxge_hw_fifo_txdl_reserve (struct __vxge_hw_fifo *fifo, void **txdlh, void **txdl_priv)
 
void vxge_hw_fifo_txdl_buffer_set (struct __vxge_hw_fifo *fifo, void *txdlh, u32 frag_idx, dma_addr_t dma_pointer, u32 size)
 
void vxge_hw_fifo_txdl_post (struct __vxge_hw_fifo *fifo, void *txdlh)
 
enum vxge_hw_status vxge_hw_fifo_txdl_next_completed (struct __vxge_hw_fifo *fifo, void **txdlh, enum vxge_hw_fifo_tcode *t_code)
 
enum vxge_hw_status vxge_hw_fifo_handle_tcode (struct __vxge_hw_fifo *fifo, void *txdlh, enum vxge_hw_fifo_tcode t_code)
 
void vxge_hw_fifo_txdl_free (struct __vxge_hw_fifo *fifo, void *txdlh)
 
enum vxge_hw_status vxge_hw_vpath_mac_addr_add (struct __vxge_hw_vpath_handle *vp, u8(macaddr)[ETH_ALEN], u8(macaddr_mask)[ETH_ALEN], enum vxge_hw_vpath_mac_addr_add_mode duplicate_mode)
 
enum vxge_hw_status vxge_hw_vpath_mac_addr_get (struct __vxge_hw_vpath_handle *vp, u8(macaddr)[ETH_ALEN], u8(macaddr_mask)[ETH_ALEN])
 
enum vxge_hw_status vxge_hw_vpath_mac_addr_get_next (struct __vxge_hw_vpath_handle *vp, u8(macaddr)[ETH_ALEN], u8(macaddr_mask)[ETH_ALEN])
 
enum vxge_hw_status vxge_hw_vpath_mac_addr_delete (struct __vxge_hw_vpath_handle *vp, u8(macaddr)[ETH_ALEN], u8(macaddr_mask)[ETH_ALEN])
 
enum vxge_hw_status vxge_hw_vpath_vid_add (struct __vxge_hw_vpath_handle *vp, u64 vid)
 
enum vxge_hw_status vxge_hw_vpath_vid_get (struct __vxge_hw_vpath_handle *vp, u64 *vid)
 
enum vxge_hw_status vxge_hw_vpath_vid_delete (struct __vxge_hw_vpath_handle *vp, u64 vid)
 
enum vxge_hw_status vxge_hw_vpath_promisc_enable (struct __vxge_hw_vpath_handle *vp)
 
enum vxge_hw_status vxge_hw_vpath_promisc_disable (struct __vxge_hw_vpath_handle *vp)
 
enum vxge_hw_status vxge_hw_vpath_bcast_enable (struct __vxge_hw_vpath_handle *vp)
 
enum vxge_hw_status vxge_hw_vpath_mcast_enable (struct __vxge_hw_vpath_handle *vp)
 
enum vxge_hw_status vxge_hw_vpath_mcast_disable (struct __vxge_hw_vpath_handle *vp)
 
enum vxge_hw_status vxge_hw_vpath_alarm_process (struct __vxge_hw_vpath_handle *vp, u32 skip_alarms)
 
void vxge_hw_vpath_msix_set (struct __vxge_hw_vpath_handle *vp, int *tim_msix_id, int alarm_msix_id)
 
void vxge_hw_vpath_msix_mask (struct __vxge_hw_vpath_handle *vp, int msix_id)
 
void vxge_hw_vpath_msix_clear (struct __vxge_hw_vpath_handle *vp, int msix_id)
 
void vxge_hw_vpath_msix_unmask (struct __vxge_hw_vpath_handle *vp, int msix_id)
 
void vxge_hw_vpath_inta_mask_tx_rx (struct __vxge_hw_vpath_handle *vp)
 
void vxge_hw_vpath_inta_unmask_tx_rx (struct __vxge_hw_vpath_handle *vp)
 
enum vxge_hw_status vxge_hw_vpath_poll_rx (struct __vxge_hw_ring *ring)
 
enum vxge_hw_status vxge_hw_vpath_poll_tx (struct __vxge_hw_fifo *fifo, struct sk_buff ***skb_ptr, int nr_skb, int *more)
 

Function Documentation

void vxge_hw_channel_dtr_complete ( struct __vxge_hw_channel channel)

Definition at line 1086 of file vxge-traffic.c.

int vxge_hw_channel_dtr_count ( struct __vxge_hw_channel channel)

Definition at line 1117 of file vxge-traffic.c.

void vxge_hw_channel_dtr_free ( struct __vxge_hw_channel channel,
void dtrh 
)

Definition at line 1105 of file vxge-traffic.c.

void vxge_hw_channel_dtr_try_complete ( struct __vxge_hw_channel channel,
void **  dtrh 
)

Definition at line 1071 of file vxge-traffic.c.

void vxge_hw_channel_msix_clear ( struct __vxge_hw_channel channel,
int  msix_id 
)

vxge_hw_channel_msix_clear - Unmask the MSIX Vector. : Channel for rx or tx handle : MSI ID

The function unmasks the msix interrupt for the given msix_id if configured in MSIX oneshot mode

Returns: 0

Definition at line 329 of file vxge-traffic.c.

void vxge_hw_channel_msix_mask ( struct __vxge_hw_channel channel,
int  msix_id 
)

vxge_hw_channel_msix_mask - Mask MSIX Vector. : Channel for rx or tx handle : MSIX ID

The function masks the msix interrupt for the given msix_id

Returns: 0

Definition at line 293 of file vxge-traffic.c.

void vxge_hw_channel_msix_unmask ( struct __vxge_hw_channel channel,
int  msix_id 
)

vxge_hw_channel_msix_unmask - Unmask the MSIX Vector. : Channel for rx or tx handle : MSI ID

The function unmasks the msix interrupt for the given msix_id

Returns: 0

Definition at line 311 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_device_begin_irq ( struct __vxge_hw_device hldev,
u32  skip_alarms,
u64 reason 
)

vxge_hw_device_begin_irq - Begin IRQ processing. : HW device handle. : Do not clear the alarms : "Reason" for the interrupt, the value of Titan's general_int_status register.

The function performs two actions, It first checks whether (shared IRQ) the interrupt was raised by the device. Next, it masks the device interrupts.

Note: vxge_hw_device_begin_irq() does not flush MMIO writes through the bridge. Therefore, two back-to-back interrupts are potentially possible.

Returns: 0, if the interrupt is not "ours" (note that in this case the device remain enabled). Otherwise, vxge_hw_device_begin_irq() returns 64bit general adapter status.

Definition at line 890 of file vxge-traffic.c.

void vxge_hw_device_clear_tx_rx ( struct __vxge_hw_device hldev)

vxge_hw_device_clear_tx_rx - Acknowledge (that is, clear) the condition that has caused the Tx and RX interrupt. : HW device.

Acknowledge (that is, clear) the condition that has caused the Tx and Rx interrupt. See also: vxge_hw_device_begin_irq(), vxge_hw_device_mask_tx_rx(), vxge_hw_device_unmask_tx_rx().

Definition at line 976 of file vxge-traffic.c.

void vxge_hw_device_flush_io ( struct __vxge_hw_device hldev)

vxge_hw_device_flush_io - Flush io writes. : HW device handle.

The function performs a read operation to flush io writes.

Returns: void

Definition at line 487 of file vxge-traffic.c.

void vxge_hw_device_intr_disable ( struct __vxge_hw_device hldev)

vxge_hw_device_intr_disable - Disable Titan interrupts. : HW device handle. : One of the enum vxge_hw_device_intr enumerated values specifying the type(s) of interrupts to disable.

Disable Titan interrupts.

See also: vxge_hw_device_intr_enable()

Definition at line 420 of file vxge-traffic.c.

void vxge_hw_device_intr_enable ( struct __vxge_hw_device hldev)

vxge_hw_device_intr_enable - Enable interrupts. : HW device handle. : One of the enum vxge_hw_device_intr enumerated values specifying the type(s) of interrupts to enable.

Enable Titan interrupts. The function is to be executed the last in Titan initialization sequence.

See also: vxge_hw_device_intr_disable()

Definition at line 366 of file vxge-traffic.c.

void vxge_hw_device_mask_all ( struct __vxge_hw_device hldev)

vxge_hw_device_mask_all - Mask all device interrupts. : HW device handle.

Mask all device interrupts.

See also: vxge_hw_device_unmask_all()

Definition at line 449 of file vxge-traffic.c.

u32 vxge_hw_device_set_intr_type ( struct __vxge_hw_device hldev,
u32  intr_mode 
)

vxge_hw_device_set_intr_type - Updates the configuration with new interrupt type. : HW device handle. : New interrupt type

Definition at line 342 of file vxge-traffic.c.

void vxge_hw_device_unmask_all ( struct __vxge_hw_device hldev)

vxge_hw_device_unmask_all - Unmask all device interrupts. : HW device handle.

Unmask all device interrupts.

See also: vxge_hw_device_mask_all()

Definition at line 468 of file vxge-traffic.c.

u32 vxge_hw_fifo_free_txdl_count_get ( struct __vxge_hw_fifo fifoh)

vxge_hw_fifo_free_txdl_count_get - returns the number of txdls available in the fifo : Handle to the fifo object used for non offload send

Definition at line 1428 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_fifo_handle_tcode ( struct __vxge_hw_fifo fifo,
void txdlh,
enum vxge_hw_fifo_tcode  t_code 
)

vxge_hw_fifo_handle_tcode - Handle transfer code. : Handle to the fifo object used for non offload send : Descriptor handle. : One of the enumerated (and documented in the Titan user guide) "transfer codes".

Handle descriptor's transfer code. The latter comes with each completed descriptor.

Returns: one of the enum vxge_hw_status{} enumerated types. VXGE_HW_OK - for success. VXGE_HW_ERR_CRITICAL - when encounters critical error.

Definition at line 1676 of file vxge-traffic.c.

void vxge_hw_fifo_txdl_buffer_set ( struct __vxge_hw_fifo fifo,
void txdlh,
u32  frag_idx,
dma_addr_t  dma_pointer,
u32  size 
)

vxge_hw_fifo_txdl_buffer_set - Set transmit buffer pointer in the descriptor. : Handle to the fifo object used for non offload send : Descriptor handle. : Index of the data buffer in the caller's scatter-gather list (of buffers). : DMA address of the data buffer referenced by . : Size of the data buffer (in bytes).

This API is part of the preparation of the transmit descriptor for posting (via vxge_hw_fifo_txdl_post()). The related "preparation" APIs include vxge_hw_fifo_txdl_mss_set() and vxge_hw_fifo_txdl_cksum_set_bits(). All three APIs fill in the fields of the fifo descriptor, in accordance with the Titan specification.

Definition at line 1508 of file vxge-traffic.c.

void vxge_hw_fifo_txdl_free ( struct __vxge_hw_fifo fifo,
void txdlh 
)

vxge_hw_fifo_txdl_free - Free descriptor. : Handle to the fifo object used for non offload send : Descriptor handle.

Free the reserved descriptor. This operation is "symmetrical" to vxge_hw_fifo_txdl_reserve. The "free-ing" completes the descriptor's lifecycle.

After free-ing (see vxge_hw_fifo_txdl_free()) the descriptor again can be:

  • reserved (vxge_hw_fifo_txdl_reserve);
  • posted (vxge_hw_fifo_txdl_post);
  • completed (vxge_hw_fifo_txdl_next_completed);
  • and recycled again (vxge_hw_fifo_txdl_free).

For alternative state transitions and more details please refer to the design doc.

Definition at line 1719 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_fifo_txdl_next_completed ( struct __vxge_hw_fifo fifo,
void **  txdlh,
enum vxge_hw_fifo_tcode t_code 
)

vxge_hw_fifo_txdl_next_completed - Retrieve next completed descriptor. : Handle to the fifo object used for non offload send : Descriptor handle. Returned by HW. : Transfer code, as per Titan User Guide, Transmit Descriptor Format. Returned by HW.

Retrieve the next completed descriptor. HW uses channel callback (*vxge_hw_channel_callback_f) to notifiy driver of new completed descriptors. After that the driver can use vxge_hw_fifo_txdl_next_completed to retrieve the rest completions (the very first completion is passed by HW via vxge_hw_channel_callback_f).

Implementation-wise, the driver is free to call vxge_hw_fifo_txdl_next_completed either immediately from inside the channel callback, or in a deferred fashion and separate (from HW) context.

Non-zero means failure to process the descriptor. The failure could happen, for instance, when the link is down, in which case Titan completes the descriptor because it is not able to send the data out.

For details please refer to Titan User Guide.

Returns: VXGE_HW_OK - success. VXGE_HW_INF_NO_MORE_COMPLETED_DESCRIPTORS - No completed descriptors are currently available for processing.

Definition at line 1621 of file vxge-traffic.c.

void vxge_hw_fifo_txdl_post ( struct __vxge_hw_fifo fifo,
void txdlh 
)

vxge_hw_fifo_txdl_post - Post descriptor on the fifo channel. : Handle to the fifo object used for non offload send : Descriptor obtained via vxge_hw_fifo_txdl_reserve() : Number of contiguous buffers that are part of a single transmit operation.

Post descriptor on the 'fifo' type channel for transmission. Prior to posting the descriptor should be filled in accordance with Host/Titan interface specification for a given service (LL, etc.).

Definition at line 1557 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_fifo_txdl_reserve ( struct __vxge_hw_fifo fifo,
void **  txdlh,
void **  txdl_priv 
)

vxge_hw_fifo_txdl_reserve - Reserve fifo descriptor. : Handle to the fifo object used for non offload send : Reserved descriptor. On success HW fills this "out" parameter with a valid handle. : Buffer to return the pointer to per txdl space

Reserve a single TxDL (that is, fifo descriptor) for the subsequent filling-in by driver) and posting on the corresponding channel () via vxge_hw_fifo_txdl_post().

Note: it is the responsibility of driver to reserve multiple descriptors for lengthy (e.g., LSO) transmit operation. A single fifo descriptor carries up to configured number (fifo.max_frags) of contiguous buffers.

Returns: VXGE_HW_OK - success; VXGE_HW_INF_OUT_OF_DESCRIPTORS - Currently no descriptors available

Definition at line 1453 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_ring_handle_tcode ( struct __vxge_hw_ring ring,
void rxdh,
u8  t_code 
)

vxge_hw_ring_handle_tcode - Handle transfer code. : Handle to the ring object used for receive : Descriptor handle. : One of the enumerated (and documented in the Titan user guide) "transfer codes".

Handle descriptor's transfer code. The latter comes with each completed descriptor.

Returns: one of the enum vxge_hw_status{} enumerated types. VXGE_HW_OK - for success. VXGE_HW_ERR_CRITICAL - when encounters critical error.

Definition at line 1364 of file vxge-traffic.c.

void vxge_hw_ring_rxd_free ( struct __vxge_hw_ring ring,
void rxdh 
)

vxge_hw_ring_rxd_free - Free descriptor. : Handle to the ring object used for receive : Descriptor handle.

Free the reserved descriptor. This operation is "symmetrical" to vxge_hw_ring_rxd_reserve. The "free-ing" completes the descriptor's lifecycle.

After free-ing (see vxge_hw_ring_rxd_free()) the descriptor again can be:

  • reserved (vxge_hw_ring_rxd_reserve);
  • posted (vxge_hw_ring_rxd_post);
  • completed (vxge_hw_ring_rxd_next_completed);
  • and recycled again (vxge_hw_ring_rxd_free).

For alternative state transitions and more details please refer to the design doc.

Definition at line 1181 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_ring_rxd_next_completed ( struct __vxge_hw_ring ring,
void **  rxdh,
u8 t_code 
)

vxge_hw_ring_rxd_next_completed - Get the next completed descriptor. : Handle to the ring object used for receive : Descriptor handle. Returned by HW. : Transfer code, as per Titan User Guide, Receive Descriptor Format. Returned by HW.

Retrieve the next completed descriptor. HW uses ring callback (*vxge_hw_ring_callback_f) to notifiy driver of new completed descriptors. After that the driver can use vxge_hw_ring_rxd_next_completed to retrieve the rest completions (the very first completion is passed by HW via vxge_hw_ring_callback_f).

Implementation-wise, the driver is free to call vxge_hw_ring_rxd_next_completed either immediately from inside the ring callback, or in a deferred fashion and separate (from HW) context.

Non-zero means failure to fill-in receive buffer(s) of the descriptor. For instance, parity error detected during the data transfer. In this case Titan will complete the descriptor and indicate for the host that the received data is not to be used. For details please refer to Titan User Guide.

Returns: VXGE_HW_OK - success. VXGE_HW_INF_NO_MORE_COMPLETED_DESCRIPTORS - No completed descriptors are currently available for processing.

See also: vxge_hw_ring_callback_f{}, vxge_hw_fifo_rxd_next_completed(), enum vxge_hw_status{}.

Definition at line 1299 of file vxge-traffic.c.

void vxge_hw_ring_rxd_post ( struct __vxge_hw_ring ring,
void rxdh 
)

vxge_hw_ring_rxd_post - Post descriptor on the ring. : Handle to the ring object used for receive : Descriptor obtained via vxge_hw_ring_rxd_reserve().

Post descriptor on the ring. Prior to posting the descriptor should be filled in accordance with Host/Titan interface specification for a given service (LL, etc.).

Definition at line 1237 of file vxge-traffic.c.

void vxge_hw_ring_rxd_post_post ( struct __vxge_hw_ring ring,
void rxdh 
)

vxge_hw_ring_rxd_post_post - Process rxd after post. : Handle to the ring object used for receive : Descriptor handle.

Processes rxd after post

Definition at line 1214 of file vxge-traffic.c.

void vxge_hw_ring_rxd_post_post_wmb ( struct __vxge_hw_ring ring,
void rxdh 
)

vxge_hw_ring_rxd_post_post_wmb - Process rxd after post with memory barrier. : Handle to the ring object used for receive : Descriptor handle.

Processes rxd after post with memory barrier.

Definition at line 1260 of file vxge-traffic.c.

void vxge_hw_ring_rxd_pre_post ( struct __vxge_hw_ring ring,
void rxdh 
)

vxge_hw_ring_rxd_pre_post - Prepare rxd and post : Handle to the ring object used for receive : Descriptor handle.

This routine prepares a rxd and posts

Definition at line 1198 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_ring_rxd_reserve ( struct __vxge_hw_ring ring,
void **  rxdh 
)

vxge_hw_ring_rxd_reserve - Reserve ring descriptor. : Handle to the ring object used for receive : Reserved descriptor. On success HW fills this "out" parameter with a valid handle.

Reserve Rx descriptor for the subsequent filling-in driver and posting on the corresponding channel () via vxge_hw_ring_rxd_post().

Returns: VXGE_HW_OK - success. VXGE_HW_INF_OUT_OF_DESCRIPTORS - Currently no descriptors available.

Definition at line 1137 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_vpath_alarm_process ( struct __vxge_hw_vpath_handle vp,
u32  skip_alarms 
)

Definition at line 2222 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_vpath_bcast_enable ( struct __vxge_hw_vpath_handle vp)

Definition at line 2125 of file vxge-traffic.c.

void vxge_hw_vpath_dynamic_rti_ci_set ( struct __vxge_hw_ring ring)

Definition at line 243 of file vxge-traffic.c.

void vxge_hw_vpath_dynamic_rti_rtimer_set ( struct __vxge_hw_ring ring)

Definition at line 268 of file vxge-traffic.c.

void vxge_hw_vpath_dynamic_tti_rtimer_set ( struct __vxge_hw_fifo fifo)

Definition at line 252 of file vxge-traffic.c.

void vxge_hw_vpath_inta_mask_tx_rx ( struct __vxge_hw_vpath_handle vp)

vxge_hw_vpath_inta_mask_tx_rx - Mask Tx and Rx interrupts. : Virtual Path handle.

Mask Tx and Rx vpath interrupts.

See also: vxge_hw_vpath_inta_mask_tx_rx()

Definition at line 2360 of file vxge-traffic.c.

void vxge_hw_vpath_inta_unmask_tx_rx ( struct __vxge_hw_vpath_handle vp)

vxge_hw_vpath_inta_unmask_tx_rx - Unmask Tx and Rx interrupts. : Virtual Path handle.

Unmask Tx and Rx vpath interrupts.

See also: vxge_hw_vpath_inta_mask_tx_rx()

Definition at line 2398 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_vpath_intr_disable ( struct __vxge_hw_vpath_handle vp)

Definition at line 156 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_vpath_intr_enable ( struct __vxge_hw_vpath_handle vp)

Definition at line 30 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_vpath_mac_addr_add ( struct __vxge_hw_vpath_handle vp,
u8(macaddr [ETH_ALEN],
u8(macaddr_mask)  [ETH_ALEN],
enum vxge_hw_vpath_mac_addr_add_mode  duplicate_mode 
)

vxge_hw_vpath_mac_addr_add - Add the mac address entry for this vpath to MAC address table. : Vpath handle. : MAC address to be added for this vpath into the list : MAC address mask for macaddr : Duplicate MAC address add mode. Please see enum vxge_hw_vpath_mac_addr_add_mode{}

Adds the given mac address and mac address mask into the list for this vpath. see also: vxge_hw_vpath_mac_addr_delete, vxge_hw_vpath_mac_addr_get and vxge_hw_vpath_mac_addr_get_next

Definition at line 1751 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_vpath_mac_addr_delete ( struct __vxge_hw_vpath_handle vp,
u8(macaddr [ETH_ALEN],
u8(macaddr_mask)  [ETH_ALEN] 
)

vxge_hw_vpath_mac_addr_delete - Delete the mac address entry for this vpath to MAC address table. : Vpath handle. : MAC address to be added for this vpath into the list : MAC address mask for macaddr

Delete the given mac address and mac address mask into the list for this vpath. see also: vxge_hw_vpath_mac_addr_add, vxge_hw_vpath_mac_addr_get and vxge_hw_vpath_mac_addr_get_next

Definition at line 1919 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_vpath_mac_addr_get ( struct __vxge_hw_vpath_handle vp,
u8(macaddr [ETH_ALEN],
u8(macaddr_mask)  [ETH_ALEN] 
)

vxge_hw_vpath_mac_addr_get - Get the first mac address entry for this vpath from MAC address table. : Vpath handle. : First MAC address entry for this vpath in the list : MAC address mask for macaddr

Returns the first mac address and mac address mask in the list for this vpath. see also: vxge_hw_vpath_mac_addr_get_next

Definition at line 1814 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_vpath_mac_addr_get_next ( struct __vxge_hw_vpath_handle vp,
u8(macaddr [ETH_ALEN],
u8(macaddr_mask)  [ETH_ALEN] 
)

vxge_hw_vpath_mac_addr_get_next - Get the next mac address entry for this vpath from MAC address table. : Vpath handle. : Next MAC address entry for this vpath in the list : MAC address mask for macaddr

Returns the next mac address and mac address mask in the list for this vpath. see also: vxge_hw_vpath_mac_addr_get

Definition at line 1866 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_vpath_mcast_disable ( struct __vxge_hw_vpath_handle vp)

vxge_hw_vpath_mcast_disable - Disable multicast addresses. : Vpath handle.

Disable Titan-e multicast addresses. Returns: VXGE_HW_OK - success. VXGE_HW_ERR_INVALID_HANDLE - Invalid handle

Definition at line 2191 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_vpath_mcast_enable ( struct __vxge_hw_vpath_handle vp)

vxge_hw_vpath_mcast_enable - Enable multicast addresses. : Vpath handle.

Enable Titan-e multicast addresses. Returns: VXGE_HW_OK on success.

Definition at line 2157 of file vxge-traffic.c.

void vxge_hw_vpath_msix_clear ( struct __vxge_hw_vpath_handle vp,
int  msix_id 
)

vxge_hw_vpath_msix_clear - Clear MSIX Vector. : Virtual Path handle. : MSI ID

The function clears the msix interrupt for the given msix_id

Returns: 0, Otherwise, VXGE_HW_ERR_WRONG_IRQ if the msix index is out of range status. See also:

Definition at line 2317 of file vxge-traffic.c.

void vxge_hw_vpath_msix_mask ( struct __vxge_hw_vpath_handle vp,
int  msix_id 
)

vxge_hw_vpath_msix_mask - Mask MSIX Vector. : Virtual Path handle. : MSIX ID

The function masks the msix interrupt for the given msix_id

Returns: 0, Otherwise, VXGE_HW_ERR_WRONG_IRQ if the msix index is out of range status. See also:

Definition at line 2297 of file vxge-traffic.c.

void vxge_hw_vpath_msix_set ( struct __vxge_hw_vpath_handle vp,
int tim_msix_id,
int  alarm_msix_id 
)

vxge_hw_vpath_msix_set - Associate MSIX vectors with TIM interrupts and alrms : Virtual Path handle. : MSIX vectors associated with VXGE_HW_MAX_INTR_PER_VP number of interrupts(Can be repeated). If fifo or ring are not enabled the MSIX vector for that should be set to 0 : MSIX vector for alarm.

This API will associate a given MSIX vector numbers with the four TIM interrupts and alarm interrupt.

Definition at line 2251 of file vxge-traffic.c.

void vxge_hw_vpath_msix_unmask ( struct __vxge_hw_vpath_handle vp,
int  msix_id 
)

vxge_hw_vpath_msix_unmask - Unmask the MSIX Vector. : Virtual Path handle. : MSI ID

The function unmasks the msix interrupt for the given msix_id

Returns: 0, Otherwise, VXGE_HW_ERR_WRONG_IRQ if the msix index is out of range status. See also:

Definition at line 2344 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_vpath_poll_rx ( struct __vxge_hw_ring ring)

vxge_hw_vpath_poll_rx - Poll Rx Virtual Path for completed descriptors and process the same. : Handle to the ring object used for receive

The function polls the Rx for the completed descriptors and calls the driver via supplied completion callback.

Returns: VXGE_HW_OK, if the polling is completed successful. VXGE_HW_COMPLETIONS_REMAIN: There are still more completed descriptors available which are yet to be processed.

See also: vxge_hw_vpath_poll_rx()

Definition at line 2440 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_vpath_poll_tx ( struct __vxge_hw_fifo fifo,
struct sk_buff ***  skb_ptr,
int  nr_skb,
int more 
)

vxge_hw_vpath_poll_tx - Poll Tx for completed descriptors and process the same. : Handle to the fifo object used for non offload send

The function polls the Tx for the completed descriptors and calls the driver via supplied completion callback.

Returns: VXGE_HW_OK, if the polling is completed successful. VXGE_HW_COMPLETIONS_REMAIN: There are still more completed descriptors available which are yet to be processed.

Definition at line 2494 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_vpath_promisc_disable ( struct __vxge_hw_vpath_handle vp)

vxge_hw_vpath_promisc_disable - Disable promiscuous mode. : Vpath handle.

Disable promiscuous mode of Titan-e operation.

See also: vxge_hw_vpath_promisc_enable().

Definition at line 2091 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_vpath_promisc_enable ( struct __vxge_hw_vpath_handle vp)

vxge_hw_vpath_promisc_enable - Enable promiscuous mode. : Vpath handle.

Enable promiscuous mode of Titan-e operation.

See also: vxge_hw_vpath_promisc_disable().

Definition at line 2049 of file vxge-traffic.c.

void vxge_hw_vpath_tti_ci_set ( struct __vxge_hw_fifo fifo)

Definition at line 222 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_vpath_vid_add ( struct __vxge_hw_vpath_handle vp,
u64  vid 
)

vxge_hw_vpath_vid_add - Add the vlan id entry for this vpath to vlan id table. : Vpath handle. : vlan id to be added for this vpath into the list

Adds the given vlan id into the list for this vpath. see also: vxge_hw_vpath_vid_delete, vxge_hw_vpath_vid_get and vxge_hw_vpath_vid_get_next

Definition at line 1964 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_vpath_vid_delete ( struct __vxge_hw_vpath_handle vp,
u64  vid 
)

vxge_hw_vpath_vid_delete - Delete the vlan id entry for this vpath to vlan id table. : Vpath handle. : vlan id to be added for this vpath into the list

Adds the given vlan id into the list for this vpath. see also: vxge_hw_vpath_vid_add, vxge_hw_vpath_vid_get and vxge_hw_vpath_vid_get_next

Definition at line 2024 of file vxge-traffic.c.

enum vxge_hw_status vxge_hw_vpath_vid_get ( struct __vxge_hw_vpath_handle vp,
u64 vid 
)

vxge_hw_vpath_vid_get - Get the first vid entry for this vpath from vlan id table. : Vpath handle. : Buffer to return vlan id

Returns the first vlan id in the list for this vpath. see also: vxge_hw_vpath_vid_get_next

Definition at line 1992 of file vxge-traffic.c.