Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-UPF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-UPF
Commits
3e69b6db
Commit
3e69b6db
authored
Jul 19, 2021
by
wangyongshou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add run upf function
parent
a958c891
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
336 additions
and
181 deletions
+336
-181
etc/template/vppe.conf
etc/template/vppe.conf
+2
-2
scripts/build_upf.sh
scripts/build_upf.sh
+14
-7
scripts/install_upf.sh
scripts/install_upf.sh
+32
-3
scripts/new_run_upf.sh
scripts/new_run_upf.sh
+288
-169
No files found.
etc/template/vppe.conf
View file @
3e69b6db
unix
{
nodaemon
#
nodaemon
log
/
var
/
log
/
upf
/
vpp
/
vpp
.
log
full
-
coredump
interactive
#
interactive
gid
vpp
cli
-
listen
/
run
/
vpp
/
cli
.
sock
logsize
100
...
...
scripts/build_upf.sh
View file @
3e69b6db
...
...
@@ -50,9 +50,9 @@ function pre_create(){
function
config_file
(){
#scripts
cp
-f
$current
/
config_upf.sh
$UPFINSTALL
/scripts
cp
-f
$current
/
dpdk-devbind.py
$UPFINSTALL
/scripts
cp
-f
$current
/install_upf.sh
$UPFINSTALL
/scripts
cp
-f
$current
/
run_upf.sh
$UPFINSTALL
/scripts
cp
-f
$current
/
new_run_upf.sh
$UPFINSTALL
/scripts
#etc
cp
-f
$configure
/template/n4_config.yaml
$UPFINSTALL
/etc
...
...
@@ -61,6 +61,7 @@ function config_file(){
#tools
cp
-f
/sbin/ethtool
$UPFINSTALL
/tools
cp
-f
$base
/plugin/interreput
$UPFINSTALL
/tools
}
function
make_pkg
(){
...
...
@@ -216,8 +217,8 @@ function help()
echo
"--pre_install Pre-installation of dependencies required by UPF"
echo
"--vpp Build vpp"
echo
"--n4 Build N4"
echo
"--c Remove files generated by previous compilation
\n
"
echo
"--
all
-dp Build n4 and vppe,make pkg"
echo
"--c Remove files generated by previous compilation"
echo
"--
upf
-dp Build n4 and vppe,make pkg"
echo
"--vppe-dp Build vppe, make pkg"
echo
"--vppe-rp Release vppe, make pkg"
echo
"--n4-dp Build n4, make pkg"
...
...
@@ -247,7 +248,7 @@ function main() {
vpp
shift
;;
--
all
-dp
)
--
upf
-dp
)
pre_create
config_file
make_n4_package
...
...
@@ -255,13 +256,13 @@ function main() {
make_pkg
shift
;
;;
--vpp-dp
|
--vpp-debug-pkg
)
--vpp
e
-dp
|
--vpp-debug-pkg
)
pre_create
config_file
make_vpp_package debug
shift
;
;;
--vpp-rp
|
--vpp-release-pkg
)
--vpp
e
-rp
|
--vpp-release-pkg
)
pre_create
config_file
make_vpp_package release
...
...
@@ -281,6 +282,12 @@ function main() {
clear_all
shift
;;
*
)
help
exit
0
shift
;;
esac
done
exit
0
...
...
scripts/install_upf.sh
View file @
3e69b6db
...
...
@@ -10,7 +10,8 @@
current
=
"
$PWD
"
base
=
$(
dirname
"
$PWD
"
)
ROOT_PATH
=
/opt/5gc/test
VPP_PRO
=
"vpp"
N4_PRO
=
"main"
function
pre_install
()
{
if
[
!
-d
$ROOT_PATH
]
;
then
...
...
@@ -68,11 +69,31 @@ function install_bupt_vppe ()
return
0
}
function
close_upf
()
{
pid
=
$(
pidof
$VPP_PRO
)
if
test
-z
"
$pid
"
;
then
echo
"vpp
$pid
is not startup"
else
echo
"kill vpp
$pid
"
kill
-9
${
pid
}
fi
pid
=
$(
pidof
$N4_PRO
)
if
test
-z
"
$pid
"
;
then
echo
"n4
$pid
is not startup"
else
echo
"kill n4
$pid
"
kill
-9
${
pid
}
fi
}
function
help
()
{
echo
"help---"
echo
"Usage: install_upf [OPTION]..."
echo
"--
all
pkg(bupt_vppe.tar.gz, bupt_n4.tar.gz) install vppe n4"
echo
"--
upf
pkg(bupt_vppe.tar.gz, bupt_n4.tar.gz) install vppe n4"
echo
"--vppe pkg(bupt_vppe.tar.gz) install vpp"
echo
"--n4 pkg(bupt_n4.tar.gz) install N4"
}
...
...
@@ -86,22 +107,30 @@ function main() {
until
[
-z
"
$1
"
]
;
do
case
"
$1
"
in
--
all
)
--
upf
)
pre_install
close_upf
install_bupt_n4
install_bupt_vppe
shift
;;
--vpp
)
pre_install
close_upf
install_bupt_vppe
shift
;;
--n4
)
pre_install
close_upf
install_bupt_n4
shift
;;
*
)
help
exit
0
;;
esac
done
exit
0
...
...
scripts/new_run_upf.sh
View file @
3e69b6db
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment