DPDK usage discussions
 help / color / mirror / Atom feed
From: Anupama Laxmi <anupamalaxmi4@gmail.com>
To: users@dpdk.org
Subject: [dpdk-users] To enable offloading DEV_TX_OFFLOAD_MULTI_SEGS per port and per queue
Date: Mon, 8 Apr 2019 07:18:40 +0530	[thread overview]
Message-ID: <CA+17DaVp43K3TBaaskC1cfe2QbNW5MYaFV5AAL=1HBPVAsPPKg@mail.gmail.com> (raw)

I would like to enable per port offloading to set TX offloading for
multiple segments using DEV_TX_OFFLOAD_MULTI_SEGS. UDP packets were getting
dropped with error Bad UDP length > IP payload length as seen in the
wireshark capture. This issue is seen after I upgraded to DPDK 18.08. Hence
I would like to set the offload DEV_TX_OFFLOAD_MULTI_SEGS per port to allow
segmenation of big packets.

I am getting the below error when I try to set the above offload.

Ethdev port_id=0 tx_queue_id=0, new added offloads 0x9f3e55 must be within
pre-queue offload capabilities 0x0 in rte_eth_tx_queue_setup()

Please let me know where I am going wrong and how do I set the offload
DEV_TX_OFFLOAD_MULTI_SEGS correctly.

static const struct rte_eth_txconf tx_conf = {
    .tx_thresh = {
        .pthresh = TX_PTHRESH,
        .hthresh = TX_HTHRESH,
        .wthresh = TX_WTHRESH,
    },
    .tx_free_thresh = 0,
    .tx_rs_thresh = 0,
};


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


struct rte_eth_txconf *tx_conf;
struct rte_eth_conf local_port_conf = port_conf;
if(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MULTI_SEGS)
        {

           local_port_conf.txmode.offloads |= DEV_TX_OFFLOAD_MULTI_SEGS;
        }
ret = rte_eth_dev_configure(port, nbqueue, nbqueue, &local_port_conf);
rte_eth_dev_info_get(port, &dev_info);
        tx_conf = &dev_info.default_txconf;
        tx_conf->offloads = local_port_conf.txmode.offloads;

        ret = rte_eth_tx_queue_setup(port, queue, RTE_TEST_TX_DESC_DEFAULT,
master_socket_id, &tx_conf);

             reply	other threads:[~2019-04-08  1:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-08  1:48 Anupama Laxmi [this message]
2019-04-08  6:58 ` Shyam Shrivastav
2019-04-09  3:30   ` Anupama Laxmi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+17DaVp43K3TBaaskC1cfe2QbNW5MYaFV5AAL=1HBPVAsPPKg@mail.gmail.com' \
    --to=anupamalaxmi4@gmail.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).