diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 1d6832878930..aaa33d44b01c 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -833,6 +833,8 @@ enum skb_tstamp_type {
  *	@_nfct: Associated connection, if any (with nfctinfo bits)
  *	@skb_iif: ifindex of device we arrived on
  *	@tc_depth: counter for packet duplication
+ *	@tx_queue_from_hash: select the TX queue from the packet hash rather
+ *		than the owning socket or producer CPU
  *	@tc_index: Traffic control index
  *	@hash: the packet hash
  *	@queue_mapping: Queue mapping for multiqueue devices
@@ -1043,6 +1045,7 @@ struct sk_buff {
 #endif
 	__u8			unreadable:1;
 	__u8			tc_depth:2;
+	__u8			tx_queue_from_hash:1;
 #if defined(CONFIG_NET_SCHED) || defined(CONFIG_NET_XGRESS)
 	__u16			tc_index;	/* traffic control index */
 #endif
@@ -5268,6 +5271,21 @@ static inline void skb_copy_queue_mapping(struct sk_buff *to, const struct sk_bu
 	to->queue_mapping = from->queue_mapping;
 }
 
+static inline void skb_set_tx_queue_from_hash(struct sk_buff *skb)
+{
+	skb->tx_queue_from_hash = 1;
+}
+
+static inline void skb_clear_tx_queue_from_hash(struct sk_buff *skb)
+{
+	skb->tx_queue_from_hash = 0;
+}
+
+static inline bool skb_tx_queue_from_hash(const struct sk_buff *skb)
+{
+	return skb->tx_queue_from_hash;
+}
+
 static inline void skb_record_rx_queue(struct sk_buff *skb, u16 rx_queue)
 {
 	skb->queue_mapping = rx_queue + 1;
diff --git a/net/core/dev.c b/net/core/dev.c
index a230ecce9327..e150d5e92712 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3625,7 +3625,7 @@ static u16 skb_tx_hash(const struct net_device *dev,
 		}
 	}
 
-	if (skb_rx_queue_recorded(skb)) {
+	if (!skb_tx_queue_from_hash(skb) && skb_rx_queue_recorded(skb)) {
 		DEBUG_NET_WARN_ON_ONCE(qcount == 0);
 		hash = skb_get_rx_queue(skb);
 		if (hash >= qoffset)
@@ -4925,9 +4925,13 @@ u16 netdev_pick_tx(struct net_device *dev, struct sk_buff *skb,
 		     struct net_device *sb_dev)
 {
 	struct sock *sk = skb->sk;
-	int queue_index = sk_tx_queue_get(sk);
+	int queue_index;
 
 	sb_dev = sb_dev ? : dev;
+	if (skb_tx_queue_from_hash(skb))
+		return skb_tx_hash(dev, sb_dev, skb);
+
+	queue_index = sk_tx_queue_get(sk);
 
 	if (queue_index < 0 || skb->ooo_okay ||
 	    queue_index >= dev->real_num_tx_queues) {
