Skip to content

Commit

Permalink
packet: pdiag_put_ring() should return TX_RING info for TPACKET_V3
Browse files Browse the repository at this point in the history
Commit 7f953ab ("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: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sowmini Varadhan authored and David S. Miller committed Jan 11, 2017
1 parent 3bf0033 commit a505e58
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/packet/diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ static int pdiag_put_ring(struct packet_ring_buffer *ring, int ver, int nl_type,
{
struct packet_diag_ring pdr;

if (!ring->pg_vec || ((ver > TPACKET_V2) &&
(nl_type == PACKET_DIAG_TX_RING)))
if (!ring->pg_vec)
return 0;

pdr.pdr_block_size = ring->pg_vec_pages << PAGE_SHIFT;
Expand Down

0 comments on commit a505e58

Please sign in to comment.