From owner-freebsd-net@FreeBSD.ORG Sun May 4 15:25:09 2014 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A27CBA5 for ; Sun, 4 May 2014 15:25:09 +0000 (UTC) Received: from nm1-vm1.bullet.mail.bf1.yahoo.com (nm1-vm1.bullet.mail.bf1.yahoo.com [98.139.213.163]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 382EB1DB0 for ; Sun, 4 May 2014 15:25:08 +0000 (UTC) Received: from [66.196.81.170] by nm1.bullet.mail.bf1.yahoo.com with NNFMP; 04 May 2014 15:21:56 -0000 Received: from [98.139.212.249] by tm16.bullet.mail.bf1.yahoo.com with NNFMP; 04 May 2014 15:21:56 -0000 Received: from [127.0.0.1] by omp1058.mail.bf1.yahoo.com with NNFMP; 04 May 2014 15:21:56 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 550982.81243.bm@omp1058.mail.bf1.yahoo.com Received: (qmail 67038 invoked by uid 60001); 4 May 2014 15:21:56 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1399216916; bh=Bzj8j3QJ9rPOnzgl2TAZgfEZ9ciQa+A39+KxrpCX4c8=; h=Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=TEG4U6a5oY8gYJcJoIrcDnshG7NcVCVf34CPIwOEsdqQV1brtVniTWtQOi6MNpPKtwB+J/CSbXOJ3J4+zo6U50EwgdjyK/EgVa3CN42sk0cDAhFWS9VY/B1PiM77qbLl603zK4rCHPu90pkwGGfNV8pFJOsYDvouWhNtHOV0qE0= X-YMail-OSG: ZS9uDhsVM1m1C6bYt4LALSUlshb0Z6MaEHLFYWSmdXnpCqB fU7AGVSd3iXFkX2mqpDWQAm0dXBi8MWl5Y4YCLYzoFZ08Adcq9PRbfg3OWmb g6fAVzoSBvjnrlsnjjv0cy0cwPmDoTvtolIzQ8_WyJU7YpB8Km_d8apiJYM4 KDfkRzdZX3g7mx.YsCvdXphJ8w53Y_1WFejQukjL7iE4T2gk2RLlmlp8dl.s 8aYZ4ml8cDDgZ6CLSB8pE36O33XJsJTbWwfRz4dUdtbgJl4KpjNbPYLGGlO6 4AE.xHwgOLjLKqHMDusn6b1c8.agGss_PyKBnPMtnYSS9fX1L.CHt7IXPTNv l.gPDBSt01PllDxa0rdoNhfz6pfE6M0zTvUBdJrRmjEADP5568A73Atbjl3_ QoF.hyEbo84R3aXab4Gw8Yogo6Lb4S4fJt9AlnNQ_fn_nz8LnXgpJzqpIgUW 5eyg7CFxWkBQn30yZXBHWqohV6Fzhm0EfHBE0hsl9Msl4p_aitlZM13d07mY QYCcAkkbneKGZlhVw013kxUtj48lqfaU4R4Xp6TkrqWAhTt3kEi5jI2WmY00 - Received: from [39.32.238.171] by web162704.mail.bf1.yahoo.com via HTTP; Sun, 04 May 2014 08:21:56 PDT X-Rocket-MIMEInfo: 002.001, SEksCgoJSSB3YW50IHRvIGFzayBob3cgY2FuIGkgaW1wbGVtZW50IGJhdGNoIHByb2Nlc3NpbmcgdXNpbmcgcG9sbCgpOwoJaG93IHdlIHRlbGwgTklDIGFib3V0IGJhdGNoZXMuwqAKwqAgwqAgwqAgwqAgQWxzbyBoYXZlIHlvdSBpbXBsZW1lbnRlZCBCYXRjaCBwcm9jZXNzaW5nIGluIHBrdC1nZW4uYyBpbiB0aGUgRXhhbXBsZSBEaXJlY3RvcnkuwqAKwqAgwqAgwqAgwqAgSWYgeWVzIGhvdyBjYW4gaSBjb250cm9sIGJhdGNoIHNpemUgaW4gcGt0LWdlbi5jLgoKcmVnYXJkcwptYXRpIHVyIHJhaG1hbsKgATABAQEB X-Mailer: YahooMailWebService/0.8.188.663 Message-ID: <1399216916.47516.YahooMailNeo@web162704.mail.bf1.yahoo.com> Date: Sun, 4 May 2014 08:21:56 -0700 (PDT) From: mati ur-rahman Subject: Batch processing To: "net@freebsd.org" MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 04 May 2014 16:37:53 +0000 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: mati ur-rahman List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 15:25:09 -0000 HI,=0A=0A=09I want to ask how can i implement batch processing using poll()= ;=0A=09how we tell NIC about batches.=A0=0A=A0 =A0 =A0 =A0 Also have you im= plemented Batch processing in pkt-gen.c in the Example Directory.=A0=0A=A0 = =A0 =A0 =A0 If yes how can i control batch size in pkt-gen.c.=0A=0Aregards= =0Amati ur rahman=A0 From owner-freebsd-net@FreeBSD.ORG Sun May 4 19:27:51 2014 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37B09BA9 for ; Sun, 4 May 2014 19:27:51 +0000 (UTC) Received: from nm22-vm1.bullet.mail.bf1.yahoo.com (nm22-vm1.bullet.mail.bf1.yahoo.com [98.139.212.127]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBB3B16D7 for ; Sun, 4 May 2014 19:27:50 +0000 (UTC) Received: from [98.139.212.153] by nm22.bullet.mail.bf1.yahoo.com with NNFMP; 04 May 2014 19:27:43 -0000 Received: from [98.139.212.247] by tm10.bullet.mail.bf1.yahoo.com with NNFMP; 04 May 2014 19:27:43 -0000 Received: from [127.0.0.1] by omp1056.mail.bf1.yahoo.com with NNFMP; 04 May 2014 19:27:43 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 342761.90602.bm@omp1056.mail.bf1.yahoo.com Received: (qmail 70320 invoked by uid 60001); 4 May 2014 19:27:42 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1399231662; bh=CAwCFzV+ksBhREBA6FwYtn9OQsF+TYrcw7K8CDExeiQ=; h=Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=nBWtcErXi5dFpfITrKK0ZBOMFE2dmuGknTVWz5CdE4KcMmLkic0PWO6eo05WiY7g6vMacg+cjTryPmfmga5hSzt/t8qxQGTwej6rUCfcb/ZcdBFfI9CR95aI6DPmSG/WYmskxYV/1oH6b57BgQs4BWEdmjUWaxuw31mBlF5Kpxg= X-YMail-OSG: bHCYKskVM1kh44u0SkSbYrsXHQuUgChPON8arcHBWSiOoFV f37pNaAR36BPPelUpiOv.GjR4D.9_ibHQyHx8b17oB3ItFYpJov6vqkhudpj BIjMOQuZhAfsblI2vXBGv_I0Xp5w8C7e4FYATbKHA_d1XYkXbKvRekOSIKh7 lM3G0rfapVwWO5Iohpyr7bWz2WFoHonrIDZ3XK.mT4augzmrZNKEv6Y9gFI3 kiJBYinhhCyne66oxIh0j9s_D078hWEJxTfBA.Vi3fr.i4fLVXvyeYZZ9J8T AjS1EHNCuR_XArPtNsZoIyrNNq1AUhpFf9E7NRk9fgPBeV0wDAdsBgbzQh2H iDMyD8L8TBrpk6wLEiG3YWBWCpXiHTaKIJH4PdHK1d3PxwAsDjL2Z2F66zqn tQTvt.G5AgQwaVKiQfmFwnFK6vWJzFJoXzxNEME6fRSrJsxjwiGkS3x_4SoE olZqCgcy8o49t8nqZnvlr8i0g_.UQh0MYV2Yi36EAkX4BJ08KOqZBJfzmPOE uwuZT7jbO1frZejFq2g2to4kdjIhhC1mTXGgOazLmMGS.JW.TzCRxsaGy0gg - Received: from [39.32.238.171] by web162702.mail.bf1.yahoo.com via HTTP; Sun, 04 May 2014 12:27:42 PDT X-Rocket-MIMEInfo: 002.001, SEksCgpJIHdhbnQgdG8gYXNrIGhvdyBjYW4gaSBpbXBsZW1lbnQgYmF0Y2ggcHJvY2Vzc2luZyB1c2luZyBwb2xsKCk7CmhvdyB3ZSB0ZWxsIE5JQyBhYm91dCBiYXRjaGVzLsKgCsKgIMKgIMKgIMKgIEFsc28gaGF2ZSB5b3UgaW1wbGVtZW50ZWQgQmF0Y2ggcHJvY2Vzc2luZyBpbiBwa3QtZ2VuLmMgaW4gdGhlIEV4YW1wbGUgRGlyZWN0b3J5LsKgCsKgIMKgIMKgIMKgIElmIHllcyBob3cgY2FuIGkgY29udHJvbCBiYXRjaCBzaXplIGluIHBrdC1nZW4uYy4KCnJlZ2FyZHMKbWF0aSB1ciByYWhtYW7CoAEwAQEBAQ-- X-Mailer: YahooMailWebService/0.8.188.663 Message-ID: <1399231662.36183.YahooMailNeo@web162702.mail.bf1.yahoo.com> Date: Sun, 4 May 2014 12:27:42 -0700 (PDT) From: mati ur-rahman Subject: netmap help To: "net@freebsd.org" MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: mati ur-rahman List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 19:27:51 -0000 HI,=0A=0AI want to ask how can i implement batch processing using poll();= =0Ahow we tell NIC about batches.=A0=0A=A0 =A0 =A0 =A0 Also have you implem= ented Batch processing in pkt-gen.c in the Example Directory.=A0=0A=A0 =A0 = =A0 =A0 If yes how can i control batch size in pkt-gen.c.=0A=0Aregards=0Ama= ti ur rahman=A0 From owner-freebsd-net@FreeBSD.ORG Mon May 5 03:42:22 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6BD3C123 for ; Mon, 5 May 2014 03:42:22 +0000 (UTC) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 081AE1806 for ; Mon, 5 May 2014 03:42:21 +0000 (UTC) Received: from jre-mbp.elischer.org (ppp121-45-232-70.lns20.per1.internode.on.net [121.45.232.70]) (authenticated bits=0) by vps1.elischer.org (8.14.8/8.14.8) with ESMTP id s453g0EG095595 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 4 May 2014 20:42:12 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <53670883.9060809@freebsd.org> Date: Mon, 05 May 2014 11:41:55 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: =?UTF-8?B?w5Z6a2FuIEtJUklL?= , "freebsd-net@freebsd.org" Subject: Re: bridge Untagged packets on an interface References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 03:42:22 -0000 On 5/3/14, 4:59 AM, Özkan KIRIK wrote: > And also i tried ng_bpf + ng_eiface conjuction, but ng_bpf doesnt match > "vlan" filter. > > With the script below, ng_bpf always calls ifNotMatch hook. When the > pattern is "ip", ng_bpf matches frames have both vlan and ip headers. > I think ng_bpf doesnt process ethernet header. Is there a way to process > ethernet header with ng_bpf ? once you have worked out what the framework is doing then it is very easy to read the code of netgraph modules because each module does only one thing. read the sample module for descriptions of what the parts do and then look at the modules you are trying to use. it should be pretty quickly obvious what they are doing. Julian > > Script is below: > > #!/bin/sh > ETHER_IF=em0 > PATTERN="vlan" > BPFPROG=$( tcpdump -s 8192 -ddd ${PATTERN} | \ > ( read len ; \ > echo -n "bpf_prog_len=$len " ; \ > echo -n "bpf_prog=[" ; \ > while read code jt jf k ; do \ > echo -n " { code=$code jt=$jt jf=$jf k=$k }" ; \ > done ; \ > echo " ]" ) ) > > echo $BPFPROG > > # Shutdown nodes if exists > ngctl shutdown ${ETHER_IF}: > ngctl shutdown vlan_filter: > ngctl shutdown tag0: > ngctl shutdown untag0: > > ngctl -f- < mkpeer ${ETHER_IF}: bpf lower filter_in > name ${ETHER_IF}:lower vlan_filter > mkpeer vlan_filter: eiface taggedPacket ether > mkpeer vlan_filter: eiface untaggedPacket ether > name vlan_filter:taggedPacket tag0 > name vlan_filter:untaggedPacket untag0 > msg vlan_filter: setprogram { thisHook="filter_in" ifMatch="taggedPacket" > ifNotMatch="untaggedPacket" $BPFPROG } > EOF > ifconfig ngeth0 up > ifconfig ngeth1 up > > > > On Fri, May 2, 2014 at 11:53 PM, Özkan KIRIK wrote: > >> Hi, >> >> Assume that default vlan untagged and VLAN 10, 20, 30, 40 tagged on switch >> connected to em0 interface. >> >> i am trying to bridge only untagged frames on em0 with em1. >> >> Does if_vlan handle untagged frames? >> >> # ifconfig em0.0 create >> ifconfig: SIOCIFCREATE2: Invalid argument >> >> Any ideas? >> >> Best regards, >> > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > >