Commit 69d18873 authored by Jose Luis Carcel's avatar Jose Luis Carcel
Browse files

SmartNIC, NOS and NS Data Models

parent 6d77d5e6
Loading
Loading
Loading
Loading
+16 −15
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@
// https://www.nvidia.com/content/dam/en-zz/Solutions/networking/ethernet-adapters/connectX-6-dx-datasheet.pdf
// converged accel: https://www.nvidia.com/content/dam/en-zz/Solutions/gtcf21/converged-accelerator/pdf/datasheet.pdf
// bluefield-2 = connectX-6 + DPUs
// conv_accel = bluefield-2 + GPU
// conv_accel = bluefield-2 + GPU (A30)

syntax = "proto3";
package context-ext-smartnics;
@@ -73,15 +73,15 @@ enum DpuCoreArchitectureEnum {
}

message DPU_Core {
    string model = 1; // Armv8 A72
    string model = 1; 
    DpuCoreArchitectureEnum architecture = 2; 
    uint64 l2_cache_size_mb = 3;
    uint64 l3_cache_size_mb = 4;
}

message DPU_Memory {
    string RamMemoryType = 1; //On-Board DDR4
    string eMMCMemoryType = 2; //eMMC
    string RamMemoryType = 1; 
    string eMMCMemoryType = 2; 
    DpuRamMemorySizeGB RamMemorySizeGB = 3; 
    DpueMMCMemorySizeGB eMMCMemorySizeGB = 4; 
}
@@ -99,12 +99,12 @@ enum DpueMMCMemorySizeGB {
    DPU_MEMORY_eMMC_128GB = 3;
}

enum Architecture {
enum GPUArchitecture {
    ARCH_UNDEFINED = 0;
    ARCH_AMPERE = 1;
}

enum ComputeCapabilities {
enum GPUComputeCapabilities {
    MIG_UNDEFINED = 0;
    MIG_4_AT_6GB = 1; 
    MIG_2_AT_12GB = 2;
@@ -113,13 +113,14 @@ enum ComputeCapabilities {


message GPU {
    Architecture architecture = 1; //AMPERE?
    ComputeCapabilities compute_capabilities = 2; //MIG?
    uint64 memory_size_gb = 3; //24 GB HBM2
    uint32 num_CUDA_cores = 4; //3804
    uint32 num_Tensor_cores = 5; //224
    uint32 peak_fp_32 = 6; //10.3TF
    uint32 peak_fp_64 = 7; //5.2TF
    uint32 peak_fp_64_tensor_core = 8; //10.3TF
    string model = 1; 
    GPUArchitecture architecture = 2; 
    GPUComputeCapabilities compute_capabilities = 3; 
    uint64 memory_size_gb = 4; 
    uint32 num_CUDA_cores = 5; 
    uint32 num_Tensor_cores = 6; 
    uint32 peak_fp_32 = 7;  
    uint32 peak_fp_64 = 8;
    uint32 peak_fp_64_tensor_core = 9;
}

proto/nfv_client.proto

0 → 100644
+44 −0
Original line number Diff line number Diff line
// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";
package nfv_client;

import "context.proto";

message Nsd {
	string nsd_name = 1;
}

message Ns {
	string ns_id=1;
	string ns_name=2;
	string nsd_name=3;
  string vim_account=4;
}

message NsList {
  repeated Ns ns = 1;
}

message NsdList {
  repeated Nsd nsd = 1;
}

service nfv_client {
    rpc CreateNs                (ns) returns (ns_id) {} // Stable not final
    rpc DeleteNs                (ns) returns (context.Empty) {}
}

	
+77 −12
Original line number Diff line number Diff line
probes-agent.yang
module probes-agent {

# augment de openconfig probes
namespace "urn:probes-agent";
prefix "probes-agent";

augment /probes/probe {
import openconfig-probes { prefix oc-probes; }

organization "EVIDEN";
contact "jose.carcel@eviden.com";
description "Basic example of data model for configuring SmartNICs through Morpheus API";
revision "2023-08-03" {
    description "Basic example of data model for configuring SmartNICs through Morpheus API";
}

augment '/oc-probes:probes/oc-probes:probe' {
    leaf probe_type {
        type enumeration {
            enum plain_traffic;
@@ -11,7 +21,7 @@ augment /probes/probe {
    }
}

augment /probes/probe/tests/test/config {
augment '/oc-probes:probes/oc-probes:probe/oc-probes:tests/oc-probes:test/oc-probes:config' {
    uses morpheus_pipelines;
}

@@ -25,20 +35,75 @@ grouping morpheus_pipelines {
grouping morpheus_pipeline {
    leaf name { type string; }
    leaf num_threads { type uint16; }
    // other settings
    // https://github.com/nv-morpheus/Morpheus/blob/branch-23.11/examples/abp_pcap_detection/run.py

    leaf pipeline_batch_size {type uint64; }
    leaf model_max_batch_size {type uint64; }
    leaf input_file {type string; }
    leaf output_file {type string; }
    leaf model_fea_length {type uint16; }
    leaf model_name {type string; }
    leaf iterative {type boolean; }
    leaf server_url {type string; }
    leaf file_type {type files; }
    list stages {
        key name;
        uses morpheus_pipeline_stage;
    }
}

typedef files {
    type enumeration {
        enum "auto";
        enum "csv";
        enum "json";
    }
}

typedef stage {  
    type enumeration {
        enum "FileSourceStage";
        enum "DeserializeStage";
        enum "AbpPcapPreprocessingStage";
        enum "MonitorStage";
        enum "TritonInferenceStage";
        enum "AddClassificationsStage";
        enum "SerializeStage";
        enum "WriteToFileStage";
    }
}

grouping prob {
    leaf value {
        type string;
        description "probs";
    }
}

grouping conf {
    leaf mode {type string; }
    leaf num_threads { type uint16; }
    leaf pipeline_batch_size { type uint64; }
    leaf model_max_batch_size { type uint64; }
    leaf model_fea_length { type uint64; }
    list class_labels {
        key "value";
        uses prob; }
}

grouping morpheus_pipeline_stage {
    leaf name { type string; }
    // enum stage type
    // stage parameters
    // soportar custom stages
    // https://github.com/nv-morpheus/Morpheus/blob/branch-23.11/examples/abp_pcap_detection/run.py

    leaf stage_type {type stage; }
    list configuration {key "mode"; uses conf;} 
    leaf filename {type string;}
    leaf iterative {type boolean;}
    leaf file_type {type files;}
    leaf filter_null {type boolean;}
    leaf descriptions {type string;}
    leaf model_name {type string;}
    leaf server_url {type string;}
    leaf force_convert_inputs {type boolean;}
    leaf unit {type string;}
    list labels {key "value"; uses prob;}
    leaf kwargs {type empty;}
    leaf overwrite {type boolean;}
}
}
 No newline at end of file

ztp_device.yang

0 → 100644
+43 −0
Original line number Diff line number Diff line
module ztp_device {

    yang-version "1";

    namespace "urn:ztp_nos";
    prefix "ztp_nos";
    organization "EVIDEN";
    contact "jose.carcel@eviden.com";
    description "Basic example of data model for modelling NOS ZTP Device";

    revision "2023-08-03" {
        description "Basic example of data model for modelling NOS ZTP Device";
        reference "";
    }

    grouping config{
        leaf ztp_device_sw_url{
            type string;
        }
        leaf config_script_url{
            type string;
        }
    }

    typedef state {
        type enumeration{
            enum "UNDEF";
            enum "INIT_HW";
            enum "INIT_SW";
            enum "CONFIGURED";
            enum "RUNNING";
            enum "UPDATING";
            enum "MIGRATING";
            enum "DELETED";
        }
    }

    grouping state {
        leaf ztp_device_state {
            type state;
        }
    }
}
 No newline at end of file