Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201086
b: refs/heads/master
c: b0f77d0
h: refs/heads/master
v: v3
  • Loading branch information
Tom Herbert authored and David S. Miller committed Jul 15, 2010
1 parent ecb92bd commit 127a998
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 91a72a70594e5212c97705ca6a694bd307f7a26b
refs/heads/master: b0f77d0eae0c58a5a9691a067ada112ceeae2d00
7 changes: 1 addition & 6 deletions trunk/include/net/sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -1224,12 +1224,7 @@ static inline void sk_tx_queue_clear(struct sock *sk)

static inline int sk_tx_queue_get(const struct sock *sk)
{
return sk->sk_tx_queue_mapping;
}

static inline bool sk_tx_queue_recorded(const struct sock *sk)
{
return (sk && sk->sk_tx_queue_mapping >= 0);
return sk ? sk->sk_tx_queue_mapping : -1;
}

static inline void sk_set_socket(struct sock *sk, struct socket *sock)
Expand Down
7 changes: 3 additions & 4 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2029,12 +2029,11 @@ static inline u16 dev_cap_txqueue(struct net_device *dev, u16 queue_index)
static struct netdev_queue *dev_pick_tx(struct net_device *dev,
struct sk_buff *skb)
{
u16 queue_index;
int queue_index;
struct sock *sk = skb->sk;

if (sk_tx_queue_recorded(sk)) {
queue_index = sk_tx_queue_get(sk);
} else {
queue_index = sk_tx_queue_get(sk);
if (queue_index < 0) {
const struct net_device_ops *ops = dev->netdev_ops;

if (ops->ndo_select_queue) {
Expand Down

0 comments on commit 127a998

Please sign in to comment.