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
465800ae
Commit
465800ae
authored
Jul 14, 2021
by
wangyongshou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add config_upf
parent
d2ac6c9a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
116 additions
and
0 deletions
+116
-0
scripts/build_upf.sh
scripts/build_upf.sh
+14
-0
scripts/config_upf.sh
scripts/config_upf.sh
+102
-0
No files found.
scripts/build_upf.sh
View file @
465800ae
...
...
@@ -33,6 +33,18 @@ function pre_create(){
if
[
!
-d
$UPFINSTALL
/scripts
]
;
then
sudo mkdir
-p
$UPFINSTALL
/scripts
fi
if
[
!
-d
$UPFINSTALL
/tools
]
;
then
sudo mkdir
-p
$UPFINSTALL
/tools
cp
-f
/sbin/ethtool
$UPFINSTALL
/tools
fi
}
function
config_file
(){
cp
$configure
/template/
*
$UPFINSTALL
/etc
}
function
pre_install
(){
...
...
@@ -212,6 +224,7 @@ function main() {
;;
--all-dp
)
pre_create
config_file
make_n4_package
make_vpp_package debug
shift
;
...
...
@@ -227,6 +240,7 @@ function main() {
shift
;
;;
--n4-dp
|
--vpp-debug-pkg
)
config_file
pre_create
make_n4_package
shift
;
...
...
scripts/config_upf.sh
0 → 100755
View file @
465800ae
#!/bin/bash
#vpp config
UPF_N3_NAME
=
""
UPF_N6_NAME
=
""
UPF_N3_IP
=
""
UPF_N6_IP
=
""
UPF_N3_PCI
=
""
UPF_N6_PCI
=
""
UPF_N3_GW
=
""
UPF_N6_GW
=
""
UPF_CPU
=
""
#u4 config
UPF_N4_SMF
=
""
UPF_N4_UPF
=
""
UPF_N4_LOGSIZE
=
""
UPF_INTER_IP
=
""
UPF_INTER_PCI
=
""
function
get_inter_ip
(){
INTER_NAME
=
$1
#RES=$(echo "ifconfig $INTER_NAME |grep inet| sed -n '1p'|awk '{print $2}'")
UPF_INTER_IP
=
$(
echo
`
ifconfig
${
INTER_NAME
}
|
grep
inet |
sed
-n
'1p'
|
awk
'{print $2}'
`
)
}
function
get_inter_pci
()
{
INTER_NAME
=
$1
UPF_INTER_PCI
=
$(
echo
`
ethtool
-i
${
INTER_NAME
}
|
grep
"bus-info"
|
awk
'{print $2}'
`
)
#UPF_INTER_PCI=$(echo ` ./dpdk-devbind.py --status | grep "if=${INTER_NAME}" | awk '{print $1}'`)
}
function
generate_instance
(){
echo
"generate_instance"
#sed s/@N3_GW@/${N3_GW_IP}/ ./startup_debug.conf > /dev/null 2>&1;
}
#read upf.txt
function
read_config
()
{
while
read
line
do
eval
"
$line
"
done
< upf.txt
echo
"vpp config"
UPF_N3_NAME
=
$vpp_n3_name
echo
"vpp_n3_name:
$UPF_N3_NAME
"
UPF_N6_NAME
=
$vpp_n6_name
echo
"vpp_n6_name:
$UPF_N6_NAME
"
UPF_N3_IP
=
$vpp_n3_ip
echo
"UPF_N3_IP:
$UPF_N3_IP
"
UPF_N6_IP
=
$vpp_n6_ip
echo
"UPF_N6_IP:
$UPF_N6_IP
"
UPF_N3_GW
=
$vpp_n3_gw
echo
"vpp_n6_gw:
$UPF_N3_GW
"
UPF_N6_GW
=
$vpp_n6_gw
echo
"vpp_n6_gw:
$UPF_N6_GW
"
UPF_CPU
=
$vpp_cpu
echo
"vpp_cpu:
$UPF_CPU
"
get_inter_pci
$UPF_N3_NAME
UPF_N3_PCI
=
$UPF_INTER_PCI
echo
"UPF_N3_PCI:
$UPF_N3_PCI
"
UPF_INTER_PCI
=
""
get_inter_pci
$UPF_N6_NAME
UPF_N6_PCI
=
$UPF_INTER_PCI
echo
"UPF_N6_PCI:
$UPF_N6_PCI
"
echo
""
echo
"n4 config"
UPF_N4_SMF
=
$n4_smf
echo
"n4_smf:
$UPF_N4_SMF
"
UPF_N4_UPF
=
$n4_upf
echo
"n4_upf:
$UPF_N4_UPF
"
UPF_N4_LOGSIZE
=
$n4_logSize
echo
"n4_logSize:
$UPF_N4_LOGSIZE
"
}
function
main
()
{
read_config
generate_instance
}
main
"
$@
"
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