aboutsummaryrefslogtreecommitdiffstats
path: root/tox-requirements.txt
blob: 550fc1d3b374709fb48f9063f634745e04c5821c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright (c) 2022 Cisco and/or its affiliates.
# 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.

# Tox dependencies.
tox==3.25.1

# Other PIP freeze dependencies.
distlib==0.3.4
filelock==3.7.1
packaging==21.3
platformdirs==2.5.2
pluggy==1.0.0
pyparsing==3.0.9
py==1.11.0
six==1.16.0
toml==0.10.2
virtualenv==20.15.1
n>void *v_old, uword n_new_elts, uword elt_bytes) { void *v_new, *end, *head; uword n_old_elts, header_bytes; uword n_copy_bytes, n_zero_bytes; clib_fifo_header_t *f_new, *f_old; n_old_elts = clib_fifo_elts (v_old); n_new_elts += n_old_elts; if (n_new_elts < 32) n_new_elts = 32; else n_new_elts = max_pow2 (n_new_elts); header_bytes = vec_header_bytes (sizeof (clib_fifo_header_t)); v_new = clib_mem_alloc_no_fail (n_new_elts * elt_bytes + header_bytes); v_new += header_bytes; f_new = clib_fifo_header (v_new); f_new->head_index = 0; f_new->tail_index = n_old_elts; _vec_len (v_new) = n_new_elts; /* Copy old -> new. */ n_copy_bytes = n_old_elts * elt_bytes; if (n_copy_bytes > 0) { f_old = clib_fifo_header (v_old); end = v_old + _vec_len (v_old) * elt_bytes; head = v_old + f_old->head_index * elt_bytes; if (head + n_copy_bytes >= end) { uword n = end - head; clib_memcpy_fast (v_new, head, n); clib_memcpy_fast (v_new + n, v_old, n_copy_bytes - n); } else clib_memcpy_fast (v_new, head, n_copy_bytes); } /* Zero empty space. */ n_zero_bytes = (n_new_elts - n_old_elts) * elt_bytes; clib_memset (v_new + n_copy_bytes, 0, n_zero_bytes); clib_fifo_free (v_old); return v_new; } /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */