* [dpdk-users] To enable offloading DEV_TX_OFFLOAD_MULTI_SEGS per port and per queue
@ 2019-04-08 1:48 Anupama Laxmi
2019-04-08 6:58 ` Shyam Shrivastav
0 siblings, 1 reply; 3+ messages in thread
From: Anupama Laxmi @ 2019-04-08 1:48 UTC (permalink / raw)
To: users
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);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-users] To enable offloading DEV_TX_OFFLOAD_MULTI_SEGS per port and per queue
2019-04-08 1:48 [dpdk-users] To enable offloading DEV_TX_OFFLOAD_MULTI_SEGS per port and per queue Anupama Laxmi
@ 2019-04-08 6:58 ` Shyam Shrivastav
2019-04-09 3:30 ` Anupama Laxmi
0 siblings, 1 reply; 3+ messages in thread
From: Shyam Shrivastav @ 2019-04-08 6:58 UTC (permalink / raw)
To: Anupama Laxmi; +Cc: users
The particular offload might be pure per port rather than per queue, anyway
you are enabling it at port level so no need to enable per queue.
Documentation is available at
http://doc.dpdk.org/guides/prog_guide/poll_mode_drv.html , some relevant
excerpt
The dev_info->[rt]x_queue_offload_capa returned from rte_eth_dev_info_get()
includes all per-queue offloading capabilities. The
dev_info->[rt]x_offload_capa returned from rte_eth_dev_info_get() includes
all pure per-port and per-queue offloading capabilities. Supported offloads
can be either per-port or per-queue.
On Mon, Apr 8, 2019 at 7:18 AM Anupama Laxmi <anupamalaxmi4@gmail.com>
wrote:
> 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);
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-users] To enable offloading DEV_TX_OFFLOAD_MULTI_SEGS per port and per queue
2019-04-08 6:58 ` Shyam Shrivastav
@ 2019-04-09 3:30 ` Anupama Laxmi
0 siblings, 0 replies; 3+ messages in thread
From: Anupama Laxmi @ 2019-04-09 3:30 UTC (permalink / raw)
To: Shyam Shrivastav; +Cc: users
Hi Shrivastav,
Thanks.I suppose setting only
DEV_TX_OFFLOAD_MULTI_SEGS offload is required for
IP fragmentation to taken into effect?Please confirm.
One more query:
I am attaching the pcap here which shows BAD UDP payload length( 736)
greater than IP payload length (728).
UDP payload length 736 is less than MTU (1500) so why I am getting this
error.
Whether this tx offload setting
DEV_TX_OFFLOAD_MULTI_SEGS will really help solve this packet transmission issue.
Only if the packet length > MTU then only I suppose packet would be
fragmented based on tx offload setting
DEV_TX_OFFLOAD_MULTI_SEGS.
Best Regards,
Suchetha
On Mon, Apr 8, 2019 at 12:28 PM Shyam Shrivastav <shrivastav.shyam@gmail.com>
wrote:
>
> The particular offload might be pure per port rather than per queue,
> anyway you are enabling it at port level so no need to enable per queue.
>
> Documentation is available at
> http://doc.dpdk.org/guides/prog_guide/poll_mode_drv.html , some relevant
> excerpt
>
> The dev_info->[rt]x_queue_offload_capa returned from
> rte_eth_dev_info_get() includes all per-queue offloading capabilities.
> The dev_info->[rt]x_offload_capa returned from rte_eth_dev_info_get()
> includes all pure per-port and per-queue offloading capabilities. Supported
> offloads can be either per-port or per-queue.
>
>
>
> On Mon, Apr 8, 2019 at 7:18 AM Anupama Laxmi <anupamalaxmi4@gmail.com>
> wrote:
>
>> 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);
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bad_udp_length.png
Type: image/png
Size: 56015 bytes
Desc: not available
URL: <http://mails.dpdk.org/archives/users/attachments/20190409/9d6c4b1b/attachment.png>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-09 3:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-08 1:48 [dpdk-users] To enable offloading DEV_TX_OFFLOAD_MULTI_SEGS per port and per queue Anupama Laxmi
2019-04-08 6:58 ` Shyam Shrivastav
2019-04-09 3:30 ` Anupama Laxmi
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).