Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hostinterface.fixes #14

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[![Build Status](https://sonic-jenkins.westus.cloudapp.azure.com/job/sonic-swss-build/badge/icon)](https://sonic-jenkins.westus.cloudapp.azure.com/job/sonic-swss-build/)

# SONiC - Switch State Service - SwSS
# SONiC - SWitch State Service - SWSS

## Description
The Switch State Service (SwSS) is a collection of software that provides a database interface for communication with and state representation of network applications and network switch hardware.
The SWitch State Service (SWSS) is a collection of software that provides a database interface for communication with and state representation of network applications and network switch hardware.

## Getting Started

Expand All @@ -26,26 +26,33 @@ There are a few different ways you can install SONiC-SWSS.

For your convenience, you can install prepared packages on Debian Jessie:

sudo apt-get install sonic-swss
sudo apt-get install swss

#### Install from Source

Checkout the source: `git clone https://github.com/Azure/sonic-swss.git` and install it yourself.

Get SAI header files into /usr/include/sai. Put the SAI header files that you use to compile
libsairedis into /usr/include/sai

Get `fpm.h` header file before compiling:

mkdir fpmsyncd/fpm
wget http://git.savannah.gnu.org/cgit/quagga.git/plain/fpm/fpm.h -O fpmsyncd/fpm/fpm.h

Install prerequisite packages:

sudo apt-get install libswsscommon libswsscommon-dev libsairedis libsairedis-dev

You can compile and install from source using:

./autogen.sh
./configure
./configure -with-fpm=fpm
make && sudo make install

You can also build a debian package using:

./autogen.sh
./configure
fakeroot debian/rules binary

## Need Help?
Expand Down
11 changes: 11 additions & 0 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ PortsOrch::PortsOrch(DBConnector *db, string tableName) :
}
}

for (i = 0; i < 4; i++)
{
attr.id = SAI_HOSTIF_TRAP_ATTR_TRAP_CHANNEL;
attr.value.s32 = SAI_HOSTIF_TRAP_CHANNEL_NETDEV;
status = sai_hostif_api->set_trap_attribute(trap_ids[i], &attr);
if (status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_ERROR("Failed to set trap attribute\n");
}
}

/* Get port number */
attr.id = SAI_SWITCH_ATTR_PORT_NUMBER;

Expand Down