aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib/buffer.c')
-rw-r--r--src/vlib/buffer.c141
1 files changed, 88 insertions, 53 deletions
diff --git a/src/vlib/buffer.c b/src/vlib/buffer.c
index 1b975163e62..3e2fe82fb12 100644
--- a/src/vlib/buffer.c
+++ b/src/vlib/buffer.c
@@ -621,13 +621,64 @@ vlib_set_buffer_free_callback (vlib_main_t * vm, void *fp)
}
static_always_inline void
+recycle_or_free (vlib_main_t * vm, vlib_buffer_main_t * bm, u32 bi,
+ vlib_buffer_t * b, u32 follow_buffer_next)
+{
+ vlib_buffer_free_list_t *fl;
+ vlib_buffer_free_list_index_t fi;
+ fl = vlib_buffer_get_buffer_free_list (vm, b, &fi);
+
+ /* The only current use of this callback:
+ * multicast recycle */
+ if (PREDICT_FALSE (fl->buffers_added_to_freelist_function != 0))
+ {
+ int j;
+
+ vlib_buffer_add_to_free_list (vm, fl, bi,
+ (b->flags & VLIB_BUFFER_RECYCLE) == 0);
+ for (j = 0; j < vec_len (bm->announce_list); j++)
+ {
+ if (fl == bm->announce_list[j])
+ goto already_announced;
+ }
+ vec_add1 (bm->announce_list, fl);
+ already_announced:
+ ;
+ }
+ else
+ {
+ if (PREDICT_TRUE ((b->flags & VLIB_BUFFER_RECYCLE) == 0))
+ {
+ u32 flags, next;
+
+ do
+ {
+ vlib_buffer_t *nb = vlib_get_buffer (vm, bi);
+ flags = nb->flags;
+ next = nb->next_buffer;
+ if (nb->n_add_refs)
+ nb->n_add_refs--;
+ else
+ {
+ vlib_buffer_validate_alloc_free (vm, &bi, 1,
+ VLIB_BUFFER_KNOWN_ALLOCATED);
+ vlib_buffer_add_to_free_list (vm, fl, bi, 1);
+ }
+ bi = next;
+ }
+ while (follow_buffer_next && (flags & VLIB_BUFFER_NEXT_PRESENT));
+
+ }
+ }
+}
+
+static_always_inline void
vlib_buffer_free_inline (vlib_main_t * vm,
u32 * buffers, u32 n_buffers, u32 follow_buffer_next)
{
vlib_buffer_main_t *bm = vm->buffer_main;
- vlib_buffer_free_list_t *fl;
- vlib_buffer_free_list_index_t fi;
- int i;
+ vlib_buffer_t *p, *b0, *b1, *b2, *b3;
+ int i = 0;
u32 (*cb) (vlib_main_t * vm, u32 * buffers, u32 n_buffers,
u32 follow_buffer_next);
@@ -639,59 +690,43 @@ vlib_buffer_free_inline (vlib_main_t * vm,
if (!n_buffers)
return;
- for (i = 0; i < n_buffers; i++)
+ while (i + 11 < n_buffers)
{
- vlib_buffer_t *b;
- u32 bi = buffers[i];
-
- b = vlib_get_buffer (vm, bi);
- VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b);
- fl = vlib_buffer_get_buffer_free_list (vm, b, &fi);
-
- /* The only current use of this callback: multicast recycle */
- if (PREDICT_FALSE (fl->buffers_added_to_freelist_function != 0))
- {
- int j;
-
- vlib_buffer_add_to_free_list
- (vm, fl, buffers[i], (b->flags & VLIB_BUFFER_RECYCLE) == 0);
-
- for (j = 0; j < vec_len (bm->announce_list); j++)
- {
- if (fl == bm->announce_list[j])
- goto already_announced;
- }
- vec_add1 (bm->announce_list, fl);
- already_announced:
- ;
- }
- else
- {
- if (PREDICT_TRUE ((b->flags & VLIB_BUFFER_RECYCLE) == 0))
- {
- u32 flags, next;
-
- do
- {
- vlib_buffer_t *nb = vlib_get_buffer (vm, bi);
- flags = nb->flags;
- next = nb->next_buffer;
- if (nb->n_add_refs)
- nb->n_add_refs--;
- else
- {
- vlib_buffer_validate_alloc_free (vm, &bi, 1,
- VLIB_BUFFER_KNOWN_ALLOCATED);
- vlib_buffer_add_to_free_list (vm, fl, bi, 1);
- }
- bi = next;
- }
- while (follow_buffer_next
- && (flags & VLIB_BUFFER_NEXT_PRESENT));
+ p = vlib_get_buffer (vm, buffers[i + 8]);
+ vlib_prefetch_buffer_header (p, LOAD);
+ p = vlib_get_buffer (vm, buffers[i + 9]);
+ vlib_prefetch_buffer_header (p, LOAD);
+ p = vlib_get_buffer (vm, buffers[i + 10]);
+ vlib_prefetch_buffer_header (p, LOAD);
+ p = vlib_get_buffer (vm, buffers[i + 11]);
+ vlib_prefetch_buffer_header (p, LOAD);
+
+ b0 = vlib_get_buffer (vm, buffers[i]);
+ b1 = vlib_get_buffer (vm, buffers[i + 1]);
+ b2 = vlib_get_buffer (vm, buffers[i + 2]);
+ b3 = vlib_get_buffer (vm, buffers[i + 3]);
+
+ VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b0);
+ VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b1);
+ VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b2);
+ VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b3);
+
+ recycle_or_free (vm, bm, buffers[i], b0, follow_buffer_next);
+ recycle_or_free (vm, bm, buffers[i + 1], b1, follow_buffer_next);
+ recycle_or_free (vm, bm, buffers[i + 2], b2, follow_buffer_next);
+ recycle_or_free (vm, bm, buffers[i + 3], b3, follow_buffer_next);
+
+ i += 4;
+ }
- }
- }
+ while (i < n_buffers)
+ {
+ b0 = vlib_get_buffer (vm, buffers[i]);
+ VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b0);
+ recycle_or_free (vm, bm, buffers[i], b0, follow_buffer_next);
+ i++;
}
+
if (vec_len (bm->announce_list))
{
vlib_buffer_free_list_t *fl;
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248
################################################################################
###                          E N V I R O N M E N T                           ###
################################################################################

- type: "environment"

  spec-files:
    - "specifications/report/data_sets.yaml"
    - "specifications/report/layouts.yaml"
    - "specifications/report/elements.yaml"

  paths:
    # Top level directories:
    ## Working directory
    DIR[WORKING]: "_tmp"
    ## Build directories
    DIR[BUILD,HTML]: "_build"
    DIR[BUILD,LATEX]: "_build_latex"

    # Static .rst files
    DIR[RST]: "../../../docs/report"

    # Working directories
    ## Input data files (.zip, .xml)
    DIR[WORKING,DATA]: "{DIR[WORKING]}/data"
    ## Static source files from git
    DIR[WORKING,SRC]: "{DIR[WORKING]}/src"
    DIR[WORKING,SRC,STATIC]: "{DIR[WORKING,SRC]}/_static"

    # Static html content
    DIR[STATIC]: "{DIR[BUILD,HTML]}/_static"
    DIR[STATIC,VPP]: "{DIR[STATIC]}/vpp"
    DIR[STATIC,DPDK]: "{DIR[STATIC]}/dpdk"
    DIR[STATIC,TREX]: "{DIR[STATIC]}/trex"
    DIR[STATIC,ARCH]: "{DIR[STATIC]}/archive"

    # Detailed test results
    DIR[DTR]: "{DIR[WORKING,SRC]}/detailed_test_results"
    DIR[DTR,PERF,DPDK,2N,ICX]: "{DIR[DTR]}/dpdk_performance_results_2n_icx"
    DIR[DTR,PERF,DPDK,3N,ICX]: "{DIR[DTR]}/dpdk_performance_results_3n_icx"
    DIR[DTR,PERF,DPDK,3N,SKX]: "{DIR[DTR]}/dpdk_performance_results_3n_skx"
    DIR[DTR,PERF,DPDK,2N,SKX]: "{DIR[DTR]}/dpdk_performance_results_2n_skx"
    DIR[DTR,PERF,DPDK,2N,ZN2]: "{DIR[DTR]}/dpdk_performance_results_2n_zn2"
    DIR[DTR,PERF,DPDK,2N,CLX]: "{DIR[DTR]}/dpdk_performance_results_2n_clx"
    DIR[DTR,PERF,DPDK,2N,DNV]: "{DIR[DTR]}/dpdk_performance_results_2n_dnv"
    DIR[DTR,PERF,DPDK,3N,DNV]: "{DIR[DTR]}/dpdk_performance_results_3n_dnv"
    DIR[DTR,PERF,DPDK,3N,ALT]: "{DIR[DTR]}/dpdk_performance_results_3n_alt"
    DIR[DTR,PERF,DPDK,3N,TSH]: "{DIR[DTR]}/dpdk_performance_results_3n_tsh"
    DIR[DTR,PERF,DPDK,2N,TX2]: "{DIR[DTR]}/dpdk_performance_results_2n_tx2"
    DIR[DTR,PERF,TREX,2N,SKX]: "{DIR[DTR]}/trex_performance_results_2n_skx"
    DIR[DTR,PERF,VPP,ALL]: "{DIR[DTR]}/vpp_performance_results"
    DIR[DTR,PERF,VPP,3N,SKX]: "{DIR[DTR]}/vpp_performance_results_3n_skx"
    DIR[DTR,PERF,VPP,2N,SKX]: "{DIR[DTR]}/vpp_performance_results_2n_skx"
    DIR[DTR,PERF,VPP,2N,ZN2]: "{DIR[DTR]}/vpp_performance_results_2n_zn2"
    DIR[DTR,PERF,VPP,2N,CLX]: "{DIR[DTR]}/vpp_performance_results_2n_clx"
    DIR[DTR,PERF,VPP,2N,ICX]: "{DIR[DTR]}/vpp_performance_results_2n_icx"
    DIR[DTR,PERF,VPP,3N,ICX]: "{DIR[DTR]}/vpp_performance_results_3n_icx"
    DIR[DTR,PERF,VPP,3N,ALT]: "{DIR[DTR]}/vpp_performance_results_3n_alt"
    DIR[DTR,PERF,VPP,3N,TSH]: "{DIR[DTR]}/vpp_performance_results_3n_tsh"
    DIR[DTR,PERF,VPP,2N,TX2]: "{DIR[DTR]}/vpp_performance_results_2n_tx2"
    DIR[DTR,PERF,VPP,3N,DNV]: "{DIR[DTR]}/vpp_performance_results_3n_dnv"
    DIR[DTR,PERF,VPP,2N,DNV]: "{DIR[DTR]}/vpp_performance_results_2n_dnv"
    DIR[DTR,PERF,VPP,3N,AWS]: "{DIR[DTR]}/vpp_performance_results_3n_aws"
    DIR[DTR,PERF,VPP,2N,AWS]: "{DIR[DTR]}/vpp_performance_results_2n_aws"
    DIR[DTR,MRR,VPP,ALL]: "{DIR[DTR]}/vpp_mrr_results"
    DIR[DTR,MRR,VPP,3N,SKX]: "{DIR[DTR]}/vpp_mrr_results_3n_skx"
    DIR[DTR,MRR,VPP,2N,SKX]: "{DIR[DTR]}/vpp_mrr_results_2n_skx"
    DIR[DTR,MRR,VPP,2N,ZN2]: "{DIR[DTR]}/vpp_mrr_results_2n_zn2"
    DIR[DTR,MRR,VPP,2N,CLX]: "{DIR[DTR]}/vpp_mrr_results_2n_clx"
    DIR[DTR,MRR,VPP,2N,ICX]: "{DIR[DTR]}/vpp_mrr_results_2n_icx"
    DIR[DTR,MRR,VPP,3N,ICX]: "{DIR[DTR]}/vpp_mrr_results_3n_icx"
    DIR[DTR,MRR,VPP,3N,ALT]: "{DIR[DTR]}/vpp_mrr_results_3n_alt"
    DIR[DTR,MRR,VPP,3N,TSH]: "{DIR[DTR]}/vpp_mrr_results_3n_tsh"
    DIR[DTR,MRR,VPP,2N,TX2]: "{DIR[DTR]}/vpp_mrr_results_2n_tx2"
    DIR[DTR,MRR,VPP,3N,DNV]: "{DIR[DTR]}/vpp_mrr_results_3n_dnv"
    DIR[DTR,MRR,VPP,2N,DNV]: "{DIR[DTR]}/vpp_mrr_results_2n_dnv"
    DIR[DTR,MRR,VPP,3N,AWS]: "{DIR[DTR]}/vpp_mrr_results_3n_aws"
    DIR[DTR,MRR,VPP,2N,AWS]: "{DIR[DTR]}/vpp_mrr_results_2n_aws"
    DIR[DTR,FUNC,VPP,DEVICE,UBUNTU]: "{DIR[DTR]}/vpp_device_results_ubuntu"

    # Detailed test configurations
    DIR[DTC]: "{DIR[WORKING,SRC]}/test_configuration"
    DIR[DTC,PERF,VPP,ALL]: "{DIR[DTC]}/vpp_performance_configuration"
    DIR[DTC,PERF,VPP,3N,SKX]: "{DIR[DTC]}/vpp_performance_configuration_3n_skx"
    DIR[DTC,PERF,VPP,2N,SKX]: "{DIR[DTC]}/vpp_performance_configuration_2n_skx"
    DIR[DTC,PERF,VPP,2N,ZN2]: "{DIR[DTC]}/vpp_performance_configuration_2n_zn2"
    DIR[DTC,PERF,VPP,2N,CLX]: "{DIR[DTC]}/vpp_performance_configuration_2n_clx"
    DIR[DTC,PERF,VPP,2N,ICX]: "{DIR[DTC]}/vpp_performance_configuration_2n_icx"
    DIR[DTC,PERF,VPP,3N,ICX]: "{DIR[DTC]}/vpp_performance_configuration_3n_icx"
    DIR[DTC,PERF,VPP,3N,ALT]: "{DIR[DTC]}/vpp_performance_configuration_3n_alt"
    DIR[DTC,PERF,VPP,3N,TSH]: "{DIR[DTC]}/vpp_performance_configuration_3n_tsh"
    DIR[DTC,PERF,VPP,2N,TX2]: "{DIR[DTC]}/vpp_performance_configuration_2n_tx2"
    DIR[DTC,PERF,VPP,3N,DNV]: "{DIR[DTC]}/vpp_performance_configuration_3n_dnv"
    DIR[DTC,PERF,VPP,2N,DNV]: "{DIR[DTC]}/vpp_performance_configuration_2n_dnv"
    DIR[DTC,PERF,VPP,3N,AWS]: "{DIR[DTC]}/vpp_performance_configuration_3n_aws"
    DIR[DTC,PERF,VPP,2N,AWS]: "{DIR[DTC]}/vpp_performance_configuration_2n_aws"
    DIR[DTC,MRR,VPP,ALL]: "{DIR[DTC]}/vpp_mrr_configuration"
    DIR[DTC,MRR,VPP,3N,SKX]: "{DIR[DTC]}/vpp_mrr_configuration_3n_skx"
    DIR[DTC,MRR,VPP,2N,SKX]: "{DIR[DTC]}/vpp_mrr_configuration_2n_skx"
    DIR[DTC,MRR,VPP,2N,ZN2]: "{DIR[DTC]}/vpp_mrr_configuration_2n_zn2"
    DIR[DTC,MRR,VPP,2N,CLX]: "{DIR[DTC]}/vpp_mrr_configuration_2n_clx"
    DIR[DTC,MRR,VPP,2N,ICX]: "{DIR[DTC]}/vpp_mrr_configuration_2n_icx"
    DIR[DTC,MRR,VPP,3N,ICX]: "{DIR[DTC]}/vpp_mrr_configuration_3n_icx"
    DIR[DTC,MRR,VPP,3N,ALT]: "{DIR[DTC]}/vpp_mrr_configuration_3n_alt"
    DIR[DTC,MRR,VPP,3N,TSH]: "{DIR[DTC]}/vpp_mrr_configuration_3n_tsh"
    DIR[DTC,MRR,VPP,2N,TX2]: "{DIR[DTC]}/vpp_mrr_configuration_2n_tx2"
    DIR[DTC,MRR,VPP,3N,DNV]: "{DIR[DTC]}/vpp_mrr_configuration_3n_dnv"
    DIR[DTC,MRR,VPP,2N,DNV]: "{DIR[DTC]}/vpp_mrr_configuration_2n_dnv"
    DIR[DTC,MRR,VPP,3N,AWS]: "{DIR[DTC]}/vpp_mrr_configuration_3n_aws"
    DIR[DTC,MRR,VPP,2N,AWS]: "{DIR[DTC]}/vpp_mrr_configuration_2n_aws"
    DIR[DTC,FUNC,VPP,DEVICE,UBUNTU]: "{DIR[DTC]}/vpp_device_configuration_ubuntu"

    # Detailed tests operational data
    DIR[DTO]: "{DIR[WORKING,SRC]}/test_operational_data"
    DIR[DTO,PERF,VPP,ALL]: "{DIR[DTO]}/vpp_performance_operational_data"
    DIR[DTO,PERF,VPP,3N,SKX]: "{DIR[DTO]}/vpp_performance_operational_data_3n_skx"
    DIR[DTO,PERF,VPP,2N,SKX]: "{DIR[DTO]}/vpp_performance_operational_data_2n_skx"
    DIR[DTO,PERF,VPP,2N,ZN2]: "{DIR[DTO]}/vpp_performance_operational_data_2n_zn2"
    DIR[DTO,PERF,VPP,2N,CLX]: "{DIR[DTO]}/vpp_performance_operational_data_2n_clx"
    DIR[DTO,PERF,VPP,2N,ICX]: "{DIR[DTO]}/vpp_performance_operational_data_2n_icx"
    DIR[DTO,PERF,VPP,3N,ICX]: "{DIR[DTO]}/vpp_performance_operational_data_3n_icx"
    DIR[DTO,PERF,VPP,3N,ALT]: "{DIR[DTO]}/vpp_performance_operational_data_3n_alt"
    DIR[DTO,PERF,VPP,3N,TSH]: "{DIR[DTO]}/vpp_performance_operational_data_3n_tsh"
    DIR[DTO,PERF,VPP,2N,TX2]: "{DIR[DTO]}/vpp_performance_operational_data_2n_tx2"
    DIR[DTO,PERF,VPP,3N,DNV]: "{DIR[DTO]}/vpp_performance_operational_data_3n_dnv"
    DIR[DTO,PERF,VPP,2N,DNV]: "{DIR[DTO]}/vpp_performance_operational_data_2n_dnv"
    DIR[DTO,PERF,VPP,3N,AWS]: "{DIR[DTO]}/vpp_performance_operational_data_3n_aws"
    DIR[DTO,PERF,VPP,2N,AWS]: "{DIR[DTO]}/vpp_performance_operational_data_2n_aws"

    # Latencies:
    DIR[LAT,VPP]: "{DIR[WORKING,SRC]}/vpp_performance_tests/hdrh_packet_latency_by_percentile_graphs"
    DIR[LAT,DPDK]: "{DIR[WORKING,SRC]}/dpdk_performance_tests/hdrh_packet_latency_by_percentile_graphs"
    DIR[LAT,TREX]: "{DIR[WORKING,SRC]}/trex_performance_tests/hdrh_packet_latency_by_percentile_graphs"

    # .css patch file to fix tables generated by Sphinx
    DIR[CSS_PATCH_FILE]: "{DIR[STATIC]}/theme_overrides.css"
    DIR[CSS_PATCH_FILE2]: "{DIR[WORKING,SRC,STATIC]}/theme_overrides.css"

  # Data sources are used in this order:
  data-sources:
    # XML
    - type: "xml"
      url: "https://s3-logs.fd.io/vex-yul-rot-jenkins-1"
      path: "{job}/{build}/{filename}"
      file-name: "output_info.xml.gz"
      file-format: ".gz"
      enabled: True
    # XML from S3 docs
    - type: "xml-docs"
      url: "https://s3-docs.fd.io/csit"
      path: "report/_static/archive"
      file-name: "output_info.xml.gz"
      file-format: ".gz"
      enabled: True
    - type: "xml-docs"
      url: "https://s3-docs.fd.io/csit"
      path: "report/_static/archive"
      file-name: "output.xml.gz"
      file-format: ".gz"
      enabled: True

  archive-inputs: False

  mapping-file: ""

  ignore-list: ""

  make-dirs:
  # List the directories which are created while preparing the environment.
  # All directories MUST be defined in "paths" section.
    - "DIR[WORKING,DATA]"
    - "DIR[STATIC,VPP]"
    - "DIR[STATIC,DPDK]"
    - "DIR[STATIC,TREX]"
    - "DIR[STATIC,ARCH]"
    - "DIR[BUILD,LATEX]"
    - "DIR[WORKING,SRC]"
    - "DIR[WORKING,SRC,STATIC]"

  remove-dirs:
  # List the directories which are deleted while cleaning the environment.
  # All directories MUST be defined in "paths" section.
  #  - "DIR[BUILD,HTML]"
    - "DIR[WORKING,DATA]"

  build-dirs:
  # List the directories where the results (build) is stored.
  # All directories MUST be defined in "paths" section.
    - "DIR[BUILD,HTML]"
    - "DIR[BUILD,LATEX]"

  reverse-input: False  # Needed for trending, not important for the report

  limits:
    nic:
      x520: 24460000
      x553: 29761905
      x710: 35800000
      xxv710: 35800000
      xl710: 35800000
      cx556a: 148809523.81
      e810cq: 148809523.81
      e810xxv: 35800000

    link:
      10ge: 14880952.38
      25ge: 37202380.95
      40ge: 59523809.52
      100ge: 148809523.81

    pci:
      pci-g3-x8: 74404761.90
      pci-g3-x16: 148809523.81

  frequency:  # [GHz]
    2n-dnv: 2.000
    2n-clx: 2.300
    2n-icx: 2.600
    2n-skx: 2.500
    2n-zn2: 2.900
    3n-alt: 3.000
    3n-dnv: 2.000
    3n-icx: 2.600
    3n-skx: 2.500
    3n-tsh: 2.200

################################################################################
###                               S T A T I C                                ###
################################################################################

- type: "static"
  src-path: "{DIR[RST]}"
  dst-path: "{DIR[WORKING,SRC]}"

################################################################################
###                               O U T P U T                                ###
################################################################################

- type: "output"
  arch-file-format:
    - ".gz"
    - ".zip"
  output: "report"
  format:
    html:
      - full
    # pdf:
    #   - minimal