From owner-freebsd-hackers@freebsd.org Mon Nov 9 19:13:16 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4CD4446B3D3 for ; Mon, 9 Nov 2020 19:13:16 +0000 (UTC) (envelope-from ozkan.kirik@gmail.com) Received: from mail-vs1-xe2b.google.com (mail-vs1-xe2b.google.com [IPv6:2607:f8b0:4864:20::e2b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CVLHb4JDrz3mVk; Mon, 9 Nov 2020 19:13:15 +0000 (UTC) (envelope-from ozkan.kirik@gmail.com) Received: by mail-vs1-xe2b.google.com with SMTP id b129so5601347vsb.1; Mon, 09 Nov 2020 11:13:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WIJTloa9Y6QqtN9wc6zwxAxcfxQWm0kjPnol2oWbpYA=; b=f91jnfQbSTHSnclWC50hNGruP21+ndaV4IYv2kt+IwHqwl93c+LXdbHCx9N4BPJajT 67kGL2ZHqFm8b32c1/wjIuGvHOZ/ntoXNNhAlDZ9XYmHEdB1Gi7bJBFYaNE/gKx05OS9 vTMz2nk7zTecc5VeLnd+sLEGOTQAyegMeFbTe+LlB+f/oRW0cwkvYLCWSfu4nXu2qVhl frN4vKJwfFCbsxNu3hdRm8GI9a23a5FhhKrsOckwYwD26IcJxDwrKkaxUDTcZGZw2SR0 3vk7iVRpjc+Zg3o1sADiCucLlISZDpe/T1fSE/eYl6znDeji2/e/6BINi1L1ecRiiv89 UOwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WIJTloa9Y6QqtN9wc6zwxAxcfxQWm0kjPnol2oWbpYA=; b=KCz5U9bG/VLLpt2yscJnyruKm+T0ZK55LZIp6JY+Tndx9XJ+yfxo/B1tC25hIGCe7f 3SQ2MYsllivRDPEX8wSnalAQovFeY/VcRF2gp9j63zwTKF3438ppO+7tqik/x9K/jP+2 bUNhAzwFxAcQYHEsrAgnYoCOj9d+czexmDx8Sr66vRfKlds5HL+koph3/xqdBjc9jLtC K8eyTwKATXMl9orPlUVUhRKoHyytd0ticvf4vOUoe7zj2gzvbE3ee6ruWv/8kSzsYclS H3zqE7a6gEMRJrjhrxr4eq5vqHNalpu/AHPS7qHH1ElLBA51/dGDw6A1rIzpgIK7z/zQ cyjw== X-Gm-Message-State: AOAM533k/s1KC29nGSIpYgBrAphOg8Zs6liMYMM/mFLc6YTgRyfCp9bP NFM1qa3H4aQk9wJzF6vX74mnQVTpLfU++tFMfq9gHNm6m5M= X-Google-Smtp-Source: ABdhPJycZFUci7qo3jZC3Kd6rXPngDzMqFY3Tq8dIO3gscmu59sjIegSg8PUQMgWZDH+MW7dXSUNXNAJYd7qpnSq9o8= X-Received: by 2002:a67:ec89:: with SMTP id h9mr9059223vsp.55.1604949194478; Mon, 09 Nov 2020 11:13:14 -0800 (PST) MIME-Version: 1.0 References: <20201026200059.GA66299@raichu> <723fbd7326df42ce30cd5e361db9c736@neelc.org> <20201027032720.GB31663@raichu> <20201027125508.GD31663@raichu> <20201109185304.GB4990@raichu> In-Reply-To: From: =?UTF-8?B?w5Z6a2FuIEtJUklL?= Date: Mon, 9 Nov 2020 22:13:00 +0300 Message-ID: Subject: Re: QAT driver To: Mark Johnston Cc: "freebsd-hackers@freebsd.org" X-Rspamd-Queue-Id: 4CVLHb4JDrz3mVk X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=f91jnfQb; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of ozkankirik@gmail.com designates 2607:f8b0:4864:20::e2b as permitted sender) smtp.mailfrom=ozkankirik@gmail.com X-Spamd-Result: default: False [-1.66 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_MIXED_CHARSET(1.00)[subject]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::e2b:from]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; NEURAL_SPAM_SHORT(0.34)[0.337]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::e2b:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::e2b:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2020 19:13:16 -0000 Running OS is not updated yet. It's a FreeBSD 12.1 stable. So drivers were not attached. On Mon, Nov 9, 2020 at 10:08 PM =C3=96zkan KIRIK wr= ote: > This is cutted output, full output is attached. It's using C620. I think > it's supported. > There are two QAT chips SoC. Is it possible to use both of them ? > > none100@pci0:181:0:0: class=3D0x0b4000 card=3D0x00008086 chip=3D0x37c88= 086 > rev=3D0x04 hdr=3D0x00 > vendor =3D 'Intel Corporation' > device =3D 'C62x Chipset QuickAssist Technology' > class =3D processor > none101@pci0:182:0:0: class=3D0x0b4000 card=3D0x00008086 chip=3D0x37c88= 086 > rev=3D0x04 hdr=3D0x00 > vendor =3D 'Intel Corporation' > device =3D 'C62x Chipset QuickAssist Technology' > class =3D processor > > > > On Mon, Nov 9, 2020 at 9:53 PM Mark Johnston wrote: > >> On Mon, Nov 09, 2020 at 09:44:40PM +0300, =C3=96zkan KIRIK wrote: >> > great job! thank you! >> > >> > Does the work supports Xeon D-2100 series ? (Exact model: Xeon D-2146N= T) >> > Regards >> >> I'm not sure - could you provide the PCI ID for the QAT device in >> question? "pciconf -lv" output would be sufficient. I don't see >> distinct Xeon D-2XXX support in any open-source QAT drivers, so it's >> probably covered by one of the other device types. >> >> > On Fri, Oct 30, 2020 at 6:45 PM John Baldwin wrote: >> > >> > > On 10/27/20 2:15 PM, Rick Macklem wrote: >> > > > Mark Johnston wrote: >> > > >> On Tue, Oct 27, 2020 at 04:32:40AM +0000, Rick Macklem wrote: >> > > > [stuff snipped] >> > > >>> Can it be made to work with the KERN_TLS in head? >> > > >>> (KERN_TLS works fine for me using the ktls_ocf and aesni modules= .) >> > > >>> I think it is only head and requires the patched OpenSSL3 that >> jhb@ >> > > >>> currently has. >> > > >> >> > > >> I hadn't looked at ktls_ocf.c before but at a glance it looks lik= e >> it >> > > >> can make use of any hardware or software opencrypto driver that >> supports >> > > >> the requested algorithms. The qat(4) port implements the >> algorithms >> > > >> referenced by ktls_ocf_try(). >> > > > Well, if you were inspired to try it out, the basic doc for >> NFS-over-TLS >> > > is here: >> > > > https://people.freebsd.org/~rmacklem/nfs-over-tls-setup.txt >> > > > (Same file is in base/projects/nfs-over-tls on subversion.) >> > > > For someone who is used to building/running head kernels, it shoul= d >> be >> > > > pretty straightforward. >> > > > >> > > > You could become the first tester in the whole wide world;-) rick >> > > > ps: Although the NFS code uses it in the kernel, I think that an >> > > application >> > > > that uses OpenSSL's SSL_read()/SSL_write via a patched OpenSS= L >> > > library, >> > > > has the encrypt/decrypt done in the kernel and the userspace >> library >> > > > code just does socket I/O with unencrypted data. >> > > > pss: Hopefully jhb@ will correct me if I got this wrong. >> > > > >> > > >> I know nothing about it, except that it seems to work well, doing >> > > >> the TLS application data records in the kernel for a TCP socket >> > > >> enabled by the patched OpenSSL library. >> > > >> I've cc'd jhb@, so hopefully he can let us know what it needs? >> > > >> > > qat(4) should work with KERN_TLS. I've used ccr(4) with the KERN_TL= S >> > > bits many times. It is a good throughput test, though you will need >> > > a fast network connection to really push it (e.g. with ccr(4) I've >> > > done about 50 Gbps of TLS traffic using nginx with the KTLS patches >> > > to use sendfile, so that requires a 100G NIC and/or two 40G NICs.) >> > > >> > > -- >> > > John Baldwin >> > > _______________________________________________ >> > > freebsd-hackers@freebsd.org mailing list >> > > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> > > To unsubscribe, send any mail to " >> freebsd-hackers-unsubscribe@freebsd.org" >> > > >> >