Merge "Add debian package for pf-bb-config"

This commit is contained in:
Zuul 2021-11-18 19:45:25 +00:00 committed by Gerrit Code Review
commit 4a098ccd32
10 changed files with 263 additions and 0 deletions

View File

@ -0,0 +1,5 @@
pf-bb-config (21.6) UNRELEASED; urgency=low
* Initial release
-- <> Wed, 21 Apr 2021 05:41:49 +0000

View File

@ -0,0 +1,33 @@
# Copyright (c) 2021 Wind River Systems, Inc.
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. The ASF licenses this
# file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
Source: pf-bb-config
Section: admin
Priority: optional
Maintainer: Starlingx Developers <starlingx-discuss@lists.starlingx.io>
Build-Depends: debhelper-compat (= 13), libinih-dev
Standards-Version: 4.5.0
Homepage: https://www.starlingx.io
Package: pf-bb-config
Architecture: any
Multi-Arch: foreign
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: The PF BBDEV (baseband device) Configuration Application "pf_bb_config"
provides a means to configure the baseband device at the host-level. The program
accesses the configuration space and sets the various parameters through memory-mapped
IO read/writes.

View File

@ -0,0 +1,60 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: pf-bb
Upstream-Contact: https://github.com/intel
Source: https://github.com/intel/pf-bb-config
Files: acc100/acc100_cfg_app.c
acc100/acc100_cfg_app.h
acc100/acc100_cfg_parser.c
acc100/acc100_pf_enum.h
config_app.c
fpga_5gnr/fpga_5gnr_cfg_app.c
fpga_5gnr/fpga_5gnr_cfg_app.h
fpga_5gnr/fpga_5gnr_cfg_parser.c
fpga_lte/fpga_lte_cfg_app.c
fpga_lte/fpga_lte_cfg_app.h
fpga_lte/fpga_lte_cfg_parser.c
README.md
acc100/acc100_config_4g.cfg
acc100/acc100_config_5g.cfg
acc100/acc100_config_pf.cfg
acc100/acc100_config_vf.cfg
acc100/acc100_config_vf_4g.cfg
acc100/acc100_config_vf_5g.cfg
fpga_5gnr/fpga_5gnr_config.cfg
fpga_5gnr/fpga_5gnr_config_vf.cfg
fpga_lte/fpga_lte_config.cfg
fpga_lte/fpga_lte_config_vf.cfg
Makefile
Copyright: 2020 Intel.
License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian systems, the complete text of the Apache License Version 2.0
can be found in `/usr/share/common-licenses/Apache-2.0'.
Files: bsd-3-clause.txt
Copyright: __NO_COPYRIGHT__ in: bsd-3-clause.txt
License: BSD-3-Clause
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
.
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.
On Debian systems, the complete text of the BSD 3-clause "New" or "Revised"
License can be found in `/usr/share/common-licenses/BSD'.

View File

@ -0,0 +1,31 @@
From a362668ac7ca891974c3b5b50c983471e1dfab02 Mon Sep 17 00:00:00 2001
From: Douglas Henrique Koerich <douglashenrique.koerich@windriver.com>
Date: Wed, 18 Aug 2021 12:19:16 -0400
Subject: [PATCH] Customize fpga_5gnr config for 1 VF
Change distribution of UL/DL queues to be used by one VF only.
Signed-off-by: Douglas Henrique Koerich <douglashenrique.koerich@windriver.com>
---
fpga_5gnr/fpga_5gnr_config_vf.cfg | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fpga_5gnr/fpga_5gnr_config_vf.cfg b/fpga_5gnr/fpga_5gnr_config_vf.cfg
index 0a82f52..81aa3bb 100644
--- a/fpga_5gnr/fpga_5gnr_config_vf.cfg
+++ b/fpga_5gnr/fpga_5gnr_config_vf.cfg
@@ -7,9 +7,9 @@ pf_mode_en = 0
[UL]
bandwidth = 3
load_balance = 128
-vfqmap = 16,16,0,0,0,0,0,0
+vfqmap = 32,0,0,0,0,0,0,0
[DL]
bandwidth = 3
load_balance = 128
-vfqmap = 16,16,0,0,0,0,0,0
+vfqmap = 32,0,0,0,0,0,0,0
--
2.29.2

View File

@ -0,0 +1,49 @@
From 9d2809308feb10bc74130cea0b677be0bbe3f2dd Mon Sep 17 00:00:00 2001
From: Douglas Henrique Koerich <douglashenrique.koerich@windriver.com>
Date: Tue, 27 Jul 2021 12:31:45 -0400
Subject: [PATCH] Fix: check return of configure_device()
Takes the result of configure_device() as the return code of the
application, allowing any script running pf-bb-config to stop on
bad device configuration.
Signed-off-by: Douglas Henrique Koerich <douglashenrique.koerich@windriver.com>
---
config_app.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/config_app.c b/config_app.c
index f1aa52b..f6dab5e 100644
--- a/config_app.c
+++ b/config_app.c
@@ -390,20 +390,24 @@ main(int argc, char *argv[])
return -1;
}
+ ret = 0;
if (device.config_all) {
for (i = 0; i < num_devices; i++) {
strncpy(device.pci_address, found_devices[i],
sizeof(device.pci_address) - NULL_PAD);
- configure_device(&device);
+ ret = configure_device(&device);
+ if (ret != 0) {
+ break;
+ }
}
} else {
select_device(&device, found_devices, num_devices);
- configure_device(&device);
+ ret = configure_device(&device);
}
/* Free memory for stored PCI slots */
for (i = 0; i < num_devices; i++)
free(found_devices[i]);
- return 0;
+ return ret;
}
--
2.29.2

View File

@ -0,0 +1,48 @@
From 8ac364315c153e546fbae9dd63c562b9a1e42d82 Mon Sep 17 00:00:00 2001
From: Babak Sarashki <Babak.SarAshki@windriver.com>
Date: Sun, 24 Jan 2021 13:46:20 -0500
Subject: [PATCH] Reject device configuration if not enabled
Signed-off-by: Babak Sarashki <Babak.SarAshki@windriver.com>
---
config_app.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/config_app.c b/config_app.c
index fdad259..f1aa52b 100644
--- a/config_app.c
+++ b/config_app.c
@@ -114,6 +114,7 @@ static bool
get_device_id(hw_device *device, const char *location)
{
unsigned long vendor_id = -1, device_id = -1;
+ unsigned int device_enabled = 0;
struct dirent *dirent;
DIR *dir;
char pci_path[PATH_MAX];
@@ -139,6 +140,12 @@ get_device_id(hw_device *device, const char *location)
snprintf(file_path, sizeof(file_path), "%s/%s",
pci_path, dirent->d_name);
+ /* Is device enabled? */
+ if (strncmp(dirent->d_name, "enable",
+ strlen(dirent->d_name)) == 0 &&
+ dirent->d_type == DT_REG)
+ device_enabled = get_file_val(file_path);
+
/* Get Device ID */
if (strncmp(dirent->d_name, DEVICE_FILE,
strlen(dirent->d_name)) == 0 &&
@@ -154,7 +161,8 @@ get_device_id(hw_device *device, const char *location)
closedir(dir);
/* Check if device is found */
- return (vendor_id == device->vendor_id &&
+ return (device_enabled &&
+ vendor_id == device->vendor_id &&
device_id == device->device_id);
}
--
2.29.2

View File

@ -0,0 +1,3 @@
Reject-device-configuration-if-not-enabled.patch
Fix-check-return-of-configure_device.patch
Customize-fpga_5gnr-config-for-1-VF.patch

View File

@ -0,0 +1,24 @@
#!/usr/bin/make -f
#
# Copyright (c) 2021 Wind River Systems, Inc.
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. The ASF licenses this
# file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
#export DH_VERBOSE = 1
%:
dh $@

View File

@ -0,0 +1 @@
3.0 (native)

View File

@ -0,0 +1,9 @@
---
debver: 21.6
dl_path:
name: pf-bb-config-21.6.tar.gz
url: https://github.com/intel/pf-bb-config/archive/refs/tags/v21.6.tar.gz
md5sum: c2269025d0060565147971cf86cdbb3c
revision:
dist: $STX_DIST
PKG_GITREVCOUNT: true