Print Download PDF Send Feedback

Previous

Next

Setting Affinities for Falcon Acceleration Cards Ports

To set affinities for Falcon Acceleration Cards ports, you use the standard Linux SMP IRQ Affinity mechanism.

On the Host appliance, you configure the applicable CPU Bitmasks in the /proc/irq/<IRQ_Number_of_Card_Port>/smp_affinity files for the IRQ numbers of the applicable Falcon Acceleration Cards ports.

The /proc/irq/<IRQ_Number_of_Card_Port>/smp_affinity files specify, which target CPU cores are permitted for a given IRQ source. These files hold bitmasks of allowed CPU cores.

Procedure:

  1. Connect to the command line on the Host appliance.
  2. Log in to Expert mode.
  3. Get the list of slot numbers for the Falcon Acceleration Cards:

    fwaccel stat

  4. Find the IRQ number for the Falcon Acceleration Card port, which you wish to affine to a specific CPU core:

    cat /proc/interrupts | grep msix | grep np<Slot#>

    Example for port np3:

    [Expert@FW:0]# cat /proc/interrupts | grep msix | grep np3

     

    51: 9653025 0 0 0 0 6672298 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI-X bcmnet-np3-msix-2

     

    [Expert@FW:0]#

    Notes:

    • 51 - IRQ number of this Falcon Acceleration Card port
    • np3 - Falcon Acceleration Card port identifier
    • Compare with the output of the ifconfig eth<Slot#>-01 command
  5. Find the CPU Bitmask in HEX Format of the CPU core, to which you wish to affine the specific Falcon Acceleration Card port:

    Note - This table addresses 24 CPU cores.

    CPU core

    Bitmask in BIN Format

    Bitmask in HEX Format

    CPU 0

    00000001

    1

    CPU 1

    00000010

    2

    CPU 2

    00000100

    4

    CPU 3

    00001000

    8

    CPU 4

    00010000

    10

    CPU 5

    00100000

    20

    CPU 6

    01000000

    40

    CPU 7

    10000000

    80

    CPU 8

    01100100

    100

    CPU 9

    11001000

    200

    CPU 10

    000110010000

    400

    CPU 11

    001100100000

    800

    CPU 12

    001111101000

    1000

    CPU 13

    001111101000

    2000

    CPU 14

    111110100000

    4000

    CPU 15

    0001111101000000

    8000

    CPU 16

    0010011100010000

    10000

    CPU 17

    0100111000100000

    20000

    CPU 18

    1001110001000000

    40000

    CPU 19

    000000010011100010000000

    80000

    CPU 20

    000000011000011010100000

    100000

    CPU 21

    000000110000110101000000

    200000

    CPU 22

    000001100001101010000000

    400000

    CPU 23

    000011000011010100000000

    800000

  6. Write the applicable CPU Bitmask in HEX Format in the /proc/irq/<IRQ_Number_of_Card_Port>/smp_affinity file:

    echo <Hex_Bitmask> > /proc/irq/<IRQ_Number_of_Card_Port>/smp_affinity

    Examples:

    • Affinity of card port with IRQ 51 to CPU 0:

      echo 1 > /proc/irq/51/smp_affinity

    • Affinity of a card port with IRQ 59 to CPU 1:

      echo 2 > /proc/irq/59/smp_affinity

    • Affinity of card port with IRQ 234 to CPU 7:

      echo 80 > /proc/irq/234/smp_affinity

  7. To make this configuration survive reboot, you need to add all these echo commands at the bottom of the /etc/rc.d/rc.local shell script:
    1. Create a backup copy of this shell script:

      cp -v /etc/rc.d/rc.local{,_BKP}

    2. Edit this shell script:

      vi /etc/rc.d/rc.local