Commit a505e582 authored by Sowmini Varadhan's avatar Sowmini Varadhan Committed by David S. Miller

packet: pdiag_put_ring() should return TX_RING info for TPACKET_V3

Commit 7f953ab2 ("af_packet: TX_RING support for TPACKET_V3")
now makes it possible to use TX_RING with TPACKET_V3, so make the
the relevant information available via 'ss -e -a --packet'
Signed-off-by: default avatarSowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3bf00333
...@@ -73,8 +73,7 @@ static int pdiag_put_ring(struct packet_ring_buffer *ring, int ver, int nl_type, ...@@ -73,8 +73,7 @@ static int pdiag_put_ring(struct packet_ring_buffer *ring, int ver, int nl_type,
{ {
struct packet_diag_ring pdr; struct packet_diag_ring pdr;
if (!ring->pg_vec || ((ver > TPACKET_V2) && if (!ring->pg_vec)
(nl_type == PACKET_DIAG_TX_RING)))
return 0; return 0;
pdr.pdr_block_size = ring->pg_vec_pages << PAGE_SHIFT; pdr.pdr_block_size = ring->pg_vec_pages << PAGE_SHIFT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment