Thread (20 messages) flat view 20 messages, 3 authors, 2012-08-10

Re: [PATCH 09/14] netpoll: check netpoll tx status on the right device

From: Cong Wang <hidden>
Date: 2012-08-10 07:52:46

On Fri, 2012-08-10 at 09:20 +0200, Jiri Pirko wrote:
quoted
+static inline int team_dev_queue_xmit(struct team *team, struct team_port *port,
+				      struct sk_buff *skb)
+{
+	BUILD_BUG_ON(sizeof(skb->queue_mapping) !=
+		     sizeof(qdisc_skb_cb(skb)->slave_dev_queue_mapping));
+	skb_set_queue_mapping(skb, qdisc_skb_cb(skb)->slave_dev_queue_mapping);
+
+	skb->dev = port->dev;
+	if (unlikely(netpoll_tx_running(team->dev))) {
+		team_netpoll_send_skb(port, skb);
+		return 0;
+	}
+	return dev_queue_xmit(skb);
+}
+
Is there any particular reason for moving the whole function?
In the changelog I mentioned:

"For team_dev_queue_xmit() we have to move it down to avoid
compile errors."

Or you mean this isn't clear? As I changed 'port->dev' to 'team->dev',
so the definition of 'struct team' has to be visual to
team_dev_queue_xmit(), therefore I moved to down after that definition.

Thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help