2016年11月16日 星期三

Setting PCIe MPS/MRRS with setpci

setpci(8): configure PCI devices - Linux man page
https://linux.die.net/man/8/setpci

PCI express maximal payload size: Finding it and its impact on bandwidth
http://billauer.co.il/blog/2011/05/pcie-pci-express-linux-max-payload-size-configuration-capabilities-tlp-lspci/

Intel Ethernet Drivers and Utilities / Mailing Lists
https://sourceforge.net/p/e1000/mailman/message/30249072/

Intel PCI Express base 1.0 spec.pdf
http://teacher.en.rmutt.ac.th/ktw/MicroProcessor/buses/Intel%20PCI%20Express%20base%201.0%20spec.pdf
p337, ch7.8.3. Device Capabilities Register (Offset 04)
p341, ch7.8.4. Device Control Register (Offset 08h)

dev=0002:01:02.2

setpci --dumpregs

setpci -v -s $dev CAP_EXP.l
#display the first 4-byte of CAP_EXP...
for a in $(lspci | cut -d' ' -f1 ); do echo $a ----; --;setpci -v -s $a CAP_EXP.l 2>&1 ; done | less

#Show Device Capabilities Register
setpci -v -s $dev CAP_EXP+4.l
#Show Device Control Register
setpci -v -s $dev CAP_EXP+8.l

#Set value to Device Control Register 
setpci -v -s $dev CAP_EXP+8.l=aabbccdd

2016年11月9日 星期三

btrfs


Installing btrfs as boot drive on Ubuntu 14.04 - James DiGioia
http://jamesdigioia.com/installing-btrfs-boot-drive-ubuntu-14-04/

btrfs - Community Help Wiki
https://help.ubuntu.com/community/btrfs#Converting_Ubuntu_12.10_ext4_root_filesystem

How to Create and Manage Btrfs Snapshots and Rollbacks on Linux (part 2) | Linux.com | The source for Linux information
https://www.linux.com/learn/how-create-and-manage-btrfs-snapshots-and-rollbacks-linux-part-2

How to Manage Btrfs Storage Pools, Subvolumes And Snapshots on Linux (part 1) | Linux.com | The source for Linux information
https://www.linux.com/learn/how-manage-btrfs-storage-pools-subvolumes-and-snapshots-linux-part-1

2016年11月1日 星期二

MCORD: No module named translator.toscalib.tosca_template

CORD build info is in here:
http://mkl-note.blogspot.com/2016/10/cord-in-box-quick-start-guide-target.html
https://gerrit.opencord.org/vBBU faab9e27521d0c2cdf34c36cd99b6327760d56eb
https://gerrit.opencord.org/vPGWC faab9e27521d0c2cdf34c36cd99b6327760d56eb

M-CORD Developer Environment - CORD - CORD Wiki
https://wiki.opencord.org/display/CORD/M-CORD+Developer+Environment

The following error occurs when building MCORD step "make xos":
    ImportError: No module named translator.toscalib.tosca_template

bash /home/ubuntu/service-profile/common/wait_for_xos_port.sh 80
Waiting for XOS to start listening on port 80
.......................XOS is ready
[PODCONFIG]
python /home/ubuntu/service-profile/common/run_tosca.py 80 padmin@vicci.org letmein setup.yaml
ERR: recieved status 500
Traceback (most recent call last):
  File "/opt/xos/api/utility/toscaapi.py", line 43, in post_run
    from tosca.engine import XOSTosca
  File "/opt/xos/tosca/engine.py", line 3, in
    import resources
  File "/opt/xos/tosca/resources/__init__.py", line 27, in
    module = __import__(fn[:-3])
  File "/opt/xos/tosca/resources/VPGWCComponent.py", line 6, in
    from translator.toscalib.tosca_template import ToscaTemplate
ImportError: No module named translator.toscalib.tosca_template
According to the following, the TOSCA parser is updated, but most of the import
is unnecessary. This patch remove those unnecessary import.

XOS Service Developers - please review imports in xos/tosca/resources/*.py - Google Groups
https://groups.google.com/a/opencord.org/forum/#!msg/cord-dev/eIemZc-BuUk/MhzlDuIhBQAJ
TOSCA parser in XOS core will be updated, and many services unnecessarily import the old TOSCA parser (along with other unneeded imports) in a way that will break your service after this update is merged.

Remove the line import ToscaTemplate from the following 4 files:
  1. vBBU/xos/tosca/resources/mcordservice.py
  2. vBBU/xos/tosca/resources/vbbucomponent.py
  3. vPGWC/xos/tosca/resources/VPGWCService.py
  4. vPGWC/xos/tosca/resources/VPGWCComponent.py

@@ -3,7 +3,7 @@ import pdb
 import sys
 import tempfile
 sys.path.append("/opt/tosca")
-from translator.toscalib.tosca_template import ToscaTemplate
+#from translator.toscalib.tosca_template import ToscaTemplate
 import pdb


You need to remove the existing docker image for the changes to take effect:
cd ~/service-profile/mcord/
make stop
make cleanup
sudo docker rm -f $(docker ps -aq)

make xos