HowTo manage Mellanox Linux Driver modules and RPMs

Version 4

    This post shows various of commands to manage the Linux driver modules and RPMs.

    This post is basic and meant for beginners.

     

    References

     

    Note: in different OS distributions the output may be different.

     

    Kernel Module management

    Use the following commands:

    • lsmod
    • modprobe
    • modinfo

     

    For example:

     

    lsmod

     

    # lsmod | grep ib

    ib_ucm                 22546  0

    ib_ipoib              136649  0

    ib_uverbs              66467  2 ib_ucm,rdma_ucm

    ib_umad                22221  0

    mlx5_ib               142352  0

    mlx5_core             108415  1 mlx5_ib

    mlx4_ib               200149  0

    mlx4_core             336659  2 mlx4_en,mlx4_ib

    ib_iser                52192  0

    rdma_cm                44355  2 ib_iser,rdma_ucm

    ib_cm                  48505  3 rdma_cm,ib_ucm,ib_ipoib

    ib_sa                  39729  5 rdma_cm,ib_cm,mlx4_ib,rdma_ucm,ib_ipoib

    ib_mad                 51544  4 ib_cm,ib_sa,mlx4_ib,ib_umad

    ib_core               130594  13 rdma_cm,ib_cm,ib_sa,iw_cm,mlx4_ib,mlx5_ib,ib_mad,ib_ucm,ib_iser,ib_umad,ib_uverbs,rdma_ucm,ib_ipoib

    ib_addr                18737  3 rdma_cm,ib_core,ib_uverbs

    compat                 15936  18 rdma_cm,ib_cm,ib_sa,iw_cm,mlx4_en,mlx4_ib,mlx5_ib,ib_mad,ib_ucm,ib_addr,ib_core,ib_iser,ib_umad,ib_uverbs,mlx4_core,mlx5_core,rdma_ucm,ib_ipoib

    libiscsi               57278  1 ib_iser

    scsi_transport_iscsi    99754  3 ib_iser,libiscsi

    libahci                32009  1 ahci

    libata                219478  2 ahci,libahci

     

    # lsmod | grep _en

    mlx4_en               137100  0

    vxlan                  37584  1 mlx4_en

    mlx4_core             336659  2 mlx4_en,mlx4_ib

    compat                 15936  18 rdma_cm,ib_cm,ib_sa,iw_cm,mlx4_en,mlx4_ib,mlx5_ib,ib_mad,ib_ucm,ib_addr,ib_core,ib_iser,ib_umad,ib_uverbs,mlx4_core,mlx5_core,rdma_ucm,ib_ipoib

    ptp                    18933  2 e1000e,mlx4_en

     

    # lsmod | grep rdma

    rdma_ucm               22410  0

    ib_uverbs              66467  2 ib_ucm,rdma_ucm

    rdma_cm                44355  2 ib_iser,rdma_ucm

    iw_cm                  18547  1 rdma_cm

    ib_cm                  48505  3 rdma_cm,ib_ucm,ib_ipoib

    ib_sa                  39729  5 rdma_cm,ib_cm,mlx4_ib,rdma_ucm,ib_ipoib

    ib_core               130594  13 rdma_cm,ib_cm,ib_sa,iw_cm,mlx4_ib,mlx5_ib,ib_mad,ib_ucm,ib_iser,ib_umad,ib_uverbs,rdma_ucm,ib_ipoib

    ib_addr                18737  3 rdma_cm,ib_core,ib_uverbs

    compat                 15936  18 rdma_cm,ib_cm,ib_sa,iw_cm,mlx4_en,mlx4_ib,mlx5_ib,ib_mad,ib_ucm,ib_addr,ib_core,ib_iser,ib_umad,ib_uverbs,mlx4_core,mlx5_core,rdma_ucm,ib_ipoib

     

    modinfo

    # modinfo mlx4_en

    filename:       /lib/modules/3.10.0-123.el7.x86_64/extra/mlnx-ofa_kernel/drivers/net/ethernet/mellanox/mlx4/mlx4_en.ko

    version:        2.4-1.0.4 (Mar  8 2015)

    license:        Dual BSD/GPL

    description:    Mellanox ConnectX HCA Ethernet driver

    author:         Liran Liss, Yevgeny Petrilin

    srcversion:     8E1CD57B955BEC04E92C0A6

    depends:        mlx4_core,compat,ptp,vxlan

    vermagic:       3.10.0-123.el7.x86_64 SMP mod_unload modversions

    signer:         Mellanox Technologies signing key

    sig_key:        61:FE:B0:74:FC:72:92:F9:58:41:93:86:FF:DD:9D:5C:A9:99:E4:03

    sig_hashalgo:   sha256

    parm:           udp_rss:Enable RSS for incoming UDP traffic (uint)

    parm:           pfctx:Priority based Flow Control policy on TX[7:0]. Per priority bit mask (uint)

    parm:           pfcrx:Priority based Flow Control policy on RX[7:0]. Per priority bit mask (uint)

    parm:           inline_thold:Threshold for using inline data (range: 17-104, default: 104) (uint)

     

    modprobe

     

    1. To Load a module, run:  modprobe <module-name>

    # modprobe xprtrdma

    2. To remove a module run: modprobe -r <module-name>

    # modprobe -r xprtrdma

    3. Add a module with parameters:

    # modprobe <module> <param1=value> <param2=value> ....

     

     

     

    RPM Management

    1. Quary RPMs

    # rpm -qa | grep srp

    perl-srpm-macros-1-8.el7.noarch

    kmod-srp-1.4-OFED.2.4.1.0.4.1.g13136df.rhel7u0.x86_64

    srptools-1.0.1-OFED.2.4.40.g68b353c.x86_64

     

    2. To install RPMs use rpm -ivh <RPM link>

    # rpm -ivh srptools-1.0.1-OFED.2.4.40.g68b353c.x86_64

     

    3. To remove RPM use rpm -e <package>

    # rpm –e srptools-1.0.1-OFED.2.4.40.g68b353c.x86_64

    See here for more RPM command info - Linux rpm cheat sheet.