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

prov/tcp: Add fi_set_val support for active/passive port range #10020

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on May 21, 2024

  1. prov/tcp: Add support for active TCP port range

    There is a need (e.g. firewall rule) to limit TCP ports used for
    active connections.
    
    The use case is DOAS clients started by MPI accessing DAOS servers
    behind firewall.  Since MPI and DAOS may not want to share the same
    port restriction, add active port range support under domain object
    using fi_set_val.
    
    Define FI_TCP_DOMAIN_ACTIVE_PORT_RANGE to take a
    struct xnet_port_range * of low and high port range.
    
    Sample:
      struct xnet_port_range range = { .low = 5000, .high = 6000 };
      fi_set_val(&domain->fid, FI_TCP_DOMAIN_ACTIVE_PORT_RANGE, &range);
    
    To disable the range, set low and high port range to 0.
    
    If the source address for an active connection contains a port
    number, it will be used over a defined port range.
    
    Signed-off-by: Chien Tin Tung <chien.tin.tung@intel.com>
    chien-intel committed May 21, 2024
    Configuration menu
    Copy the full SHA
    afa9ae2 View commit details
    Browse the repository at this point in the history
  2. prov/tcp: Set passive port range via fi_set_val

    For applicaitons that cannot set environment variables via shell or setenv
    API, add fi_set_val support to fabric object to set FI_TCP_PORT_LOW_RANGE
    and FI_TCP_PORT_HIGH_RANGE values.
    
    Define FI_TCP_FABRIC_PASSIVE_PORT_RANGE for fabric object taking
    struct xnet_port_range * parameter set with desired low and high port range.
    
    Sample:
      struct xnet_port_range range = { .low = 9000, .high = 9100 };
      fi_set_val(&fabric->fid, FI_TCP_FABRIC_PASSIVE_PORT_RANGE, &range);
    
    Signed-off-by: Chien Tin Tung <chien.tin.tung@intel.com>
    
    Signed-off-by: Chien Tin Tung <chien.tin.tung@intel.com>
    chien-intel committed May 21, 2024
    Configuration menu
    Copy the full SHA
    8ab97b2 View commit details
    Browse the repository at this point in the history