<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/packet, branch v3.2.2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/packet?h=v3.2.2</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/packet?h=v3.2.2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-12-28T03:32:41Z</updated>
<entry>
<title>packet: fix possible dev refcnt leak when bind fail</title>
<updated>2011-12-28T03:32:41Z</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2011-12-28T03:32:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=aef950b4ba3196622a5bd5e21ab1d63f30658285'/>
<id>urn:sha1:aef950b4ba3196622a5bd5e21ab1d63f30658285</id>
<content type='text'>
If bind is fail when bind is called after set PACKET_FANOUT
sock option, the dev refcnt will leak.

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: relax rcvbuf limits</title>
<updated>2011-12-23T07:15:14Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-12-21T07:11:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0fd7bac6b6157eed6cf0cb86a1e88ba29e57c033'/>
<id>urn:sha1:0fd7bac6b6157eed6cf0cb86a1e88ba29e57c033</id>
<content type='text'>
skb-&gt;truesize might be big even for a small packet.

Its even bigger after commit 87fb4b7b533 (net: more accurate skb
truesize) and big MTU.

We should allow queueing at least one packet per receiver, even with a
low RCVBUF setting.

Reported-by: Michal Simek &lt;monstr@monstr.eu&gt;
Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>af_packet: de-inline some helper functions</title>
<updated>2011-11-03T22:11:51Z</updated>
<author>
<name>Olof Johansson</name>
<email>olof@lixom.net</email>
</author>
<published>2011-11-02T11:00:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=eea49cc9009767dfbafd673ee577854454b52e0d'/>
<id>urn:sha1:eea49cc9009767dfbafd673ee577854454b52e0d</id>
<content type='text'>
This popped some compiler errors due to mismatched prototypes. Just
remove most manual inlines, the compiler should be able to figure out
what makes sense to inline and not.

net/packet/af_packet.c:252: warning: 'prb_curr_blk_in_use' declared inline after being called
net/packet/af_packet.c:252: warning: previous declaration of 'prb_curr_blk_in_use' was here
net/packet/af_packet.c:258: warning: 'prb_queue_frozen' declared inline after being called
net/packet/af_packet.c:258: warning: previous declaration of 'prb_queue_frozen' was here
net/packet/af_packet.c:248: warning: 'packet_previous_frame' declared inline after being called
net/packet/af_packet.c:248: warning: previous declaration of 'packet_previous_frame' was here
net/packet/af_packet.c:251: warning: 'packet_increment_head' declared inline after being called
net/packet/af_packet.c:251: warning: previous declaration of 'packet_increment_head' was here

Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
Cc: Chetan Loke &lt;loke.chetan@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>macvlan: handle fragmented multicast frames</title>
<updated>2011-10-19T03:22:07Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-10-06T10:28:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bc416d9768aa9a2e46eb11354a9c58399dafeb01'/>
<id>urn:sha1:bc416d9768aa9a2e46eb11354a9c58399dafeb01</id>
<content type='text'>
Fragmented multicast frames are delivered to a single macvlan port,
because ip defrag logic considers other samples are redundant.

Implement a defrag step before trying to send the multicast frame.

Reported-by: Ben Greear &lt;greearb@candelatech.com&gt;
Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>af_packet: remove unnecessary BUG_ON() in tpacket_destruct_skb</title>
<updated>2011-10-10T18:09:08Z</updated>
<author>
<name>danborkmann@iogearbox.net</name>
<email>danborkmann@iogearbox.net</email>
</author>
<published>2011-10-10T06:52:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=95f5f803b3897f622c4b5f72d554874faf74df12'/>
<id>urn:sha1:95f5f803b3897f622c4b5f72d554874faf74df12</id>
<content type='text'>
If skb is NULL, then stack trace is thrown anyway on dereference.
Therefore, the stack trace triggered by BUG_ON is duplicate.

Signed-off-by: Daniel Borkmann &lt;danborkmann@googlemail.com&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Acked-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of github.com:davem330/net</title>
<updated>2011-10-07T17:38:43Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-10-07T17:38:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=88c5100c28b02c4b2b2c6f6fafbbd76d90f698b9'/>
<id>urn:sha1:88c5100c28b02c4b2b2c6f6fafbbd76d90f698b9</id>
<content type='text'>
Conflicts:
	net/batman-adv/soft-interface.c
</content>
</entry>
<entry>
<title>make PACKET_STATISTICS getsockopt report consistently between ring and non-ring</title>
<updated>2011-10-03T18:18:26Z</updated>
<author>
<name>Willem de Bruijn</name>
<email>willemb@google.com</email>
</author>
<published>2011-09-30T10:38:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7091fbd82cd5686444ffe9935ed6a8190101fe9d'/>
<id>urn:sha1:7091fbd82cd5686444ffe9935ed6a8190101fe9d</id>
<content type='text'>
This is a minor change.

Up until kernel 2.6.32, getsockopt(fd, SOL_PACKET, PACKET_STATISTICS,
...) would return total and dropped packets since its last invocation. The
introduction of socket queue overflow reporting [1] changed drop
rate calculation in the normal packet socket path, but not when using a
packet ring. As a result, the getsockopt now returns different statistics
depending on the reception method used. With a ring, it still returns the
count since the last call, as counts are incremented in tpacket_rcv and
reset in getsockopt. Without a ring, it returns 0 if no drops occurred
since the last getsockopt and the total drops over the lifespan of
the socket otherwise. The culprit is this line in packet_rcv, executed
on a drop:

drop_n_acct:
        po-&gt;stats.tp_drops = atomic_inc_return(&amp;sk-&gt;sk_drops);

As it shows, the new drop number it taken from the socket drop counter,
which is not reset at getsockopt. I put together a small example
that demonstrates the issue [2]. It runs for 10 seconds and overflows
the queue/ring on every odd second. The reported drop rates are:
ring: 16, 0, 16, 0, 16, ...
non-ring: 0, 15, 0, 30, 0, 46, 0, 60, 0 , 74.

Note how the even ring counts monotonically increase. Because the
getsockopt adds tp_drops to tp_packets, total counts are similarly
reported cumulatively. Long story short, reinstating the original code, as
the below patch does, fixes the issue at the cost of additional per-packet
cycles. Another solution that does not introduce per-packet overhead
is be to keep the current data path, record the value of sk_drops at
getsockopt() at call N in a new field in struct packetsock and subtract
that when reporting at call N+1. I'll be happy to code that, instead,
it's just more messy.

[1] http://patchwork.ozlabs.org/patch/35665/
[2] http://kernel.googlecode.com/files/test-packetsock-getstatistics.c

Signed-off-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: consolidate and fix ethtool_ops-&gt;get_settings calling</title>
<updated>2011-09-15T21:32:26Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jpirko@redhat.com</email>
</author>
<published>2011-09-03T03:34:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4bc71cb983fd2844e603bf633df2bb53385182d2'/>
<id>urn:sha1:4bc71cb983fd2844e603bf633df2bb53385182d2</id>
<content type='text'>
This patch does several things:
- introduces __ethtool_get_settings which is called from ethtool code and
  from drivers as well. Put ASSERT_RTNL there.
- dev_ethtool_get_settings() is replaced by __ethtool_get_settings()
- changes calling in drivers so rtnl locking is respected. In
  iboe_get_rate was previously -&gt;get_settings() called unlocked. This
  fixes it. Also prb_calc_retire_blk_tmo() in af_packet.c had the same
  problem. Also fixed by calling __dev_get_by_index() instead of
  dev_get_by_index() and holding rtnl_lock for both calls.
- introduces rtnl_lock in bnx2fc_vport_create() and fcoe_vport_create()
  so bnx2fc_if_create() and fcoe_if_create() are called locked as they
  are from other places.
- use __ethtool_get_settings() in bonding code

Signed-off-by: Jiri Pirko &lt;jpirko@redhat.com&gt;

v2-&gt;v3:
	-removed dev_ethtool_get_settings()
	-added ASSERT_RTNL into __ethtool_get_settings()
	-prb_calc_retire_blk_tmo - use __dev_get_by_index() and lock
	 around it and __ethtool_get_settings() call
v1-&gt;v2:
        add missing export_symbol
Reviewed-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt; [except FCoE bits]
Acked-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>af_packet: Prefixed tpacket_v3 structs to avoid name space collision</title>
<updated>2011-08-26T16:38:44Z</updated>
<author>
<name>chetan loke</name>
<email>loke.chetan@gmail.com</email>
</author>
<published>2011-08-25T10:43:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bc59ba399113fcbcac56ba22edde4b816199d48c'/>
<id>urn:sha1:bc59ba399113fcbcac56ba22edde4b816199d48c</id>
<content type='text'>
structs introduced in tpacket_v3 implementation are prefixed with 'tpacket'
to avoid namespace collision.

Compile tested.

Signed-off-by: Chetan Loke &lt;loke.chetan@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>af-packet: TPACKET_V3 flexible buffer implementation.</title>
<updated>2011-08-25T02:40:40Z</updated>
<author>
<name>chetan loke</name>
<email>loke.chetan@gmail.com</email>
</author>
<published>2011-08-19T10:18:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f6fb8f100b807378fda19e83e5ac6828b638603a'/>
<id>urn:sha1:f6fb8f100b807378fda19e83e5ac6828b638603a</id>
<content type='text'>
1) Blocks can be configured with non-static frame-size.
2) Read/poll is at a block-level(as opposed to packet-level).
3) Added poll timeout to avoid indefinite user-space wait on idle links.
4) Added user-configurable knobs:
   4.1) block::timeout.
   4.2) tpkt_hdr::sk_rxhash.

Changes:
C1) tpacket_rcv()
    C1.1) packet_current_frame() is replaced by packet_current_rx_frame()
          The bulk of the processing is then moved in the following chain:
          packet_current_rx_frame()
            __packet_lookup_frame_in_block
              fill_curr_block()
              or
                retire_current_block
                dispatch_next_block
              or
              return NULL(queue is plugged/paused)

Signed-off-by: Chetan Loke &lt;loke.chetan@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
