[dpdk-users] DPDK 2.2 MLX4: problem with number of TX/RX queues

Vincent Li vincent.mc.li at gmail.com
Thu Feb 11 23:57:22 CET 2016


On Thu, Feb 11, 2016 at 1:36 PM, Harold Demure
<harold.demure87 at gmail.com> wrote:
> Hello Vincent,
>   Thank you for your reply. I followed the same reasoning as you did,
> looking at the source code earlier today.
>
> Can you send me a link that explains how to change RX for my NIC?
> I have been looking around for that, and also performed the steps in the
> DPDK official guide for MLX4, but apparently nothing changed (at least, the
> error was still there).
>

I am DPDK newbie too and no MLX4 nic to play with, I think you need to
find out how to enable RSS for MLX4

librte_pmd_mlx4/Makefile has some clue about RSS:

mlx4_autoconf.h: $(RTE_SDK)/scripts/auto-config-h.sh
        $Q $(RM) -f -- '$@'
        $Q sh -- '$<' '$@' \
                RSS_SUPPORT \
                infiniband/verbs.h \
                enum IBV_EXP_DEVICE_UD_RSS $(AUTOCONF_OUTPUT)

maybe you can find the mlx4_autoconf.h and see if you have RSS_SUPPORT in it?

librte_pmd_mlx4/mlx4.c has:

#ifdef RSS_SUPPORT
                if (ibv_exp_query_device(ctx, &exp_device_attr)) {
                        INFO("experimental ibv_exp_query_device");
                        goto port_error;
                }
                if ((exp_device_attr.exp_device_cap_flags &
                     IBV_EXP_DEVICE_QPG) &&
                    (exp_device_attr.exp_device_cap_flags &
                     IBV_EXP_DEVICE_UD_RSS) &&
                    (exp_device_attr.comp_mask &
                     IBV_EXP_DEVICE_ATTR_RSS_TBL_SZ) &&
                    (exp_device_attr.max_rss_tbl_sz > 0)) {
                        priv->hw_qpg = 1;
                        priv->hw_rss = 1;
//<======================================
                        priv->max_rss_tbl_sz = exp_device_attr.max_rss_tbl_sz;
                } else {
                        priv->hw_qpg = 0;
                        priv->hw_rss = 0;
                        priv->max_rss_tbl_sz = 0;
                }
                priv->hw_tss = !!(exp_device_attr.exp_device_cap_flags &
                                  IBV_EXP_DEVICE_UD_TSS);
                DEBUG("device flags: %s%s%s",
                      (priv->hw_qpg ? "IBV_DEVICE_QPG " : ""),
                      (priv->hw_tss ? "IBV_DEVICE_TSS " : ""),
                      (priv->hw_rss ? "IBV_DEVICE_RSS " : ""));
                if (priv->hw_rss)
                        DEBUG("maximum RSS indirection table size: %u",
                              exp_device_attr.max_rss_tbl_sz);
#endif /* RSS_SUPPORT */

make sure you  meet MLX4 library dependencies that has
ibv_exp_query_device to query mlx4 properly to make sure priv->hw_rss
= 1 ?

after you enabled RSS, then figure out how to enable multiple RX
queues or maybe it will be enabled automatically.

or you can ask MLX4 community


More information about the users mailing list