dpdkmellanox

How to resolve Scatter offload is not configured Error on Jumbo Frame testing in Mellanox


How to resolve scatter offload configuration error on testing Jumboframes in Bluefield Mellanox 2? DPDK Version - 20.11.1

Error details:

Initializing rx queues on lcore 1 ... rxq=0,0,0 mlx5_pci: port 0 Rx queue 0: Scatter offload is not configured )
mlx5_pci: port 0 unable to allocate queue index 0
EAL: Error - exiting with code: 1
  Cause: rte_eth_rx_queue_setup: err=-12,port=0*

./l3fwd-acl -l 1,2 -n 4  -- -p 0x3 --config="(0,0,1),(1,0,2)" --rule_ipv4="/root/rule_ipv4.db" --rule_ipv6="/root/rule_ipv6.db" --eth-dest=0,01:00:00:00:00:00 --enable-jumbo --max-pkt-len=8000

Edited the l3fwd-acl example for enabling jumboframe testing

static struct rte_eth_conf port_conf = {
        .rxmode = {
                .mq_mode        = ETH_MQ_RX_RSS,
                .max_rx_pkt_len = 9000,
                .split_hdr_size = 0,
                .offloads = DEV_RX_OFFLOAD_CHECKSUM,
        },
        .rx_adv_conf = {
                .rss_conf = {
                        .rss_key = NULL,
                        .rss_hf = ETH_RSS_IP | ETH_RSS_UDP |
                                ETH_RSS_TCP | ETH_RSS_SCTP,
                },
        },
        .txmode = {
                .mq_mode = ETH_MQ_TX_NONE,
                .offloads = (DEV_TX_OFFLOAD_CHECKSUM|DEV_TX_OFFLOAD_MULTI_SEGS),

        },
};

if (!strncmp(lgopts[option_index].name,
                                        OPTION_ENBJMO, sizeof(OPTION_ENBJMO))) {
                                struct option lenopts = {
                                        "max-pkt-len",
                                        required_argument,
                                        0,
                                        0
                                };

                                printf("jumbo frame is enabled\n");

                                port_conf.rxmode.offloads |=
                                                DEV_RX_OFFLOAD_JUMBO_FRAME;
                                port_conf.txmode.offloads |=
                                                DEV_TX_OFFLOAD_MULTI_SEGS;

 /*
                                 * if no max-pkt-len set, then use the
                                 * default value RTE_ETHER_MAX_LEN
                                 */
                                if (0 == getopt_long(argc, argvopt, "",
                                                &lenopts, &option_index)) {
                                        ret = parse_max_pkt_len(optarg);
                                        if ((ret < 64) ||
                                                (ret > MAX_JUMBO_PKT_LEN)) {
                                                printf("invalid packet "
                                                        "length\n");
                                                print_usage(prgname);
                                                return -1;
                                        }
                                        port_conf.rxmode.max_rx_pkt_len = ret;
                                }
                                printf("set jumbo frame max packet length "
                                        "to %u\n",
                                        (unsigned int)
                                        port_conf.rxmode.max_rx_pkt_len);
                        }

Solution

  • Resolved by changing rx mode offload to DEV_RX_OFFLOAD_SCATTER for receiving segmented mbufs and RX and Tx descriptor value to 4096