summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/unix-formats.c
AgeCommit message (Collapse)AuthorFilesLines
2022-01-16vppinfra: bitops cleanupDamjan Marion1-1/+0
Type: refactor Change-Id: I7fa113e924640f9d798c1eb6ae64b9c0a9e2104c Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-18vppinfra: remove outdated and unused unix format functionsDamjan Marion1-479/+0
Type: refactor Change-Id: If1772980dbdbde1fbf3d1989daa40599e9f23e8c Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-18vppinfra: remove linux/syscall.hDamjan Marion1-2/+0
For portabiliy reasons it is better to have all wrapped in clib code. I.e. instead of using getcpu() we have clib_get_current_numa_node () and clib_get_current_cpu_id(). Type: refactor Change-Id: I29b52d7f29bc7f93873402c4070561f564b71c63 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-04vppinfra: fix compiling error due to incompatible udphdr field namesJieqiang Wang1-6/+3
Compiling VPP on CentOS 7 will fail shown as below. The root cause is that uh_sport/uh_dport field names for struct udphdr are chosen only if macro __FAVOR_BSD in /usr/include/netinet/udp.h is defined for glibc version less than 2.19. Fix this issue by using source and dest field names in struct udphdr for compatibility reasons. FAILED: vppinfra/CMakeFiles/vppinfra.dir/unix-formats.c.o ccache /opt/rh/devtoolset-9/root/bin/cc -Dvppinfra_EXPORTS -I/vpp/src -I. -Iinclude -Wno-address-of-packed-member -g -fPIC -Werror -Wall -march=corei7 -mtune=corei7-avx -O2 -fstack-protector -D_FORTIFY_SOURCE=2 -fno-common -flto -fno-fat-lto-objects -fPIC -fvisibility=hidden -ffunction-sections -fdata-sections -MD -MT vppinfra/CMakeFiles/vppinfra.dir/unix-formats.c.o -MF vppinfra/CMakeFiles/vppinfra.dir/unix-formats.c.o.d -o vppinfra/CMakeFiles/vppinfra.dir/unix-formats.c.o -c /vpp/src/vppinfra/unix-formats.c /vpp/src/vppinfra/unix-formats.c: In function 'format_udp4_packet': /vpp/src/vppinfra/unix-formats.c:319:19: error: 'struct udphdr' has no member named 'uh_sport' 319 | u16 source = udp->uh_sport; | ^~ /vpp/src/vppinfra/unix-formats.c:320:17: error: 'struct udphdr' has no member named 'uh_dport' 320 | u16 dest = udp->uh_dport; Type: fix Change-Id: Ifc99c7286ea3fac463096152267033ac0518c230 Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com> Reviewed-by: Lijian Zhang <lijian.zhang@arm.com> Reviewed-by: Tianyu Li <tianyu.li@arm.com>
2021-01-21vppinfra: ensure _GNU_SOURCE is presentNathan Moos1-6/+7
Type: fix When building with musl, _GNU_SOURCE is required to be defined in more places. This patch defines it in those required places. Additionally, this patch changes the udphdr field names to the standard names. Change-Id: I0fec54214ccc8458289176488afb4218761e9d51 Signed-off-by: Nathan Moos <nmoos@cisco.com>
2020-10-17vppinfra: explicitly export symbolsDamjan Marion1-1/+1
Type: improvement Change-Id: I57a9f85f7df1fc48656b72592349f4c544302f77 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-06vppinfra: add heap header in front of dlmalloc spaceDamjan Marion1-62/+0
This patch adds smal header in front of dlmalloc space, and it stores some additional information about the heap. Immediate benefit of this patch is that we know the underlying page size si we can display heap page statistics / real memory usage. Type: improvement Change-Id: Ibd6989cc2f2f64630ab08734c9552e15029c5f3f Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-05-10zero-pad date string output.Paul Vinciguerra1-2/+2
2019/ 5/ 9 21:18:01:710 notice -> 2019/05/09 21:18:01:710 notice Change-Id: I8ed932a0d6f5e6ce29ab6428f0f01221d0a6ae34 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-09-03Compile vppinfra on macOSDamjan Marion1-0/+10
Add missing calls to clib_mem_init to vppinfra test codes. Change-Id: I53ffc6fc287d1a378065bb86c18b6e995ecdb775 Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-02Add per-numa page allocation info to 'show memory'Damjan Marion1-0/+63
Change-Id: I64e4e3d68c0f3958323f30b12a26cfaafa8bad85 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-10-04[aarch64] Fixes CLI crashes on dpaa2 platform.Christophe Fontaine1-1/+1
- always use 'va_args' as pointer in all format_* functions - u32 for all 'indent' params as it's declaration was inconsistent Change-Id: Ic5799309a6b104c9b50fec309cba789c8da99e79 Signed-off-by: Christophe Fontaine <christophe.fontaine@enea.com>
2017-09-19format_sockaddr: add trivial support for AF_LOCAL socketsDave Barach1-0/+12
There isn't anything useful to print. Return a unique name since the unix cli uses the returned string to create a node name. Node names must be unique, or vpp will quit abruptly. Change-Id: I8f85ae8fececdbfd26c729bc32c2c2007c06d1ea Signed-off-by: Dave Barach <dave@barachs.net>
2017-06-21Add knob to specify effective group id (gid) for VPP processDamjan Marion1-0/+26
Change-Id: Icf9bd4abda058fb380f1a25d5fe3917ffb38b1c4 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+918
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>