From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 889C2A0096 for ; Mon, 8 Apr 2019 08:58:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3083C2BC9; Mon, 8 Apr 2019 08:58:28 +0200 (CEST) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by dpdk.org (Postfix) with ESMTP id 971B02B95 for ; Mon, 8 Apr 2019 08:58:26 +0200 (CEST) Received: by mail-wm1-f53.google.com with SMTP id a184so12904625wma.2 for ; Sun, 07 Apr 2019 23:58:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=X8Ua/ZY2F1Kk+aGiYJ5N2Z0ChA46LFkoodhlh0W1yd8=; b=YhrrbJ0URL9nuO1kN4V1J+Nw+CSdsWO/iLZ6ZcdyYQTxKvzb4q8tujCKbpFDUBQqLC GDEacb6zEQJtRSEZWjAz7HkFsDeG8uIqdFZ/lT0YY4BzU+i6DQi4xgEOp5llrNH6pPSZ dnW8Y+vtlutc5EOlnV0xLCzFo0i32Mc7QHI0e3/C13pxkjs1mXe8OeYLOhGyDxUFhSTA c5FGqxpzMPw/bWVGbOwU6Cuo3RQXAZ32djUxxIuyo8GqQ75Z08i+7odZ564J2zpYU46V bhl94lkxvZOx6I9ZzoJ5vtocFRWkCmKQxoXF9QyKLIHlpGvZFKqg0eXzlwmiuHuqPmpE GKmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=X8Ua/ZY2F1Kk+aGiYJ5N2Z0ChA46LFkoodhlh0W1yd8=; b=oNp7shUq5TsZ3Ebix46+ts5+LYsRkGwIQJpXeLZOMfwV4/+Dwhb0cWjNChFiNbf6Jv 3fUpRFxiSN7ntZRCfVwZluncaVZRts7OzkacekxacDHbe+4H0T0x6w7ybNzHxvJQXNyI 3d8tng5n0srTVMOGechNYCjTFJcYpb67gkWzcnZsVOA04xiwSW3IjwjbjUy+jcY/W8Uj KFlIU4U6IV3o0/4yzxMrolzdqlVgDMnlo1rBQ2PSytZnk0NztlhP17G/3KFK4ykjnwcB 8C44zQVTFEPpZgi8mq7BDULDtNlH+TV2K//XK4S8AscpTyt6HDFRUBiUfkTC3XP1QuLJ uCng== X-Gm-Message-State: APjAAAUPbVCnjFf2pWndxgb6w+9getCsC1qkp1WOHTICU25pZ/O2DBcY pzb6wGZO/6YmcEafgiOlyKkyW118icLh6JBJsns= X-Google-Smtp-Source: APXvYqz5FuTS/bNVokeI2N7lBNGPeX64k1+jUwQzI0gWjQbK5NVFaWej74uboFP8KZmNoy4oJLK4Iahqar2Tanw7BJk= X-Received: by 2002:a1c:20c1:: with SMTP id g184mr16679968wmg.137.1554706706271; Sun, 07 Apr 2019 23:58:26 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Shyam Shrivastav Date: Mon, 8 Apr 2019 12:28:10 +0530 Message-ID: To: Anupama Laxmi Cc: users Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] To enable offloading DEV_TX_OFFLOAD_MULTI_SEGS per port and per queue X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "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 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); >