Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pluto: check various incompatible settings with nic-offload=packet|auto #1512

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

paulwouters
Copy link
Member

  • Limit the replay-window size to what is supported in known HW. (but what to do with replay-window=0 and it disabling ESN?)
  • Only allow ESP, not AH or IPTFS
  • Do not allow compression
  • TODO: what about tfcpad= , encap-dscp, nopmtudisc, ikepad, encapsulation,

- Limit the replay-window size to what is supported in known HW.
  (but what to do with replay-window=0 and it disabling ESN?)
- Only allow ESP, not AH or IPTFS
- Do not allow compression
- TODO: what about  tfcpad= , encap-dscp, nopmtudisc, ikepad, encapsulation,
@bleve bleve marked this pull request as ready for review January 5, 2024 09:59
@bleve
Copy link
Collaborator

bleve commented Jan 5, 2024

Looks good.

about replay-window=0 we can't do anything - what happens in that case is defined by rfc, only thing we might do is give warning, but warning like "Warning: reply-window=0 (disable) also disables ESN, not suitable for fast transfer speeds"

@bleve bleve requested a review from cagney January 5, 2024 10:02
@cagney
Copy link
Collaborator

cagney commented Jan 7, 2024

Why not probe the hardware.

@letoams
Copy link
Member

letoams commented Jan 7, 2024 via email

@cagney
Copy link
Collaborator

cagney commented Jan 8, 2024

Why not probe the hardware.

Or at least the kernel.[hc]. Adding:

dbg("packet offload replay-window compatible with all known hardware and Linux kernels");

to generic code should, minimally, raise an eyebrow.

Combinatory explosion?
Not guaranteed the hardware throws an error?

It’s worth doing this, once we see more hardware implementations. This is indeed a bit of a bandaid. Perhaps there will be proper features discovery call in Linux in the future ?

Note also technically, you might not know over which nic a future IPsec tunnel would go over, so you might not know which interface probe answers to use.

A valid point. Pluto already handles this though with per-interface hw detection vis:

ifd->nic_offload = kernel_ops_detect_offload(ifp, logger);

However, a grep of where that field is referenced only turns up kernel*.c - shouldn't there be a check in orient() so that a connection with hw-offload=yes only picks those interfaces. Ditto for the above?

@cagney
Copy link
Collaborator

cagney commented Jan 8, 2024

BTW

Ditto for the above?

isn't copy the code; rather orient ask the kernel if the interface can support offload with a given set of parameters

lsw-vault pushed a commit that referenced this pull request Jan 9, 2024
- rename <<enum offload_options>> to <<enum nic_offload_options>>
- make enums upper-case with NIC_OFFLOAD_ prefix
  fixing: Use lower case to avoid confusion with kernel options
- define nic_offload_option_names[]
- add NIC_OFFLOAD_UNSET
- handle defaults in pluto

see #1413 and #1512
cagney added a commit to cagney/libreswan that referenced this pull request Jan 10, 2024
Per libreswan#1512 this should have been stopped during orientation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants