Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46f5960f authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (32 commits)
  [NET]: Fix more per-cpu typos
  [SECURITY]: Fix build with CONFIG_SECURITY disabled.
  [I/OAT]: Remove CPU hotplug lock from net_dma_rebalance
  [DECNET]: Fix for routing bug
  [AF_UNIX]: Kernel memory leak fix for af_unix datagram getpeersec patch
  [NET]: skb_queue_lock_key() is no longer used.
  [NET]: Remove lockdep_set_class() call from skb_queue_head_init().
  [IPV6]: SNMPv2 "ipv6IfStatsOutFragCreates" counter error
  [IPV6]: SNMPv2 "ipv6IfStatsInHdrErrors" counter error
  [NET]: Kill the WARN_ON() calls for checksum fixups.
  [NETFILTER]: xt_hashlimit/xt_string: missing string validation
  [NETFILTER]: SIP helper: expect RTP streams in both directions
  [E1000]: Convert to netdev_alloc_skb
  [TG3]: Convert to netdev_alloc_skb
  [NET]: Add netdev_alloc_skb().
  [TCP]: Process linger2 timeout consistently.
  [SECURITY] secmark: nul-terminate secdata
  [NET] infiniband: Cleanup ib_addr module to use the netevents
  [NET]: Core net changes to generate netevents
  [NET]: Network Event Notifier Mechanism.
  ...
parents 90eb29ef 29bbd72d
Loading
Loading
Loading
Loading
+14 −16
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@
#include <net/arp.h>
#include <net/neighbour.h>
#include <net/route.h>
#include <net/netevent.h>
#include <rdma/ib_addr.h>

MODULE_AUTHOR("Sean Hefty");
@@ -326,25 +327,22 @@ void rdma_addr_cancel(struct rdma_dev_addr *addr)
}
EXPORT_SYMBOL(rdma_addr_cancel);

static int addr_arp_recv(struct sk_buff *skb, struct net_device *dev,
			 struct packet_type *pkt, struct net_device *orig_dev)
static int netevent_callback(struct notifier_block *self, unsigned long event, 
	void *ctx)
{
	struct arphdr *arp_hdr;
	if (event == NETEVENT_NEIGH_UPDATE) {  
		struct neighbour *neigh = ctx;

	arp_hdr = (struct arphdr *) skb->nh.raw;

	if (arp_hdr->ar_op == htons(ARPOP_REQUEST) ||
	    arp_hdr->ar_op == htons(ARPOP_REPLY))
		if (neigh->dev->type == ARPHRD_INFINIBAND &&
		    (neigh->nud_state & NUD_VALID)) {
			set_timeout(jiffies);

	kfree_skb(skb);
		}
	}
	return 0;
}

static struct packet_type addr_arp = {
	.type           = __constant_htons(ETH_P_ARP),
	.func           = addr_arp_recv,
	.af_packet_priv = (void*) 1,
static struct notifier_block nb = {
	.notifier_call = netevent_callback
};

static int addr_init(void)
@@ -353,13 +351,13 @@ static int addr_init(void)
	if (!addr_wq)
		return -ENOMEM;

	dev_add_pack(&addr_arp);
	register_netevent_notifier(&nb);
	return 0;
}

static void addr_cleanup(void)
{
	dev_remove_pack(&addr_arp);
	unregister_netevent_notifier(&nb);
	destroy_workqueue(addr_wq);
}

+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ config ATALK
	  even politically correct people are allowed to say Y here.

config DEV_APPLETALK
	bool "Appletalk interfaces support"
	tristate "Appletalk interfaces support"
	depends on ATALK
	help
	  AppleTalk is the protocol that Apple computers can use to communicate
+6 −5
Original line number Diff line number Diff line
@@ -3127,7 +3127,7 @@ e1000_change_mtu(struct net_device *netdev, int new_mtu)
		break;
	}

	/* NOTE: dev_alloc_skb reserves 16 bytes, and typically NET_IP_ALIGN
	/* NOTE: netdev_alloc_skb reserves 16 bytes, and typically NET_IP_ALIGN
	 * means we reserve 2 more, this pushes us to allocate from the next
	 * larger slab size
	 * i.e. RXBUFFER_2048 --> size-4096 slab */
@@ -3708,7 +3708,7 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,
#define E1000_CB_LENGTH 256
		if (length < E1000_CB_LENGTH) {
			struct sk_buff *new_skb =
			    dev_alloc_skb(length + NET_IP_ALIGN);
			    netdev_alloc_skb(netdev, length + NET_IP_ALIGN);
			if (new_skb) {
				skb_reserve(new_skb, NET_IP_ALIGN);
				new_skb->dev = netdev;
@@ -3979,7 +3979,7 @@ e1000_alloc_rx_buffers(struct e1000_adapter *adapter,

	while (cleaned_count--) {
		if (!(skb = buffer_info->skb))
			skb = dev_alloc_skb(bufsz);
			skb = netdev_alloc_skb(netdev, bufsz);
		else {
			skb_trim(skb, 0);
			goto map_skb;
@@ -3997,7 +3997,7 @@ e1000_alloc_rx_buffers(struct e1000_adapter *adapter,
			DPRINTK(RX_ERR, ERR, "skb align check failed: %u bytes "
					     "at %p\n", bufsz, skb->data);
			/* Try again, without freeing the previous */
			skb = dev_alloc_skb(bufsz);
			skb = netdev_alloc_skb(netdev, bufsz);
			/* Failed allocation, critical failure */
			if (!skb) {
				dev_kfree_skb(oldskb);
@@ -4121,7 +4121,8 @@ e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter,
				rx_desc->read.buffer_addr[j+1] = ~0;
		}

		skb = dev_alloc_skb(adapter->rx_ps_bsize0 + NET_IP_ALIGN);
		skb = netdev_alloc_skb(netdev,
				       adapter->rx_ps_bsize0 + NET_IP_ALIGN);

		if (unlikely(!skb)) {
			adapter->alloc_rx_buff_failed++;
+5 −5
Original line number Diff line number Diff line
@@ -68,8 +68,8 @@

#define DRV_MODULE_NAME		"tg3"
#define PFX DRV_MODULE_NAME	": "
#define DRV_MODULE_VERSION	"3.63"
#define DRV_MODULE_RELDATE	"July 25, 2006"
#define DRV_MODULE_VERSION	"3.64"
#define DRV_MODULE_RELDATE	"July 31, 2006"

#define TG3_DEF_MAC_MODE	0
#define TG3_DEF_RX_MODE		0
@@ -3097,7 +3097,7 @@ static int tg3_alloc_rx_skb(struct tg3 *tp, u32 opaque_key,
	 * Callers depend upon this behavior and assume that
	 * we leave everything unchanged if we fail.
	 */
	skb = dev_alloc_skb(skb_size);
	skb = netdev_alloc_skb(tp->dev, skb_size);
	if (skb == NULL)
		return -ENOMEM;

@@ -3270,7 +3270,7 @@ static int tg3_rx(struct tg3 *tp, int budget)
			tg3_recycle_rx(tp, opaque_key,
				       desc_idx, *post_ptr);

			copy_skb = dev_alloc_skb(len + 2);
			copy_skb = netdev_alloc_skb(tp->dev, len + 2);
			if (copy_skb == NULL)
				goto drop_it_no_recycle;

@@ -8618,7 +8618,7 @@ static int tg3_run_loopback(struct tg3 *tp, int loopback_mode)
	err = -EIO;

	tx_len = 1514;
	skb = dev_alloc_skb(tx_len);
	skb = netdev_alloc_skb(tp->dev, tx_len);
	if (!skb)
		return -ENOMEM;

+0 −1
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@

#include <linux/netfilter.h>
#if defined(__KERNEL__) && defined(CONFIG_BRIDGE_NETFILTER)
#include <asm/atomic.h>
#include <linux/if_ether.h>
#endif

Loading