Skip to content

Commit

Permalink
packet: remove handling of tx_ring from prb_shutdown_retire_blk_timer()
Browse files Browse the repository at this point in the history
Follow e8e85cc ("packet: remove handling of tx_ring") and remove
the tx_ring parameter from prb_shutdown_retire_blk_timer() as it is only
called with tx_ring = 0.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Tobias Klauser authored and David S. Miller committed Jul 29, 2015
1 parent b88d0a0 commit 73d0fcf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions net/packet/af_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,13 +518,11 @@ static void prb_del_retire_blk_timer(struct tpacket_kbdq_core *pkc)
}

static void prb_shutdown_retire_blk_timer(struct packet_sock *po,
int tx_ring,
struct sk_buff_head *rb_queue)
{
struct tpacket_kbdq_core *pkc;

pkc = tx_ring ? GET_PBDQC_FROM_RB(&po->tx_ring) :
GET_PBDQC_FROM_RB(&po->rx_ring);
pkc = GET_PBDQC_FROM_RB(&po->rx_ring);

spin_lock_bh(&rb_queue->lock);
pkc->delete_blk_timer = 1;
Expand Down Expand Up @@ -4044,7 +4042,7 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
if (closing && (po->tp_version > TPACKET_V2)) {
/* Because we don't support block-based V3 on tx-ring */
if (!tx_ring)
prb_shutdown_retire_blk_timer(po, tx_ring, rb_queue);
prb_shutdown_retire_blk_timer(po, rb_queue);
}
release_sock(sk);

Expand Down

0 comments on commit 73d0fcf

Please sign in to comment.