logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

devlink-sb - devlink shared buffer configuration

Author

       Jiri Pirko <jiri@mellanox.com>

iproute2                                           14 Apr 2016                                     DEVLINK-SB(8)

Description

devlinksbshow-displayavailablesharedbuffersandtheirattributesDEV - specifies the devlink device to show shared buffers.  If this argument is omitted all shared
       buffers of all devices are listed.

       SB_INDEX - specifies the shared buffer.  If this argument is omitted shared buffer with index 0 is
       selected.  Behaviour of this argument it the same for every command.

   devlinksbpoolshow-displayavailablepoolsandtheirattributesDEV - specifies the devlink device to show pools.  If this argument is omitted all pools of all devices
       are listed.

       Display available pools listing their type,size,thtype and cell_size.cell_size is the allocation
       granularity of memory within the shared buffer. Drivers may round up, round down or reject size passed to
       the set command if it is not multiple of cell_size.devlinksbpoolset-setattributesofpoolDEV - specifies the devlink device to set pool.

       sizePOOL_SIZE
              size of the pool in Bytes.

       thtype { static | dynamic }
              pool threshold type.

              static - Threshold values for the pool will be passed in Bytes.

              dynamic  -  Threshold  values  ("to_alpha")  for  the pool will be used to compute alpha parameter
              according to formula:
                              alpha = 2 ^ (to_alpha - 10)

                        The range of the passed value is between  0  to  20.  The  computed  alpha  is  used  to
                        determine the maximum usage of the flow:
                              max_usage = alpha / (1 + alpha) * Free_Buffer

   devlinksbportpoolshow-displayport-poolcombinationsandthresholdforeachDEV/PORT_INDEX - specifies the devlink port.

       poolPOOL_INDEX
              pool index.

   devlinksbportpoolset-setport-poolthresholdDEV/PORT_INDEX - specifies the devlink port.

       poolPOOL_INDEX
              pool index.

       thTHRESHOLD
              threshold  value.  Type  of the value is either Bytes or "to_alpha", depends on thtype set for the
              pool.

   devlinksbtcbindshow-displayport-TCtopoolbindingsandthresholdforeachDEV/PORT_INDEX - specifies the devlink port.

       tcTC_INDEX
              index of either ingress or egress TC, usually in range 0 to 8 (depends on device).

       type { ingress | egress }
              TC type.

   devlinksbtcbindset-setport-TCtopoolbindingwithspecifiedthresholdDEV/PORT_INDEX - specifies the devlink port.

       tcTC_INDEX
              index of either ingress or egress TC, usually in range 0 to 8 (depends on device).

       type { ingress | egress }
              TC type.

       poolPOOL_INDEX
              index of pool to bind this to.

       thTHRESHOLD
              threshold value. Type of the value is either Bytes or "to_alpha", depends on thtype  set  for  the
              pool.

   devlinksboccupancyshow-displaysharedbufferoccupancyvaluesfordeviceorport
       This  command  is  used  to  browse shared buffer occupancy values. Values are showed for every port-pool
       combination as well as for all port-TC combinations (with pool this port-TC is bound to). Format of value
       is:
                       current_value/max_value
       Note that before showing values, one has to issue occupancysnapshot command first.

       DEV - specifies the devlink device to show occupancy values for.

       DEV/PORT_INDEX - specifies the devlink port to show occupancy values for.

   devlinksboccupancysnapshot-takeoccupancysnapshotofsharedbufferfordevice
       This command is used to take a snapshot of shared buffer occupancy values. After that, the values can  be
       showed using occupancyshow command.

       DEV - specifies the devlink device to take occupancy snapshot on.

   devlinksboccupancyclearmax-clearoccupancywatermarksofsharedbufferfordevice
       This  command  is  used  to  reset  maximal  occupancy  values reached for whole device. Note that before
       browsing reset values, one has to issue occupancysnapshot command.

       DEV - specifies the devlink device to clear occupancy watermarks on.

Examples

       devlink sb show
           List available share buffers.

       devlink sb pool show
           List available pools and their config.

       devlink sb port pool show pci/0000:03:00.0/1 pool 0
           Show port-pool setup for specified port and pool.

       sudo devlink sb port pool set pci/0000:03:00.0/1 pool 0 th 15
           Change threshold for port specified port and pool.

       devlink sb tc bind show pci/0000:03:00.0/1 tc 0 type ingress
           Show pool binding and threshold for specified port and TC.

       sudo devlink sb tc bind set pci/0000:03:00.0/1 tc 0 type ingress pool 0 th 9
           Set pool binding and threshold for specified port and TC.

       sudo devlink sb occupancy snapshot pci/0000:03:00.0
           Make a snapshot of occupancy of shared buffer for specified devlink device.

       devlink sb occupancy show pci/0000:03:00.0/1
           Show occupancy for specified port from the snapshot.

       sudo devlink sb occupancy clearmax pci/0000:03:00.0
           Clear watermarks for shared buffer of specified devlink device.

Name

       devlink-sb - devlink shared buffer configuration

See Also

devlink(8), devlink-dev(8), devlink-port(8), devlink-monitor(8),

Synopsis

devlink [ OPTIONS ] sb  { COMMAND | help }

       OPTIONS := { -V[ersion] | -n[no-nice-names] }

       devlinksbshow [ DEV [ sbSB_INDEX ] ]

       devlinksbpoolshow [ DEV [ sbSB_INDEX ]
               poolPOOL_INDEX ]

       devlinksbpoolsetDEV [ sbSB_INDEX ]
               poolPOOL_INDEXsizePOOL_SIZEthtype { static | dynamic }

       devlinksbportpoolshow [ DEV/PORT_INDEX [ sbSB_INDEX ]
               poolPOOL_INDEX ]

       devlinksbportpoolsetDEV/PORT_INDEX [ sbSB_INDEX ]
               poolPOOL_INDEXthTHRESHOLDdevlinksbtcbindshow [ DEV/PORT_INDEX [ sbSB_INDEX ]
               tcTC_INDEXtype { ingress | egress } ]

       devlinksbtcbindsetDEV/PORT_INDEX [ sbSB_INDEX ]
               tcTC_INDEXtype { ingress | egress }
               poolPOOL_INDEXthTHRESHOLDdevlinksboccupancyshow { DEV | DEV/PORT_INDEX } [ sbSB_INDEX ]

       devlinksboccupancysnapshotDEV [ sbSB_INDEX ]

       devlinksboccupancyclearmaxDEV [ sbSB_INDEX ]

       devlinksbhelp

See Also