From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 453197CAF; Wed, 24 May 2017 10:47:56 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 May 2017 01:47:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,385,1491289200"; d="scan'208,217";a="104757424" Received: from smonroyx-mobl.ger.corp.intel.com (HELO [10.237.221.20]) ([10.237.221.20]) by orsmga005.jf.intel.com with ESMTP; 24 May 2017 01:47:54 -0700 To: Srinivasreddy R , "dev@dpdk.org" , users@dpdk.org References: From: Sergio Gonzalez Monroy Message-ID: Date: Wed, 24 May 2017 09:47:54 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] [dpdk-dev] cryptodev - thread, cryptodev, session, queue-pair mapping . 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: , X-List-Received-Date: Wed, 24 May 2017 08:47:58 -0000 Hi, There are different ways you can do this. You have an approach in examples/ipsec-secgw where each thread/lcore uses a hash table for the device/queue mapping for the crypto algorithms combinations (key). The session is 1:1 to SA, so it just keeps a pointer in the SA struct. This holds true in the context of the example given that each SA has to be processed by a single core, which means in a device. If you were to do something more complex, like processing the same SA across multiple crypto PMDs, you would need to keep a mapping of each device's session for the same SA. You may be interested in the following change for the next release where the same session could be used by multiple devices: http://dpdk.org/dev/patchwork/patch/24091/ Thanks, Sergio On 24/05/2017 08:23, Srinivasreddy R wrote: > Hi All, > > I have multiple ports,multiple hardware queues. so multiple threads are > polling on single port . > I am using multiple crypto devices ,each crypto device has max of 8 > queue_pairs. > > when i add a SA , i need to create a session on a crypto device. > > can some suggest how can i maintain a mapping between thread , crypto > session ,crypto device , crypto queue_pairs . > > thanks > srinivas