tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

FW: [tcpdump-workers] Modular arithmetic



There is a discussion lurking on tcpdump-workers that has hit netdev
about the extension of BPF to support XOR and MOD operations.

I'm not going to sort out the full gory details - below is the
last post - the first cross post to netdev.

        David Laight

> -----Original Message-----
> From: Guy Harris [mailto:guy%alum.mit.edu@localhost]
> Sent: 10 September 2012 18:51
> To: David Laight
> Cc: Eric Dumazet; netdev%vger.kernel.org@localhost; Jay Schulist; Andi Kleen; 
> tcpdump-workers%lists.tcpdump.org@localhost
> Subject: Re: [tcpdump-workers] Modular arithmetic
> 
> 
> On Sep 10, 2012, at 3:41 AM, "David Laight" 
> <David.Laight%ACULAB.COM@localhost> wrote:
> 
> >>> What about the other OS - eg all the BSDs?
> >>> I had a vague idea that BPF was supposed to be reasonable portable.
> >>
> >> Yes, does it mean BPF is frozen ?
> >>
> >> Or is BSD so hard to update these days ?
> >
> > Not really - but it some other places that need updating in order
> > to make this useful for cross-platform tools (like tcpdump).
> >
> > The 'real fun (tm)' happens when NetBSD tries to run Linux binaries
> > that include the Linux libpcap.
> 
> Additional fun happens when a Linux system with a kernel that doesn't have 
> the mod instruction tries
> to run Linux binaries that include a Linux libpcap that generates code using 
> the mod instruction; this
> is not a BSD-vs.-Linux issue, it's a "kernel that lacks the mod instruction 
> vs. libpcap that generates
> code that includes the mod instruction" issue.
> 
> BSD/OS X, Linux, Solaris, and the WinPcap driver need, if they adopt new BPF 
> instructions, to have a
> mechanism by which libpcap (or anything else using BPF filtering) can inquire 
> about the capabilities
> of the OS BPF interpreter; libpcap would use that to determine what code to 
> generate if generating
> code for the in-kernel BPF interpreter.
> 
> (Please reply to tcpdump-workers%lists.tcpdump.org@localhost as well as to 
> netdev%vger.kernel.org@localhost, so that
> people not on both of those lists can follow the discussion.  Messages from 
> non-members of tcpdump-
> workers to tcpdump-workers shouldn't bounce, but they do need to be approved 
> by a moderator; Michael,
> if you want to at least temporarily turn the flood on for my e-mail address, 
> so I can help moderate,
> go ahead.)




Home | Main Index | Thread Index | Old Index