Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Fixes #525
Open
Fixes #525
Conversation
The function always check if 'n' is not NULL before calling pg_brick_dot_add. So, I've move the check of 'n' in pg_brick_dot_add which enable code removal. Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
1: use &~ instead or ^ to unset mac, because if we xor on an alerady unser mac xor will set other variables 2: add a comment about how an UB can be ignored 3: use vilatile for 2 variables in mac-table-it-next.h: there is this loop: for (;i < PG_MAC_TABLE_MASK_SIZE ; m0 = ma->mask[i]) it seems gcc find it smart to unroll it, and not checking properly the condition. (may be an UB somewhere, hope not) doing so, without volatile it seems i can be > to PG_MAC_TABLE_MASK_SIZE which lead to overflow. 4: move ++i out of the loop, because otherwise it can access an space which is undefined Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
| @@ -270,7 +270,7 @@ var_add GLIB_HEADERS "$(pkg-config --cflags glib-2.0)" | |||
| var_add GLIB_LIBS "$(pkg-config --libs glib-2.0)" | |||
| var_add PG_MARCH "core-avx-i" | |||
| var_add PREFIX "/usr/local/" | |||
| var_add EXTRA_CFLAGS "" | |||
| var_add EXTRA_CFLAGS "-g -O2" | |||
outscale-fne
Feb 19, 2020
Contributor
The flag -g is for debugging purpose right? Maybe we should remove it... (I don't now about the -02...)
The flag -g is for debugging purpose right? Maybe we should remove it... (I don't now about the -02...)
outscale-mgo
Mar 16, 2020
Author
Contributor
maybe,
I've use that as default flag because that the default flag on autotool
also, I like debug symbols by default, size doesn't matter that much, debug-ability does
maybe,
I've use that as default flag because that the default flag on autotool
also, I like debug symbols by default, size doesn't matter that much, debug-ability does
it's the default with autotool, and a better default that no optimisaion nor debug symboles. Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
Until recently packetgraph version was hardcoded in the Makefile,
and we had no way to ghet the version in C.
It's now resolve by adding 4 define in "common.h"
those defines are:
PG_VERSION_YEAR: year of last DPDK release on which packetgraph is bases
PG_VERSION_MONTH: month of DPDK release
PG_VERSION_REVISION: number of revisions on the release
PG_VERSION: number containing all information above
As we need to got thoses informations for the linker in the makefile,
we are compiling an intermediate program in the configure that ghenerate a
version.mk which is then use in the makefile.
So we are now generating a libpacketgraph.so.19.2.0 instead of
libpacketgraph.so.17.5.0.
Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
change default optimisation of build system
fix a buffer overflow due to a strange behaviour of gcc
small clean of code in pg_brick_dot
Fix versioning