From owner-cvs-src-old@FreeBSD.ORG Wed May 5 00:51:11 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4F28D1065670 for ; Wed, 5 May 2010 00:51:11 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 3D18D8FC0A for ; Wed, 5 May 2010 00:51:11 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o450pBLU012728 for ; Wed, 5 May 2010 00:51:11 GMT (envelope-from np@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o450pBWS012727 for cvs-src-old@freebsd.org; Wed, 5 May 2010 00:51:11 GMT (envelope-from np@repoman.freebsd.org) Message-Id: <201005050051.o450pBWS012727@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to np@repoman.freebsd.org using -f From: Navdeep Parhar Date: Wed, 5 May 2010 00:41:40 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/cxgb cxgb_ioctl.h cxgb_main.c src/usr.sbin/cxgbtool cxgbtool.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 00:51:11 -0000 np 2010-05-05 00:41:40 UTC FreeBSD src repository Modified files: sys/dev/cxgb cxgb_ioctl.h cxgb_main.c usr.sbin/cxgbtool cxgbtool.c Log: SVN rev 207643 on 2010-05-05 00:41:40Z by np Add support for hardware filters to cxgb(4). The T3 chip can inspect L2/3/4 headers and can drop or steer packets as instructed. Filtering based on src ip, dst ip, src port, dst port, 802.1q, udp/tcp, and mac addr is possible. Add support in cxgbtool to program these filters. Some simple examples: Drop all tcp/80 traffic coming from the subnet specified. # cxgbtool cxgb2 filter 0 sip 192.168.1.0/24 dport 80 type tcp action drop Steer all incoming UDP traffic to qset 0. # cxgbtool cxgb2 filter 1 type udp queue 0 action pass Steer all tcp traffic from 192.168.1.1 to qset 1. # cxgbtool cxgb2 filter 2 sip 192.168.1.1 type tcp queue 1 action pass Drop fragments. # cxgbtool cxgb2 filter 3 type frag action drop List all filters. # cxgbtool cxgb2 filter list index SIP DIP sport dport VLAN PRI P/MAC type Q 0 192.168.1.0/24 0.0.0.0 * 80 0 0/1 */* tcp - 1 0.0.0.0/0 0.0.0.0 * * 0 0/1 */* udp 0 2 192.168.1.1/32 0.0.0.0 * * 0 0/1 */* tcp 1 3 0.0.0.0/0 0.0.0.0 * * 0 0/1 */* frag - 16367 0.0.0.0/0 0.0.0.0 * * 0 0/1 */* * * MFC after: 2 weeks Revision Changes Path 1.10 +29 -0 src/sys/dev/cxgb/cxgb_ioctl.h 1.109 +273 -0 src/sys/dev/cxgb/cxgb_main.c 1.8 +180 -6 src/usr.sbin/cxgbtool/cxgbtool.c