Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
ixgbe_fcoe.c File Reference
#include "ixgbe.h"
#include <linux/if_ether.h>
#include <linux/gfp.h>
#include <linux/if_vlan.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/fc/fc_fs.h>
#include <scsi/fc/fc_fcoe.h>
#include <scsi/libfc.h>
#include <scsi/libfcoe.h>

Go to the source code of this file.

Functions

int ixgbe_fcoe_ddp_put (struct net_device *netdev, u16 xid)
 
int ixgbe_fcoe_ddp_get (struct net_device *netdev, u16 xid, struct scatterlist *sgl, unsigned int sgc)
 
int ixgbe_fcoe_ddp_target (struct net_device *netdev, u16 xid, struct scatterlist *sgl, unsigned int sgc)
 
int ixgbe_fcoe_ddp (struct ixgbe_adapter *adapter, union ixgbe_adv_rx_desc *rx_desc, struct sk_buff *skb)
 
int ixgbe_fso (struct ixgbe_ring *tx_ring, struct ixgbe_tx_buffer *first, u8 *hdr_len)
 
void ixgbe_configure_fcoe (struct ixgbe_adapter *adapter)
 
void ixgbe_free_fcoe_ddp_resources (struct ixgbe_adapter *adapter)
 
int ixgbe_setup_fcoe_ddp_resources (struct ixgbe_adapter *adapter)
 
int ixgbe_fcoe_enable (struct net_device *netdev)
 
int ixgbe_fcoe_disable (struct net_device *netdev)
 
int ixgbe_fcoe_get_wwn (struct net_device *netdev, u64 *wwn, int type)
 
int ixgbe_fcoe_get_hbainfo (struct net_device *netdev, struct netdev_fcoe_hbainfo *info)
 
u8 ixgbe_fcoe_get_tc (struct ixgbe_adapter *adapter)
 

Function Documentation

void ixgbe_configure_fcoe ( struct ixgbe_adapter adapter)

ixgbe_configure_fcoe - configures registers for fcoe at start : ptr to ixgbe adapter

This sets up FCoE related registers

Returns : none

Definition at line 612 of file ixgbe_fcoe.c.

int ixgbe_fcoe_ddp ( struct ixgbe_adapter adapter,
union ixgbe_adv_rx_desc rx_desc,
struct sk_buff skb 
)

ixgbe_fcoe_ddp - check ddp status and mark it done : ixgbe adapter : advanced rx descriptor : the skb holding the received data

This checks ddp status.

Returns : < 0 indicates an error or not a FCiE ddp, 0 indicates not passing the skb to ULD, > 0 indicates is the length of data being ddped.

Definition at line 363 of file ixgbe_fcoe.c.

int ixgbe_fcoe_ddp_get ( struct net_device netdev,
u16  xid,
struct scatterlist sgl,
unsigned int  sgc 
)

ixgbe_fcoe_ddp_get - called to set up ddp context in initiator mode : the corresponding net_device : the exchange id requesting ddp : the scatter-gather list for this request : the number of scatter-gather items

This is the implementation of net_device_ops.ndo_fcoe_ddp_setup and is expected to be called from ULD, e.g., FCP layer of libfc to set up ddp for the corresponding xid of the given sglist for the corresponding I/O.

Returns : 1 for success and 0 for no ddp

Definition at line 324 of file ixgbe_fcoe.c.

int ixgbe_fcoe_ddp_put ( struct net_device netdev,
u16  xid 
)

ixgbe_fcoe_ddp_put - free the ddp context for a given xid : the corresponding net_device : the xid that corresponding ddp will be freed

This is the implementation of net_device_ops.ndo_fcoe_ddp_done and it is expected to be called by ULD, i.e., FCP layer of libfc to release the corresponding ddp context when the I/O is done.

Returns : data length already ddp-ed in bytes

Definition at line 67 of file ixgbe_fcoe.c.

int ixgbe_fcoe_ddp_target ( struct net_device netdev,
u16  xid,
struct scatterlist sgl,
unsigned int  sgc 
)

ixgbe_fcoe_ddp_target - called to set up ddp context in target mode : the corresponding net_device : the exchange id requesting ddp : the scatter-gather list for this request : the number of scatter-gather items

This is the implementation of net_device_ops.ndo_fcoe_ddp_target and is expected to be called from ULD, e.g., FCP layer of libfc to set up ddp for the corresponding xid of the given sglist for the corresponding I/O. The DDP in target mode is a write I/O request from the initiator.

Returns : 1 for success and 0 for no ddp

Definition at line 345 of file ixgbe_fcoe.c.

int ixgbe_fcoe_disable ( struct net_device netdev)

ixgbe_fcoe_disable - turn off FCoE offload feature : the corresponding netdev

Turns off FCoE offload feature in 82599.

Returns : 0 indicates success or -EINVAL on failure

Definition at line 832 of file ixgbe_fcoe.c.

int ixgbe_fcoe_enable ( struct net_device netdev)

ixgbe_fcoe_enable - turn on FCoE offload feature : the corresponding netdev

Turns on FCoE offload feature in 82599.

Returns : 0 indicates success or -EINVAL on failure

Definition at line 789 of file ixgbe_fcoe.c.

int ixgbe_fcoe_get_hbainfo ( struct net_device netdev,
struct netdev_fcoe_hbainfo *  info 
)

ixgbe_fcoe_get_hbainfo - get FCoE HBA information : ixgbe adapter : HBA information

Returns ixgbe HBA information

Returns : 0 on success

Definition at line 918 of file ixgbe_fcoe.c.

u8 ixgbe_fcoe_get_tc ( struct ixgbe_adapter adapter)

ixgbe_fcoe_get_tc - get the current TC that fcoe is mapped to - pointer to the device adapter structure

Return : TC that FCoE is mapped to

Definition at line 998 of file ixgbe_fcoe.c.

int ixgbe_fcoe_get_wwn ( struct net_device netdev,
u64 wwn,
int  type 
)

ixgbe_fcoe_get_wwn - get world wide name for the node or the port : ixgbe adapter : the world wide name : the type of world wide name

Returns the node or port world wide name if both the prefix and the san mac address are valid, then the wwn is formed based on the NAA-2 for IEEE Extended name identifier (ref. to T10 FC-LS Spec., Sec. 15.3).

Returns : 0 on success

Definition at line 877 of file ixgbe_fcoe.c.

void ixgbe_free_fcoe_ddp_resources ( struct ixgbe_adapter adapter)

ixgbe_free_fcoe_ddp_resources - release all fcoe ddp context resources : ixgbe adapter

Cleans up outstanding ddp context resources

Returns : none

Definition at line 673 of file ixgbe_fcoe.c.

int ixgbe_fso ( struct ixgbe_ring tx_ring,
struct ixgbe_tx_buffer first,
u8 hdr_len 
)

ixgbe_fso - ixgbe FCoE Sequence Offload (FSO) : tx desc ring : first tx_buffer structure containing skb, tx_flags, and protocol : hdr_len to be returned

This sets up large send offload for FCoE

Returns : 0 indicates success, < 0 for error

Definition at line 463 of file ixgbe_fcoe.c.

int ixgbe_setup_fcoe_ddp_resources ( struct ixgbe_adapter adapter)

ixgbe_setup_fcoe_ddp_resources - setup all fcoe ddp context resources : ixgbe adapter

Sets up ddp context resouces

Returns : 0 indicates success or -EINVAL on failure

Definition at line 706 of file ixgbe_fcoe.c.