android_kernel_xiaomi_sm8350/drivers
Max Krasnyansky f271b2cc78 tun: Fix/rewrite packet filtering logic
Please see the following thread to get some context on this
	http://marc.info/?l=linux-netdev&m=121564433018903&w=2

Basically the issue is that current multi-cast filtering stuff in
the TUN/TAP driver is seriously broken.
Original patch went in without proper review and ACK. It was broken and
confusing to start with and subsequent patches broke it completely.
To give you an idea of what's broken here are some of the issues:

- Very confusing comments throughout the code that imply that the
character device is a network interface in its own right, and that packets
are passed between the two nics. Which is completely wrong.

- Wrong set of ioctls is used for setting up filters. They look like
shortcuts for manipulating state of the tun/tap network interface but
in reality manipulate the state of the TX filter.

- ioctls that were originally used for setting address of the the TX filter
got "fixed" and now set the address of the network interface itself. Which
made filter totaly useless.

- Filtering is done too late. Instead of filtering early on, to avoid
unnecessary wakeups, filtering is done in the read() call.

The list goes on and on :)

So the patch cleans all that up. It introduces simple and clean interface for
setting up TX filters (TUNSETTXFILTER + tun_filter spec) and does filtering
before enqueuing the packets.

TX filtering is useful in the scenarios where TAP is part of a bridge, in
which case it gets all broadcast, multicast and potentially other packets when
the bridge is learning. So for example Ethernet tunnelling app may want to
setup TX filters to avoid tunnelling multicast traffic. QEMU and other
hypervisors can push RX filtering that is currently done in the guest into the
host context therefore saving wakeups and unnecessary data transfer.

Signed-off-by: Max Krasnyansky <maxk@qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-14 22:18:19 -07:00
..
accessibility
acorn/char
acpi dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled. 2008-06-26 01:55:27 -04:00
amba
ata Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 2008-06-20 12:46:47 -07:00
atm atm: [fore200e] convert to use request_firmware() 2008-06-17 16:23:11 -07:00
auxdisplay
base dev_set_name: fix missing kernel-doc 2008-06-11 16:50:40 -07:00
block cciss: add new hardware support 2008-06-12 18:05:40 -07:00
bluetooth bluetooth: hci_bcsp.c small cleanups/api users 2008-06-10 12:48:45 -07:00
cdrom [POWERPC] iSeries: Remove unused mail address 2008-05-23 16:45:04 +10:00
char Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-07-05 23:08:07 -07:00
clocksource
connector CONNECTOR: add a proc entry to list connectors 2008-06-27 20:03:24 -07:00
cpufreq Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq 2008-06-09 11:27:55 -07:00
cpuidle cpuidle acpi driver: fix oops on AC<->DC 2008-06-11 19:13:45 -04:00
crypto
dca
dio
dma iop-adma: fixup some kzalloc/memset confusions 2008-05-20 13:51:20 -07:00
edac edac: mpc85xx: fix building as a module 2008-05-24 09:56:13 -07:00
eisa
firewire firewire: fw-sbp2: fix parsing of logical unit directories 2008-06-27 20:55:00 +02:00
firmware edd: fix incorrect return of 1 from module_init 2008-06-06 11:29:09 -07:00
gpio gpiolib: fix off by one errors 2008-05-24 09:56:11 -07:00
hid HID: remove CVS keywords 2008-05-20 16:44:43 +02:00
hwmon hwmon: (lm75) sensor reading bugfix 2008-06-19 06:50:32 -04:00
i2c I2C: S3C2410: Add MODULE_ALIAS() for s3c2440 device. 2008-07-01 14:30:38 +01:00
ide ide: fix /proc/ide/ide?/mate reporting 2008-06-30 20:14:45 +02:00
ieee1394 ieee1394: Kconfig menu touch-up 2008-06-19 00:12:36 +02:00
infiniband IB/mthca: Clear ICM pages before handing to FW 2008-06-23 09:29:58 -07:00
input drivers/input/ff-core.c needs <linux/sched.h> 2008-07-02 18:40:08 -07:00
isdn pkt_sched: Add qdisc_reset_all_tx(). 2008-07-08 22:59:10 -07:00
leds LEDS: fix race in device_create 2008-05-20 13:31:55 -07:00
lguest x86: fix NULL pointer deref in __switch_to 2008-06-20 13:26:18 +02:00
macintosh [POWERPC] Build fix for drivers/macintosh/mediabay.c 2008-06-16 15:00:47 +10:00
mca
md Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm 2008-07-02 18:55:17 -07:00
media V4L/DVB (8178): uvc: Fix compilation breakage for the other drivers, if uvc is selected 2008-07-02 08:58:15 -03:00
memstick
message [SCSI] fusion mpt: fix target missing after resetting external raid 2008-05-27 10:58:09 -05:00
mfd HTC_EGPIO is ARM-only 2008-05-21 16:56:00 -07:00
misc thinkpad-acpi: fix LED handling on older ThinkPads 2008-06-11 19:13:45 -04:00
mmc mmc: wbsd: initialize tasklets before requesting interrupt 2008-06-12 18:05:41 -07:00
mtd Merge git://git.infradead.org/~dwmw2/mtd-2.6.26 2008-06-06 11:31:18 -07:00
net tun: Fix/rewrite packet filtering logic 2008-07-14 22:18:19 -07:00
nubus
of rtc-ds1374: rename device to just "ds1374" 2008-06-06 11:29:10 -07:00
oprofile
parisc
parport
pci Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-07-05 23:08:07 -07:00
pcmcia electra_cf: Add MODULE_DEVICE_TABLE() 2008-05-27 16:07:45 -05:00
pnp PNPACPI: use _CRS IRQ descriptor length for _SRS 2008-06-11 19:13:46 -04:00
power power_supply: Fix race in power_supply_uevent 2008-06-10 02:13:51 +04:00
ps3
rapidio
rtc [ARM] 5109/1: Mark rtc sa1100 driver as wakeup source before registering it 2008-06-22 14:32:12 +01:00
s390 vlan: move struct vlan_dev_info to private header 2008-07-08 03:23:57 -07:00
sbus sbus bpp: instances missed in s/dev_name/bpp_dev_name/ 2008-05-21 16:55:59 -07:00
scsi [SCSI] esp: tidy up target reference counting 2008-06-25 12:36:13 -05:00
serial Blackfin Serial Driver: Use timer to poll CTS PIN instead of workqueue. 2008-06-19 17:46:39 +08:00
sh
sn
spi spi: fix refcount-related spidev oops-on-rmmod 2008-06-06 11:29:08 -07:00
ssb Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-07-08 16:30:17 -07:00
tc
telephony
thermal thermal: Create CONFIG_THERMAL_HWMON=n 2008-06-25 19:25:42 -04:00
uio UIO: fix race in device_create 2008-05-20 13:31:55 -07:00
usb Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2008-06-17 18:10:40 -07:00
video [ARM] 5117/1: pxafb: fix __devinit/exit annotations 2008-06-25 18:50:14 +01:00
virtio virtio: Complete feature negotation before updating status 2008-06-15 13:46:16 -07:00
w1
watchdog Revert "[WATCHDOG] hpwdt: Add CFLAGS to get driver working" 2008-06-24 13:09:26 +00:00
xen xen: Use wmb instead of rmb in xen_evtchn_do_upcall(). 2008-06-20 14:56:30 +02:00
zorro
Kconfig
Makefile