Skip to content

Commit e66e257

Browse files
jay-vosburghdavem330
authored andcommitted
veth: Add updating of trans_start
Since commit 21a75f0 ("bonding: Fix ARP monitor validation"), the bonding ARP / ND link monitors depend on the trans_start time to determine link availability. NETIF_F_LLTX drivers must update trans_start directly, which veth does not do. This prevents use of the ARP or ND link monitors with veth interfaces in a bond. Resolve this by having veth_xmit update the trans_start time. Reported-by: Jonathan Toppins <jtoppins@redhat.com> Tested-by: Jonathan Toppins <jtoppins@redhat.com> Signed-off-by: Jay Vosburgh <jay.vosburgh@canonical.com> Fixes: 21a75f0 ("bonding: Fix ARP monitor validation") Link: https://lore.kernel.org/netdev/b2fd4147-8f50-bebd-963a-1a3e8d1d9715@redhat.com/ Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent cc26c26 commit e66e257

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/net/veth.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ static bool veth_skb_is_eligible_for_gro(const struct net_device *dev,
312312
static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev)
313313
{
314314
struct veth_priv *rcv_priv, *priv = netdev_priv(dev);
315+
struct netdev_queue *queue = NULL;
315316
struct veth_rq *rq = NULL;
316317
struct net_device *rcv;
317318
int length = skb->len;
@@ -329,6 +330,7 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev)
329330
rxq = skb_get_queue_mapping(skb);
330331
if (rxq < rcv->real_num_rx_queues) {
331332
rq = &rcv_priv->rq[rxq];
333+
queue = netdev_get_tx_queue(dev, rxq);
332334

333335
/* The napi pointer is available when an XDP program is
334336
* attached or when GRO is enabled
@@ -340,6 +342,8 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev)
340342

341343
skb_tx_timestamp(skb);
342344
if (likely(veth_forward_skb(rcv, skb, rq, use_napi) == NET_RX_SUCCESS)) {
345+
if (queue)
346+
txq_trans_cond_update(queue);
343347
if (!use_napi)
344348
dev_lstats_add(dev, length);
345349
} else {

0 commit comments

Comments
 (0)