Rate This Document
Findability
Accuracy
Completeness
Readability

Adjusting the Size of Receive Buffer

Purpose

The rx_buff parameter controls the receive buffer size with four configurable options: 2 KB, 4 KB, 8 KB, or 16 KB. The value must be a power of 2 to ensure contiguous memory allocation.

The Hi1822 NIC defaults to a 2 KB rx_buff setting. When processing 64 KB aggregated packets, this buffer size triggers memory fragmentation due to the need for non-contiguous memory blocks. Increasing rx_buff to 8 KB minimizes the allocation requirements, thereby optimizing memory efficiency and boosting data transfer throughput.

Procedure

  1. Check the value of rx_buff. The default value is 2.
    1
    cat /sys/bus/pci/drivers/hinic/module/parameters/rx_buff
    
  2. Add the hinic.conf file to the /etc/modprobe.d/ directory and change the rx_buff value to 8.
    1
    options hinic rx_buff=8
    
  3. Remount the hinic driver for the configuration to take effect.
    1
    2
    rmmod hinic
    modprobe hinic
    
  4. Check whether the configuration is successful.
    1
    cat /sys/bus/pci/drivers/hinic/module/parameters/rx_buff
    

    If the parameter value is updated to 8, the configuration is successful.