Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix 20240919 #997

Merged
merged 2 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions scripts/dpdk-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ dpdkver=20.11.10 # default dpdk version (use stable v
tarball=dpdk-${dpdkver}.tar.xz
srcdir=dpdk-stable-$dpdkver

workdir=$(pwd)/dpdk # default work directory
patchdir=$(pwd)/patch/dpdk-stable-$dpdkver # default dpdk patch directory

workdir=""
patchdir=""

function help()
{
Expand All @@ -23,6 +22,13 @@ function help()
echo -e "\033[31m -p specify the dpdk patch directory, default $(pwd)/patch/dpdk-stable-$dpdkver\033[0m"
}

function set_dpdk_version()
{
dpdkver=$1
tarball=dpdk-${dpdkver}.tar.xz
srcdir=dpdk-stable-$dpdkver
}

function set_work_directory()
{
[ ! -d $1 ] && return 1
Expand All @@ -38,14 +44,17 @@ function set_patch_directory()
## parse args
while getopts "hw:p:dv:" OPT; do
case $OPT in
v) dpdkver=$OPTARG;;
v) set_dpdk_version $OPTARG;;
w) set_work_directory $OPTARG ;;
p) set_patch_directory $OPTARG;;
d) build_options="${build_options} ${debug_options}";;
?) help && exit 1;;
esac
done

[ -z "$workdir" ] && workdir=$(pwd)/dpdk # use default work directory
[ -z "$patchdir" ] && patchdir=$(pwd)/patch/dpdk-stable-$dpdkver # use default dpdk patch directory

[ ! -d $workdir ] && mkdir $workdir
echo -e "\033[32mwork directory: $workdir\033[0m"

Expand Down
3 changes: 2 additions & 1 deletion src/VERSION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
# program: dpvs
# Sep 13, 2024 #
# Sep 19, 2024 #
##
# Features
# - dpvs: Support QUIC/HTTP3, add nginx patches and facilitating code snippets for use of quic.
Expand All @@ -22,6 +22,7 @@
# - dpvs: Fix segmentation fault problem when running on machines whose cpu number is over DPVS_MAX_LCORE.
# - dpvs: Refactor netif_rte_port_alloc with netif_alloc.
# - dpvs: Fix prolems in IPv6 all-nodes and all-routers address initialization.
# - dpvs: Fix memory corruption problem when retrieving nic's xstats.
# - tools: Fix concurrency racing problem when dpvs-agent and healthcheck changing rs simultaneously.
# - tools: Fix healthchech bad icmp checksum problem ocasionally appeared in udp and udpping checkers.
# - tools: Fix keepalived quorum up script not excuted problem when old rs removed and new ones added in a reload.
Expand Down
2 changes: 1 addition & 1 deletion src/netif.c
Original file line number Diff line number Diff line change
Expand Up @@ -3371,7 +3371,7 @@ static int netif_op_get_xstats(struct netif_port *dev, netif_nic_xstats_get_t **
if (nentries < 0)
return EDPVS_DPDKAPIFAIL;

get = rte_calloc("xstats_get", 1, nentries * sizeof(struct netif_nic_xstats_entry), 0);
get = rte_calloc("xstats_get", 1, sizeof(*get) + nentries * sizeof(struct netif_nic_xstats_entry), 0);
if (unlikely(!get))
return EDPVS_NOMEM;
xstats = rte_calloc("xstats", 1, nentries * sizeof(struct rte_eth_xstat), 0);
Expand Down
Loading