Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8892136ybl; Fri, 17 Jan 2020 02:59:26 -0800 (PST) X-Google-Smtp-Source: APXvYqzeDCPSGW2R0r/c1u05FyKoQWGxUuaPRYXIa3cc57SYng3hfkm3rJIljHzLb+kDWNaprx5D X-Received: by 2002:a9d:6f8f:: with SMTP id h15mr5357990otq.1.1579258765915; Fri, 17 Jan 2020 02:59:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579258765; cv=none; d=google.com; s=arc-20160816; b=RTeoPx3X7imRc/kJlG5p0k0oJbzSloBHAleI9Xvqd5CjqPeuuvJPH8UQ81CWhbWu+8 T9kLqNd+g5QEFu+eT70RJHYPbzBcMfwNWTh5WVu/YoPuftoOADoAUZZGJCD2gvgr9yAz OouYZDpjEb4ElUGYB/ZxsHppNyb/rB87EICJMBqSgDhUWnBQmOPPHCUqpeNtDj+l1y5f mu6gfDvfhUTzo3M6gNRwos3poVpPC8+1OSR0oHRVodCyW14Jb/q9VCFtIWqwwGAP7knd YARpk2FCVORJR81v3OGKxQjCoBxtpJpndqK8e+JLM9RctZEoHnpk5Qq/1YC213Wj4TGS /RKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:cc; bh=yQcJQorJCW8SgvFccX5dkvXCAe+fSSbatGREWv9hWt8=; b=CFRLARBoPY0s4hrDq8YghQv6JQBIQDworsNatCEmJcajDzAGVnPfvu2+g3s8PTDtYg gjbyxkWxxIVd+s713y14rYqMcojlycc4oSQ8r85MgQWgBa5zEY1IwUzBWKdNxbG/erZT +G/ZKg7C0Grh+LQTkQItJG+380MWcu0tykQI6dPqRkvd7y9Gn4p1/5LMXT2Di701V4Nj WpKZsAeytZ1ZLI4Mb1J+y1dEj6rcJx406g2wUG1wRczrGqFyL7ghHZ7t6fFRUWOPanDy rLfjsuURxayGjRVemE2RQSlQ140tQpE1A0YDcssBeL4smkOP7wZSftAVqw21RnsGfprt evPA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j20si14490226otp.147.2020.01.17.02.59.10; Fri, 17 Jan 2020 02:59:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726362AbgAQK7J (ORCPT + 99 others); Fri, 17 Jan 2020 05:59:09 -0500 Received: from stargate.chelsio.com ([12.32.117.8]:24445 "EHLO stargate.chelsio.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726196AbgAQK7J (ORCPT ); Fri, 17 Jan 2020 05:59:09 -0500 Received: from [10.193.191.49] (ayushsawal.asicdesigners.com [10.193.191.49]) by stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id 00HAwurF011014; Fri, 17 Jan 2020 02:58:56 -0800 Cc: ayush.sawal@asicdesigners.com, Herbert Xu , linux-crypto@vger.kernel.org, manojmalviya@chelsio.com, Ayush Sawal , netdev@vger.kernel.org Subject: Re: Advertise maximum number of sg supported by driver in single request To: Steffen Klassert References: <20200115060234.4mm6fsmsrryzpymi@gondor.apana.org.au> <9fd07805-8e2e-8c3f-6e5e-026ad2102c5a@chelsio.com> <20200117062300.qfngm2degxvjskkt@gondor.apana.org.au> <20d97886-e442-ed47-5685-ff5cd9fcbf1c@asicdesigners.com> <20200117070431.GE23018@gauss3.secunet.de> From: Ayush Sawal Message-ID: <318fd818-0135-8387-6695-6f9ba2a6f28e@asicdesigners.com> Date: Fri, 17 Jan 2020 16:28:54 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200117070431.GE23018@gauss3.secunet.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hi steffen, On 1/17/2020 12:34 PM, Steffen Klassert wrote: > On Fri, Jan 17, 2020 at 12:13:07PM +0530, Ayush Sawal wrote: >> Hi Herbert, >> >> On 1/17/2020 11:53 AM, Herbert Xu wrote: >>> On Thu, Jan 16, 2020 at 01:27:24PM +0530, Ayush Sawal wrote: >>>> The max data limit is 15 sgs where each sg contains data of mtu size . >>>> we are running a netperf udp stream test over ipsec tunnel .The ipsec tunnel >>>> is established between two hosts which are directly connected >>> Are you actually getting 15-element SG lists from IPsec? What is >>> generating an skb with 15-element SG lists? >> we have established the ipsec tunnel in transport mode using ip xfrm. >> and running traffic using netserver and netperf. >> >> In server side we are running >> netserver -4 >> In client side we are running >> "netperf -H -p -t UDP_STREAM  -Cc -- -m 21k" >> where the packet size is 21k ,which is then fragmented into 15 ip fragments >> each of mtu size. > I'm lacking a bit of context here, but this should generate 15 IP > packets that are encrypted one by one. This is what i observed ,please correct me if i am wrong. The packet when reaches esp_output(),is in socket buffer and based on the number of frags ,sg is initialized  using sg_init_table(sg,frags),where frags are 15 in our case. The socket buffer data is then copied to this sg and then struct aead_request members are filled. After this crypto aead request which contains all data in its sg list goes to hw crypto driver for encryption in a single request. In the crypto driver we are receiving a single aead-request with all 15 sgs in that request. Thanks, Ayush