From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f176.google.com (mail-io0-f176.google.com [209.85.223.176]) by dpdk.org (Postfix) with ESMTP id F34FF1E34 for ; Fri, 5 May 2017 14:50:37 +0200 (CEST) Received: by mail-io0-f176.google.com with SMTP id f102so6947033ioi.2 for ; Fri, 05 May 2017 05:50:37 -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=5JFNZQ5YjbV3j5UrCGzsBkpK71oDs0DdJp2JXiPmkZM=; b=HBrZw+sZjsC70S4KGqQFUgdvffXf9qb/7Mm99JPK1cM4nmt3bYcxAYGFJYRafvDPQI 4neIydtVre6XGlongPkaLl9+ooJX+ddJgppTyJwHMrDtbObDCfMjpvTgWzo3oPMJZGYt OFpDPCyCzy8RTIkoVppfzNkjFPlVfy4dz1imZ1L7a0ZvTR2xZUZOLKuR8V7lpZxpxFpQ HLXCcT5zLWJk+eesV3rbgCcNX8kZcr3Lz0BAioPKqjK/0qBpKOV1mrOKo9ug/ZbQUb1L tj5rx4j9NRZA2kd5Q9BcGl6a04ignnu+kkTdu0vwxP87EngKDkla7wRR+//qrnzoPISB uFIA== 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=5JFNZQ5YjbV3j5UrCGzsBkpK71oDs0DdJp2JXiPmkZM=; b=Ww5F6g+O+mZwt0p1Mlhr6SsRPbu75T4Nl/QhfMC5UfYS/o1f5qaxnF/3wozqY5UQHD rYXkVvX9IgJDTbpPKwee2L+AoggJXb35feRTnog6yssoSycdrix8G1rr2TK/AC9cnJ2R sYkPyiel4OIGxw0ZOpDfblD30h2LI1ke07uaY5asq2YrObLLgFmAlpbcDfpZ3Oq2WgoL /2P8aJbVzMWIbw/dU+IeGb9gVXXe2HZz3vPqWpbPIKMeiiwfsoC0/8N47G1vATE8l7gi 72OkxIgeL0F2aEl+2wGjfhM5STdDsehapLHTDi2aEuu4rXwsNFcJE9QP9eF7dWP+xyrY xRGA== X-Gm-Message-State: AN3rC/6Hx36SplcWmyyaiHhBZGsxYdjCQBUone9uNARPrIinOsn9yUPL fTd9gjj0zHm6TjkrKcWpKJIXlFEf4OhQ X-Received: by 10.157.50.165 with SMTP id u34mr10385472otb.8.1493988636797; Fri, 05 May 2017 05:50:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.63.215 with HTTP; Fri, 5 May 2017 05:50:36 -0700 (PDT) From: Chinmaya Dwibedy Date: Fri, 5 May 2017 18:20:36 +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] Memory requirements for crypto devices (QAT and AESNI) (using DPDK-17.02) 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: Fri, 05 May 2017 12:50:38 -0000 Hi All, We are using DPK-17.02. We use crypto via hardware (QAT) and software acceleration (AESNI). There is one to one mapping between crypto Dev and worker core. What are the memory requirements for the below stated 1) Creation of one physical Crypto device. 2) Creation of one AESNI MB virtual Crypto device. Thereafter we configure a device with the default number of queue pairs to set up for the device as shown below. #define CDEV_MP_CACHE_SZ 64 rte_cryptodev_info_get(cdev_id, &info); dev_conf.nb_queue_pairs = info.max_nb_queue_pairs; dev_conf.session_mp.nb_objs = info.sym.max_nb_sessions; dev_conf.socket_id = SOCKET_ID_ANY; dev_conf.session_mp.cache_size = CDEV_MP_CACHE_SZ; rte_cryptodev_configure (cdev_id, &dev_conf); How to calculate the minimum memory required to configure per HW and per SW crypto device. Then we allocate and set up a receive queue pair for a device as follows. As of now we use one queue per device and number of descriptors per queue pair is set to 2k. If we increase the number of descriptors, will it improve the performance in terms of throughput? #define CDEV_MP_NB_OBJS 2048 qp_conf.nb_descriptors = CDEV_MP_NB_OBJS; rte_cryptodev_queue_pair_setup (cdev_id, 0, &qp_conf, dev_conf.socket_id) We create a session for symmetric cryptographic operations per IPsec Security association. What is the memory required to hold session data structure? The intent behind this is to calculate the memory requirements in advance (before EAL initialization) and based upon the available memory, figure out how many crypto devices (note: our application initializes AESNI vdev without using EAL command line option) can be initialized? Say there are 24 worker cores and we need 24 crypto AESNI vdevs. But there is no sufficient hugepage memory for creating 24 crypto AESNI vdevs. In such case, we will allocate more hugepages , then call rte_eal_init() and expect it to be passed. Thank you in advance for your suggestion and time. Regards, Chinmaya