Skip to content

Commit

Permalink
Merge pull request #90 from lagopus/release-0.2
Browse files Browse the repository at this point in the history
Release 0.2.9
  • Loading branch information
Yoshihiro Nakajima committed Aug 26, 2016
2 parents 0d393c9 + 9d1f651 commit 7097920
Show file tree
Hide file tree
Showing 45 changed files with 12,406 additions and 2,069 deletions.
6 changes: 3 additions & 3 deletions QUICKSTART.md
Expand Up @@ -107,7 +107,7 @@ Check PCI ID to enable DPDK on 2nd, 3rd, and 4th NIC.
If NIC used for management (ex: ssh) was selected, you will lose connection.

```
$ sudo ./src/dpdk/tools/dpdk_nic_bind.py --status
$ sudo ./src/dpdk/tools/dpdk-devbind.py --status
Network devices using IGB_UIO driver
====================================
Expand All @@ -129,11 +129,11 @@ If NIC used for management (ex: ssh) was selected, you will lose connection.
Unbound NICs from ixgbe driver.

```
$ sudo ./src/dpdk/tools/dpdk_nic_bind.py --bind=igb_uio 0000:02:02.0 0000:02:03.0 0000:02:04.0
$ sudo ./src/dpdk/tools/dpdk-devbind.py --bind=igb_uio 0000:02:02.0 0000:02:03.0 0000:02:04.0
Check the current status of NICs whehter the 2nd, 3rd and 4th interface is registerd with igb_uio driver
$ sudo ./src/dpdk/tools/dpdk_nic_bind.py --status
$ sudo ./src/dpdk/tools/dpdk-devbind.py --status
Network devices using IGB_UIO driver
====================================
Expand Down
7 changes: 5 additions & 2 deletions configure
Expand Up @@ -645,6 +645,7 @@ PKG_PRIORITY
PKG_SECTION
PKG_MAINTAINER
PKG_REVISION
PKG_DATE
PKG_VERSION
PKG_NAME
NUMA_LIBS
Expand Down Expand Up @@ -18386,7 +18387,7 @@ fi
# packaging
PKG_CONFFILE="mk/pkg_param.conf"
if test -f "${PKG_CONFFILE}"; then
. "${PKG_CONFFILE}"
. "${PKG_CONFFILE}" "${TOPDIR}"
else
as_fn_error $? "NOT FOUND : mk/pkg_param.conf" "$LINENO" 5
fi
Expand All @@ -18407,13 +18408,14 @@ fi




sh mk/cat-deb-control.sh ${RTE_SDK}
if test "x$?" != "x0"; then
as_fn_error $? "NOT FOUND : debian/control_*." "$LINENO" 5
fi

# emit.
ac_config_files="$ac_config_files mk/vars.mk mk/doxygen.conf Makefile src/include/Makefile src/include/lagopus_platform.h src/lib/Makefile src/lib/test/Makefile src/lib/check/Makefile src/agent/Makefile src/agent/test/Makefile src/cmds/Makefile src/config/lagosh/Makefile src/config/lagosh/lagosh.py src/dataplane/Makefile src/dataplane/dpdk/test/Makefile src/dataplane/ofproto/test/Makefile src/dataplane/ofproto/test/lib/Makefile src/dataplane/mgr/test/Makefile src/datastore/Makefile src/datastore/test/Makefile src/datastore/check/Makefile src/snmp/Makefile src/snmp/test/Makefile test/dataplane/benchmark/Makefile tools/Makefile tools/benchmark/Makefile debian/Makefile debian/control debian/copyright debian/lagopus-DATAPLANE.install"
ac_config_files="$ac_config_files mk/vars.mk mk/doxygen.conf Makefile src/include/Makefile src/include/lagopus_platform.h src/lib/Makefile src/lib/test/Makefile src/lib/check/Makefile src/agent/Makefile src/agent/test/Makefile src/cmds/Makefile src/config/lagosh/Makefile src/config/lagosh/lagosh.py src/dataplane/Makefile src/dataplane/dpdk/test/Makefile src/dataplane/ofproto/test/Makefile src/dataplane/ofproto/test/lib/Makefile src/dataplane/mgr/test/Makefile src/datastore/Makefile src/datastore/test/Makefile src/datastore/check/Makefile src/snmp/Makefile src/snmp/test/Makefile test/dataplane/benchmark/Makefile tools/Makefile tools/benchmark/Makefile debian/Makefile debian/control debian/changelog debian/copyright debian/lagopus-DATAPLANE.install"


# emit and set executable attribute.
Expand Down Expand Up @@ -19564,6 +19566,7 @@ do
"tools/benchmark/Makefile") CONFIG_FILES="$CONFIG_FILES tools/benchmark/Makefile" ;;
"debian/Makefile") CONFIG_FILES="$CONFIG_FILES debian/Makefile" ;;
"debian/control") CONFIG_FILES="$CONFIG_FILES debian/control" ;;
"debian/changelog") CONFIG_FILES="$CONFIG_FILES debian/changelog" ;;
"debian/copyright") CONFIG_FILES="$CONFIG_FILES debian/copyright" ;;
"debian/lagopus-DATAPLANE.install") CONFIG_FILES="$CONFIG_FILES debian/lagopus-DATAPLANE.install" ;;
"debian/rules") CONFIG_FILES="$CONFIG_FILES debian/rules" ;;
Expand Down
4 changes: 3 additions & 1 deletion configure.ac
Expand Up @@ -616,13 +616,14 @@ AC_SUBST(NUMA_LIBS)
# packaging
PKG_CONFFILE="mk/pkg_param.conf"
if test -f "${PKG_CONFFILE}"; then
. "${PKG_CONFFILE}"
. "${PKG_CONFFILE}" "${TOPDIR}"
else
AC_MSG_ERROR([NOT FOUND : mk/pkg_param.conf])
fi

AC_SUBST(PKG_NAME)
AC_SUBST(PKG_VERSION)
AC_SUBST(PKG_DATE)
AC_SUBST(PKG_REVISION)
AC_SUBST(PKG_MAINTAINER)
AC_SUBST(PKG_SECTION)
Expand Down Expand Up @@ -672,6 +673,7 @@ AC_CONFIG_FILES(
tools/benchmark/Makefile
debian/Makefile
debian/control
debian/changelog
debian/copyright
debian/lagopus-DATAPLANE.install
)
Expand Down
2 changes: 1 addition & 1 deletion debian/Makefile.in
Expand Up @@ -5,5 +5,5 @@ include $(MKRULESDIR)/vars.mk
include $(MKRULESDIR)/rules.mk

distclean::
$(RM) rules control control.in copyright \
$(RM) rules control control.in copyright changelog \
lagopus-DATAPLANE.postrm lagopus-DATAPLANE.install
5 changes: 0 additions & 5 deletions debian/changelog

This file was deleted.

5 changes: 5 additions & 0 deletions debian/changelog.in
@@ -0,0 +1,5 @@
lagopus (@PKG_VERSION@-@PKG_REVISION@) unstable; urgency=low

* Pakaged a version @PKG_VERSION@-@PKG_REVISION@

-- lagopus <lagopus@lagopus.org> @PKG_DATE@ +0000
2 changes: 1 addition & 1 deletion debian/control_dpdk.inc
@@ -1,5 +1,5 @@
Package: @PKG_NAME@-dpdk
Conflicts: @PKG_NAME@-raw-socket
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, python-lxml, python-paramiko, python-zopeinterface, python-webob, python-paste, python-pastedeploy, python-twisted-conch
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: @PKG_DESCRIPTION_DPDK@
2 changes: 1 addition & 1 deletion debian/control_raw_socket.inc
@@ -1,5 +1,5 @@
Package: @PKG_NAME@-raw-socket
Architecture: any
Conflicts: @PKG_NAME@-dpdk
Depends: ${shlibs:Depends}, ${misc:Depends}, python-lxml, python-paramiko, python-zopeinterface, python-webob, python-paste, python-pastedeploy, python-twisted-conch
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: @PKG_DESCRIPTION_RAW_SOCKET@
20 changes: 4 additions & 16 deletions debian/copyright.in
@@ -1,20 +1,13 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: @PKG_NAME@
Source: <url://example.com>
Source: @PKG_VCS_URL@

Files: *
Copyright: <years> <put author's name and email here>
<years> <likewise for another author>
License: <special license>
<Put the license of the package here indented by 1 space>
<This follows the format of Description: lines in control file>
.
<Including paragraphs>
Copyright: 2014 lagopus
License: Apache-2.0

# If you want to use GPL v2 or later for the /debian/* files use
# the following clauses, or change it to suit. Delete these two lines
Files: debian/*
Copyright: 2014 shingo-s <shingo-s@unknown>
Copyright: 2014 lagopus
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -31,8 +24,3 @@ License: GPL-2+
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".

# Please also look if there are files or directories which have a
# different copyright/license attached and list them here.
# Please avoid to pick license terms that are more restrictive than the
# packaged work, as it may make Debian's contributions unacceptable upstream.
14 changes: 7 additions & 7 deletions debian/lagopus-DATAPLANE.postrm.in
Expand Up @@ -25,23 +25,23 @@ PKG_PURGE_FILES="@PKG_PURGE_FILES@"

case "$1" in
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
for DIR in ${PKG_REMOVE_DIRS}; do
rm -rf ${DIR}
done

for FILE in ${PKG_REMOVE_FILES}; do
rm -f ${FILE}
done
;;

purge)
for DIR in ${PKG_PURGE_DIRS}; do
for DIR in ${PKG_REMOVE_DIRS}; do
rm -rf ${DIR}
done
;;

purge)
for FILE in ${PKG_PURGE_FILES}; do
rm -f ${FILE}
done

for DIR in ${PKG_PURGE_DIRS}; do
rm -rf ${DIR}
done
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
Expand Down
6 changes: 3 additions & 3 deletions debian/rules.in
Expand Up @@ -38,11 +38,11 @@ configure-%:
tar xvzf $(TAR_FILE) -C $(BUILD_DIR)/$*
if [ $* = dpdk ] ; then \
dh_auto_configure -D "$(BUILD_DIR)/$*" -- \
--sysconfdir=$(SYSCONFDIR) \
--with-dpdk-dir=$(RTE_SDK_DIR); \
--sysconfdir=$(SYSCONFDIR); \
else \
dh_auto_configure -D "$(BUILD_DIR)/$*" -- \
--sysconfdir=$(SYSCONFDIR); \
--sysconfdir=$(SYSCONFDIR) \
--disable-dpdk; \
fi

override_dh_auto_configure:
Expand Down
20 changes: 6 additions & 14 deletions docs/how-to-make-packages.md
Expand Up @@ -67,8 +67,9 @@ cf.) https://www.debian.org/doc/debian-policy/ch-controlfields.html

#### MUST
* PKG_NAME : The package name (Same as `Source` in debian/control file.)
* PKG_VERSION : The package version (Same as `Package` in debian/control file.)
* PKG_VERSION(auto generate) : The package version (Same as `Package` in debian/control file.).
* PKG_REVISION : The package revision number (Same as `Package` in debian/control file.)
* PKG_DATE(auto generate) : Creation date of the packages
* PKG_MAINTAINER : The package maintainer's name and email address (Same as `Maintainer` in debian/control file.)
* PKG_SECTION : Classification of the packages (Same as `Section` in debian/control file.)
* PKG_PRIORITY : Priority of the packages (Same as `Priority` in debian/control file.)
Expand All @@ -88,8 +89,9 @@ e.g.)

```
PKG_NAME="lagopus"
PKG_VERSION="1.0.0"
PKG_VERSION="1.0.0" # auto generate.
PKG_REVISION="1"
PKG_DATE="Fri, 6 Nov 2015 00:00:00 +0000" # auto generate.
PKG_MAINTAINER="lagopus <lagopus@lagopus.org>"
PKG_SECTION="unknown"
PKG_PRIORITY="extra"
Expand All @@ -109,17 +111,7 @@ e.g.)
/etc/lagopus/ofconf-passwords'
```

### 2. Edit `debian/changelog` file.
You execute the following commands and update the changelog file.
`<version>-<release no>` is the same as the value of `PKG_VERSION-PKG_REVISION`.
More information about the fields in changelog, see the following URL:
cf.) https://www.debian.org/doc/manuals/maint-guide/dreq.en.html#changelog

```
% dch -v <version>-<release no>
```

### 3. Execute configure.
### 2. Execute configure.
* In the case of make the package for raw socket version:
You execute `configure` script with no options.

Expand All @@ -135,7 +127,7 @@ cf.) https://www.debian.org/doc/manuals/maint-guide/dreq.en.html#changelog
% ./configure --with-dpdk-dir=${RTE_SDK}
```

### 4. Execute make.
### 3. Execute make.
You execute the following commands.

```
Expand Down
2 changes: 1 addition & 1 deletion mk/make_dpdk.sh
Expand Up @@ -86,4 +86,4 @@ edit_dpdk_config CONFIG_RTE_LIBRTE_PMD_BOND=n $NEWCONFIG
edit_dpdk_config CONFIG_RTE_APP_TEST=n $NEWCONFIG
edit_dpdk_config CONFIG_RTE_TEST_PMD=n $NEWCONFIG

${MAKE} T=${NEW_TARGET} config && ${MAKE} ROOTDIRS-y="lib drivers"
${MAKE} T=${NEW_TARGET} config && ${MAKE} ROOTDIRS-y="buildtools lib drivers"
4 changes: 2 additions & 2 deletions mk/make_pkg.sh
Expand Up @@ -13,7 +13,7 @@ fi
PKGWORKDIR=lagopus
TMP_TAR="/tmp/lagopus_pkg_$$.tar.gz"

. ${TOPDIR}/mk/pkg_param.conf
. ${TOPDIR}/mk/pkg_param.conf ${TOPDIR}

#

Expand Down Expand Up @@ -44,7 +44,7 @@ cd ${PKGDIR} && tar zxf lagopus_${PKG_VERSION}.orig.tar.gz -C ${PKGWORKDIR}
cd ${PKGDIR}/${PKGWORKDIR} &&
DEB_CPPFLAGS_SET= DEB_CFLAGS_SET= DEB_LDFLAGS_SET= \
DEB_CXXFLAGS_SET= DEB_FFLAGS_SET= \
dpkg-buildpackage -rfakeroot
dpkg-buildpackage -uc -us -rfakeroot

cleanup

Expand Down
34 changes: 23 additions & 11 deletions mk/pkg_param.conf
@@ -1,9 +1,27 @@
#!/bin/sh

#
# ARGS
#
TOPDIR=$1

if [ "x${TOPDIR}" = "x" ]; then
echo "ERROR : Invalid args." 1>&2
exit 1;
fi

LAGOPUS_VERSION_FILE=${TOPDIR}/src/include/lagopus_version.h
PKG_VERSION_MAJOR=`grep LAGOPUS_VERSION_MAJOR ${LAGOPUS_VERSION_FILE} | awk '{print $3}'`
PKG_VERSION_MINOR=`grep LAGOPUS_VERSION_MINOR ${LAGOPUS_VERSION_FILE} | awk '{print $3}'`
PKG_VERSION_PATCH=`grep LAGOPUS_VERSION_PATCH ${LAGOPUS_VERSION_FILE} | awk '{print $3}'`

#
# MUST(common)
#
PKG_NAME='lagopus'
PKG_VERSION='0.2.2'
PKG_VERSION=${PKG_VERSION_MAJOR}.${PKG_VERSION_MINOR}.${PKG_VERSION_PATCH}
PKG_REVISION='1'
PKG_DATE=`LANG=C date -u "+%a, %-d %b %Y %T"`

#
# MUST(deb)
Expand All @@ -24,15 +42,9 @@ PKG_DESCRIPTION_DPDK='Lagopus(DPDK version).'${PKG_DESCRIPTION}
PKG_HP_URL='http://lagopus.github.io/'
PKG_VCS='git@github.com:lagopus/lagopus.git'
PKG_VCS_URL='https://github.com/lagopus/lagopus'
PKG_REMOVE_DIRS='/usr/sbin/of_config
/usr/sbin/ovsdb
/usr/share/doc/lagopus-raw-socket
PKG_REMOVE_DIRS='/usr/share/doc/lagopus-raw-socket
/usr/share/doc/lagopus-dpdk'
PKG_REMOVE_FILES=''
PKG_PURGE_DIRS=${PKG_REMOVE_DIRS}
PKG_PURGE_FILES='/etc/lagopus/lagopus.dsl
/etc/lagopus/configuration.xml
/etc/lagopus/operational.xml
/etc/lagopus/ofconf_rsa
/etc/lagopus/ofconf_rsa.pub
/etc/lagopus/ofconf-passwords'
PKG_PURGE_DIRS=${PKG_REMOVE_DIRS}' /etc/lagopus'
PKG_PURGE_FILES='/etc/lagopus/lagopus.dsl'
echo ${PKG_PURGE_DIRS}
11 changes: 10 additions & 1 deletion src/agent/channel.c
Expand Up @@ -418,13 +418,22 @@ channel_write(struct channel *channel) {
}

void
channel_send_packet_by_event(struct channel *channel, struct pbuf *pbuf) {
channel_send_packet_by_event_nolock(struct channel *channel, struct pbuf *pbuf) {
if (channel != NULL) {
pbuf_list_add(channel->out, pbuf);
channel_write_on(channel);
}
}

void
channel_send_packet_by_event(struct channel *channel, struct pbuf *pbuf) {
if (channel != NULL) {
channel_lock(channel);
channel_send_packet_by_event_nolock(channel, pbuf);
channel_unlock(channel);
}
}

static lagopus_result_t
channel_send_packet_nolock_internal(struct channel *channel,
struct pbuf_list *out_list) {
Expand Down
10 changes: 10 additions & 0 deletions src/agent/channel.h
Expand Up @@ -329,6 +329,16 @@ channel_pbuf_list_unget_nolock(struct channel *channel, struct pbuf *pbuf);
void
channel_send_packet(struct channel *channel, struct pbuf *pbuf);

/**
* Send a packet to a controller by event manager (nolock).
*
* @param[in] channel A channel pointer.
* @param[in] pbuf A pbuf pointer.
*
*/
void
channel_send_packet_by_event_nolock(struct channel *channel, struct pbuf *pbuf);

/**
* Send a packet to a controller by event manager.
*
Expand Down
4 changes: 2 additions & 2 deletions src/agent/ofp_hello_handler.c
Expand Up @@ -296,14 +296,14 @@ ofp_hello_send(struct channel *channel) {

if (ret == LAGOPUS_RESULT_OK) {
/* send. */
channel_send_packet_by_event(channel, pbuf);
channel_send_packet_by_event_nolock(channel, pbuf);

/* Success. */
ret = LAGOPUS_RESULT_OK;
}

if (ret != LAGOPUS_RESULT_OK && pbuf != NULL) {
channel_pbuf_list_unget(channel, pbuf);
channel_pbuf_list_unget_nolock(channel, pbuf);
}
} else {
ret = LAGOPUS_RESULT_INVALID_ARGS;
Expand Down
4 changes: 3 additions & 1 deletion src/dataplane/dpdk/rte_eth_pipe.c
Expand Up @@ -526,4 +526,6 @@ static struct rte_driver pmd_pipe_drv = {
.uninit = rte_pmd_pipe_devuninit,
};

PMD_REGISTER_DRIVER(pmd_pipe_drv);
PMD_REGISTER_DRIVER(pmd_pipe_drv, eth_pipe);
DRIVER_REGISTER_PARAM_STRING(eth_pipe,
"iface=<string> ");

0 comments on commit 7097920

Please sign in to comment.