From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id 3CCBE567F for ; Thu, 17 Mar 2016 18:10:42 +0100 (CET) Received: by mail-wm0-f47.google.com with SMTP id p65so35377173wmp.1 for ; Thu, 17 Mar 2016 10:10:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=Xi3ueS39sbrBXw3cM+fLCWYZwwwB/hRk59j4tPwYXm4=; b=TUXx/IHuKDMVUqT87wSWs6f5Qc491xYlnTdTHq584Gu1hob6cYjbm7p4HClsMVYkuK h/HzEtEbYaCRJARZprFfompt2WSZJD7VwVTVuO9S98mU3qWhbGdjcCpScuB2hIf4SjjY 1Gf7dWBbsbzCwCmH80WbqDeAvAtMwK35HDgtc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=Xi3ueS39sbrBXw3cM+fLCWYZwwwB/hRk59j4tPwYXm4=; b=gT7EW6S1umcKYBBrVVU8YbuPQYVzVPYQJaehO1ZRFnOWGtrfsjb8wgCTSOGGfwjQoa 4cK4DclK58PaFDjvswdweNNTBnvju5XgsNJOOlA3/DtP9PPFIOvsnvCqGPfS0ZGKAjJH tCH6R44oeyerAyv1BgwSazhczw4DhlyAolpYN7aZv1mOVAjFRQ4JKDVMq04Qxe5CsDnC pV0EzSfV0MAc8zqaKVemTyUdDsNLeH2AD3J9D1EY8Ige5dgf/NrGr2FSaDJqtLA+F9DX eObEOv1hm0OYMQASflhmyPaNGXpWjWBlpwz1XljTiexB+P0Tcerby7RDDN7N+aDch0mP G60g== X-Gm-Message-State: AD7BkJK0kmoJgR3qHjCUW82dX7b4hZEYKTMb/BI9iMMkYLGkO79m2o1th2P91zuKT/OcGD7w X-Received: by 10.28.173.71 with SMTP id w68mr38932504wme.88.1458234641961; Thu, 17 Mar 2016 10:10:41 -0700 (PDT) Received: from [172.18.45.108] ([195.11.233.227]) by smtp.googlemail.com with ESMTPSA id k124sm8967777wmb.11.2016.03.17.10.10.41 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 17 Mar 2016 10:10:41 -0700 (PDT) To: "Wu, Jingjing" , "dev@dpdk.org" References: <56D5EB07.9070706@linaro.org> <9BB6961774997848B5B42BEC655768F8DD26BC@SHSMSX104.ccr.corp.intel.com> From: Zoltan Kiss Message-ID: <56EAE521.900@linaro.org> Date: Thu, 17 Mar 2016 17:10:57 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <9BB6961774997848B5B42BEC655768F8DD26BC@SHSMSX104.ccr.corp.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] ixgbe TX function selection X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Mar 2016 17:10:42 -0000 On 10/03/16 07:51, Wu, Jingjing wrote: > Hi, Zoltan > >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zoltan Kiss >> Sent: Wednesday, March 2, 2016 3:19 AM >> To: dev@dpdk.org >> Subject: [dpdk-dev] ixgbe TX function selection >> >> Hi, >> >> I've noticed that ixgbe_set_tx_function() selects the non-SG function >> even if (dev->data->scattered_rx == 1). That seems a bit dangerous, as >> you can turn that on inadvertently when you don't set max_rx_pkt_len and >> buffer size in certain ways. I've learnt it in the hard way, as my >> segmented packets were leaking memory on the TX path, which doesn't >> cries if you send out segmented packets. >> How should this case be treated? Assert on the non-SG TX side for the >> 'next' pointer? Or turning on SG if RX has it? It doesn't seem to be a >> solid way as other interfaces still can have SG turned on. >> > > If you look into the ixgbe_set_tx_function, you will find tx function > selection is decided by the tx_flags on queue configure, which is > passed by rte_eth_txconf. So even you set dev->data->scattered_rx to 1, > if the tx_flags is ETH_TXQ_FLAGS_NOMULTSEGS, ixgbe_xmit_pkts_simple is > still selected as tx function. So, you'd better to set tx_flags=0, and have a try. You mean getting default_txconf from rte_eth_dev_info_get() and explicitly turn ETH_TXQ_FLAGS_NOMULTSEGS to 0? (filling tx_flags with zeros doesn't work very well) That's a way to solve it for me, but I'm rather talking about using defaults which doesn't cause memory leak quite easily. > >> Regards, >> >> Zoltan