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 513D9A0096 for ; Mon, 8 Apr 2019 03:48:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 585733421; Mon, 8 Apr 2019 03:48:53 +0200 (CEST) Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) by dpdk.org (Postfix) with ESMTP id 055A82E8F for ; Mon, 8 Apr 2019 03:48:51 +0200 (CEST) Received: by mail-qt1-f170.google.com with SMTP id z16so13673019qtn.4 for ; Sun, 07 Apr 2019 18:48:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=nUBYVuwMZvGmQVu72Ap8FjNVRwbvC0aVNvWzaKsUBrs=; b=jnKmQ6RnJCcn6nvdF1pe+vjxO9wRmJrFtdavt0kHRqWzuWsTenjYcohg8vcdDW6Lfz z+mF2UT2AMHcoH/cjoGrqyzHWiIuLUvdg1b8NucIb+Re8y/GLNkrk7U0omY6Ohng70YL oAFjAdxrrceFgdN678U5bJAslrCjv+wsjc80rPXWn7ytJ1aQmiDmIdxs+jN2e6Ir8Sfi EWlsndJKv0z+N3cl5bbAx7/wpNWMhI+rMvB6UVS9hOXZudhfm3s6XGfnZZlCYKOyr3AQ rJ1QgUptwNyMDKJjPCKgD5PvZVCZbl1fUwMkNmS97/WoBt8UsXp92Xhg5Vb6na2rN7Nr D6tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=nUBYVuwMZvGmQVu72Ap8FjNVRwbvC0aVNvWzaKsUBrs=; b=D7eVGQlAaBGlUYaGT+PKgLiSIr9rBhra1Ao8IhBMwGJMU8iUZYjMgM5aaeNy3z+2fX RQ0YKxpMkmqXtlQCBlPw/sSa8XAsm4DRoZJNc7yROkirmTLGduWNiC6AN8suy3M74y14 65cOZrUwLcRgaIzlgUcjZgXjz/9exZAtrXtDOa2gFbsg9xz34vfg/Z47wmT9a02s5ONp DWalPLP17cpKKKoGFHT4370jlN9LqshmRAjzXG0Asj5j7Xtrmhtn+OcNEdUTdzXyOXX9 9Hm7bZtEL0ip7YxwyWwcR7vd9WKP6Tlup+G7AY+RPZe7O2rYtbA8BnHGKnET/WxpGUr2 SE0g== X-Gm-Message-State: APjAAAWujuXhjY6gLHUMQgRuI6r30jJYWruzN0GmvVhd/lG6GdHITBed 1U3Q5NcXTDmmG2+Ua3N44qlbKUwPh5ThvvnZmXhyLMOq X-Google-Smtp-Source: APXvYqwyhxzprP164s+CkcSTAmrmmkZiG7WDQMb/0C2pROR8ozl+XjFfNrB9xsj5CvxA+WIph0Y8D1w+Kr4Ht8aZeIc= X-Received: by 2002:ac8:5493:: with SMTP id h19mr9045846qtq.23.1554688131195; Sun, 07 Apr 2019 18:48:51 -0700 (PDT) MIME-Version: 1.0 From: Anupama Laxmi Date: Mon, 8 Apr 2019 07:18:40 +0530 Message-ID: To: users@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [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" 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);