Skip to content

Instantly share code, notes, and snippets.

// fthash.v
// embedded sum of src ip and first half of dst ip to src MAC 8 bit
module one_port #(
// Master AXI Stream Data width
parameter C_M_AXIS_DATA_WIDTH=256,
parameter C_M_AXIS_TUSER_WIDTH=128,
parameter C_S_AXIS_DATA_WIDTH=256,
parameter C_S_AXIS_TUSER_WIDTH=128,
parameter SRC_PORT_POS=16,
@upa
upa / fthash.v
Created May 30, 2016 14:23
damepo
// fthash.v
// embedded sum of src ip and first half of dst ip to src MAC 8 bit
module one_port #(
// Master AXI Stream Data width
parameter C_M_AXIS_DATA_WIDTH=256,
parameter C_M_AXIS_TUSER_WIDTH=128,
parameter C_S_AXIS_DATA_WIDTH=256,
parameter C_S_AXIS_TUSER_WIDTH=128,
parameter SRC_PORT_POS=16,
// fthash.v
// embedded sum of src ip and first half of dst ip to src MAC 8 bit
module one_port #(
// Master AXI Stream Data width
parameter C_M_AXIS_DATA_WIDTH=256,
parameter C_M_AXIS_TUSER_WIDTH=128,
parameter C_S_AXIS_DATA_WIDTH=256,
parameter C_S_AXIS_TUSER_WIDTH=128,
parameter SRC_PORT_POS=16,
@upa
upa / .gitignore
Last active August 24, 2016 18:45
socket viz
*.png
*.json
@upa
upa / keybase.md
Created August 23, 2016 15:32
keybase

keybase.md

Keybase proof

I hereby claim:

  • I am upa on github.
  • I am upa (https://keybase.io/upa) on keybase.
  • I have a public key ASDYBl8z7taGpmVyem5c7-O07Y0gU9k7V2fmHuFGuhbiSwo
@upa
upa / netns-gen.sh
Last active April 27, 2017 12:05
A Login Shell (sciprt) to enable users to select a network namespace where the users want to login
#!/bin/bash
ip=/bin/ip
ifc=/sbin/ifconfig
intf=$1
configdir=ns-configs
if [ "$intf" == "" ]; then
echo $0 [raw interface]
@upa
upa / cnt.lua
Created December 26, 2017 15:01
A MoonGen script: count rxed packets on each queue
local mg = require "moongen"
local memory = require "memory"
local device = require "device"
local stats = require "stats"
local log = require "log"
local timer = require "timer"
local pktctrs = {}
@upa
upa / tx-udp.lua
Last active December 26, 2017 15:08
A MoonGen script: tx udp packets
-- This test does the following:
-- 2. Send UDP packets from NIC 1 to NIC 2
--
local mg = require "moongen"
local memory = require "memory"
local device = require "device"
local ts = require "timestamping"
local filter = require "filter"
local hist = require "histogram"
@upa
upa / restarter.py
Created May 8, 2018 13:19
A Script for Executing Command when Ping is Failed
#!/usr/bin/env python3
import os
import sys
import time
import subprocess
from optparse import OptionParser
@upa
upa / recv.py
Created August 7, 2018 14:21
Gatharing interface stats from MX via Network Telemetry
#!/usr/bin/env python3
import sys
import socket
from contextlib import closing
import telemetry_top_pb2
import logical_port_pb2
from pprint import pprint