AAScratch

From Libreswan
Jump to navigation Jump to search

Antony's unsorted pages that I want to access quickly. These are mostly related to IPsec/libreswan and when I think I know this page exist but where is it.

KVM/QEMU

9pfs

As of 2023 9pfs is seeing renewed interest among testers. It is probably not ideal for production use, however, it is ideal for testing. It is widely used NIX os testing. I imagine libreswan will stick with this for a while more.

virtio-fs is an alternative to 9pfs in KVM/QEMU:

In January 2021, I tried it on Fedora 33. I am happy with the initial results. The performance was great. Building libreswan was quick 44/240 seconds. It might also possible to boot from a host directory. In combination with btrfs could be a good choice. At the moment creating and using virtio-fs is bit hard. It will get better.

  • Missing features virt-install do not have necessary support to create VM with right options such as NUMA settings, big memory libvirtd.
  • Systemd mount services seems to miss support.
  • virtio-fs can also be root fs. Then boot the KVM from kernel(vmlinuz) the host.
  • As of 2023 "virtio-fs does not support accessmode='squash' (or mapped) (it only supports passthrough). This means that all created files and directories end up being owned by root!"
  • virtifs would need an instance of daemon per qemu/kvm instance. That would create lot of overhead when testing with 10-12 instances.

Requirement: Fedora 33 - libvirt 6.2, qemu 5.0, kernel 5.4

KVM/QEMU + vsock NFS to replace 9pfs

KVM/QEMU support for vsock and nfs support over vsock could have a better performance than 9pfs. vsock + nfd started beforevirtio-fs. Currently, as of Janury 2021, virtio-fs is popular. This work could be interesting to libreswan KVM testing. It started in 2015. It is slowly picking up, as of 2018 it used in AWS and AWS firecracker are pushing it. AWS is using without nfsd support. Other distributions may need nfsd support.

Linux Kernel developments

XFRM Offload : starting 4.14

 * NAT support ??? 
 * What if the interface is a member of bridge? can libreswan/strongswan configure SA correctly? bridge
 * what if the packets arrive on different interface would that get decrypted correctly? would it be decrypted by CPU or the offload NIC? 
 * Bonded NIC card

XFRM and XDP

 * idea presentation Steffen Klassert Linux Netconf, Boston, June, 2019

Linux Per CPU efforts

Userspace IPsec Stacks

Over last few years specialized user space IPSec(ESP) stacks and IKE implementations are becoming popular.

VPP + DPDK (Userspace ESP + IKE)

VPP has its own IKEv2 and ESP implimentation.

Snabb ESP userspace stack

Snabb as of 2020 has ESP. No IKE, it can easily use of the shelf IKE say strongswan for IKE and and few command line calls to install snabb esp Snabb FOSDEM 2020 snabb ipsec podcast Strongswan inegeration

OVS

http://docs.openvswitch.org/en/latest/tutorials/ipsec/

iptable rule to drop IKEv2 message id X

https://unix.stackexchange.com/questions/321252/drop-a-packet-depending-on-its-options-or-type

# drop ike message ID 6
iptables -A INPUT -m u32 --u32 '0x6 & 0xFF = 0x11 && 0x30 & 0xFFFFFFFF = 0x4' -j DROP

Hardware offload

XFRM offload

  • Mellonax Innova or ConnectX 6DX
  • Intel

Pensando - DSC ASIC. The PenAccel

Around 2017 - 2020 Pensand DSC(DPU) announced East-West IPsec line rate 100Gbps. It is also FIPS 140-2 certified | Oracle certified it? | Aurba CX 1000

Intel QAT

https://www.servethehome.com/intel-quickassist-at-40gbe-speeds-ipsec-vpn-testing/
| DPDK crypto performance report.

Intel AES NI

Historic OCF

Back in the 90 there was alo

RSS/RPS/RFS

Interesting Linux referecncs

Linux packet path

https://upload.wikimedia.org/wikipedia/commons/3/37/Netfilter-packet-flow.svg

Debugging Netlink

https://jvns.ca/blog/2017/09/03/debugging-netlink-requests/

Netlink extack plumbing work extack first patch

Libreswan testing network

testing network Feb 2021