Multi Channel DMA Intel® FPGA IP for PCI Express User Guide

ID 683821
Date 4/20/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

8.4.2.1. Device Management

static const struct net_device_ops ifc_mcdma_netdev_ops = {                     
        .ndo_open               = ifc_mcdma_netdev_open,                        
        .ndo_stop               = ifc_mcdma_netdev_close,                       
        .ndo_start_xmit         = ifc_mcdma_netdev_xmit,                        
#ifdef IFC_SELECT_QUEUE_ALGO                                                    
        .ndo_select_queue       = ifc_mcdma_select_queue,                       
#endif                                                                          
#ifdef RHEL_RELEASE_CODE                                                        
        .ndo_change_mtu_rh74    = ifc_mcdma_change_mtu,                         
#else                                                                           
        .ndo_change_mtu         = ifc_mcdma_change_mtu,                         
#endif                                                                          
        .ndo_validate_addr      = eth_validate_addr,                            
        .ndo_set_mac_address    = eth_mac_addr,                                 
        .ndo_get_stats          = ifc_mcdma_netdev_get_stats,                   
        .ndo_do_ioctl           = ifc_mcdma_netdev_ioctl,                       
}

ifc_mcdma_netdev driver supports the ethtool and ifconfig and ip utilities to configure and manage the device.

IP Reset

IP reset is performed through the sysfs attribute file mcdma_ipreset.

Following command performs the IP reset:
echo 1 > /sys/bus/pci/devices/<bdf>/mcdma_ipreset

ifconfig support

By using ifconfig, the driver supports bring-down and bring-up of the device. To supportthese operations, the driver overrides ndo_open and ndo_stop operations of the device.

Bring-down of the device

When you bring down the device by using ifconfig command, the kernel changes the state of the device to DOWN state and executes the registered call back. As a result of the callback functionality, the driver stops the TX queue, disables the interrupts and releases the acquired channels and all the internal resources allocated to the device.

Command for bring-down of the device example:
ifconfig ifc_mcdma0 down

Bring-up of the device

When you bring up the device by using ifconfig command, the kernel changes the state of the device to “UP” state and executes the registered call back. As a result of the callback functionality, the driver starts the TX queue, acquires and enables channels and corresponding interrupts.

Command for bring-up of the device example:
ifconfig ifc_mcdma0 up