From patchwork Thu Jun 16 19:26:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jay Vosburgh X-Patchwork-Id: 12884707 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F21C2C43334 for ; Thu, 16 Jun 2022 19:26:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378343AbiFPT0h (ORCPT ); Thu, 16 Jun 2022 15:26:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349272AbiFPT0g (ORCPT ); Thu, 16 Jun 2022 15:26:36 -0400 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A22E56402 for ; Thu, 16 Jun 2022 12:26:35 -0700 (PDT) Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 571763FC11 for ; Thu, 16 Jun 2022 19:26:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1655407594; bh=mpcbj81gs3lEl2jN5MD+Z1yD+aEBWzf2rIgd59qTTXU=; h=From:To:Cc:Subject:MIME-Version:Content-Type:Date:Message-ID; b=DFaYzhzAwJiXgHFbDJd6id+tQ3zLx95OfHE1RX3bGrZVnTG+JAn7aUq1jKBAZknc7 OcChi/sUoRe09ypouoYkpBXYiDkFRSw3FmBNiAnZe+rFYtUxiwGk+C9k4uSB/I3nJh yj2NmEtGM3MTMcejcUgevSqLXdA+4ZWkOT6AlfBcjLTWPaVV/6fjQCMV1wQQWeOLpF vzxeC2NJEV56Lt9lstVCm/CIsbuS57XbS5jXwh8Zt5Yk1fGMpguTBiAXTP9i9vVNIl art1abMEE5l28//z/lporkszJuyS2zMPtc53l+QT8OQldOjqwfVQud+Ox3nWifkifk VtwApuYciXhEQ== Received: by mail-pg1-f199.google.com with SMTP id w70-20020a638249000000b00406e420acfdso1138834pgd.2 for ; Thu, 16 Jun 2022 12:26:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:mime-version:content-id :content-transfer-encoding:date:message-id; bh=mpcbj81gs3lEl2jN5MD+Z1yD+aEBWzf2rIgd59qTTXU=; b=gOV7LgD953TXARzIgOypcZdBlGUe4JCvIHzwbwuh6Nn9LxzPzzP2Z/UmNxflLJq6qx Ep0vbxJeZ98eMrVkYmc6YXHAlgEdRJtiHDmKQptapvdpwuS/tp2yLR56wVMJHgmIWVzq +ZBFtnAOW18f1SB+3EMUwA451a4+8dyKt3Gz8s7OZ5CPqsCb0+6c0VI5gOEX6BcxMd4W AFf82Vk62Rk41wY8NJqg4gZ5VPKGyRWIl9hXKphAcsxie1PSa8J9vSCyKAx8Dr2WbAu+ rJe5U+2CNkhfpWu526DxkKWS76hvOkYwur/aaE5a3Lng9qHBEBtmZHymjRVX6tkkIftE aT9Q== X-Gm-Message-State: AJIora/nIiSSeumnlNdrl5CjJg4X2LMqStMyBiTq26a4x7P1dI/6vxto Zn/FSWMnYlksvsrbL7BeYyEUv/MTeOkdmygtZeqw9Vej35F2q0dJHIASG3kbZ3AjUeGgknxb29/ fd/KlDEN3U0Gy++UsnYzuGYIYsOAu1nmEJQ== X-Received: by 2002:a17:90a:e685:b0:1ea:f5c0:7e62 with SMTP id s5-20020a17090ae68500b001eaf5c07e62mr3508044pjy.8.1655407591686; Thu, 16 Jun 2022 12:26:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sMXAzLplmpCJzEGjvacTybZhzJg4Oft7kfXXb+Sz0Fz+XqN67ARgbrRw3pTJuvzRiYMFXtwg== X-Received: by 2002:a17:90a:e685:b0:1ea:f5c0:7e62 with SMTP id s5-20020a17090ae68500b001eaf5c07e62mr3508023pjy.8.1655407591435; Thu, 16 Jun 2022 12:26:31 -0700 (PDT) Received: from famine.localdomain ([50.125.80.157]) by smtp.gmail.com with ESMTPSA id s14-20020a63770e000000b003fad46ceb85sm2205137pgc.7.2022.06.16.12.26.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Jun 2022 12:26:31 -0700 (PDT) Received: by famine.localdomain (Postfix, from userid 1000) id B9CDC6093D; Thu, 16 Jun 2022 12:26:30 -0700 (PDT) Received: from famine (localhost [127.0.0.1]) by famine.localdomain (Postfix) with ESMTP id B3003A0B36; Thu, 16 Jun 2022 12:26:30 -0700 (PDT) From: Jay Vosburgh To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, Jonathan Toppins Cc: Veaceslav Falico , Andy Gospodarek Subject: [PATCH net] veth: Add updating of trans_start X-Mailer: MH-E 8.6+git; nmh 1.6; Emacs 29.0.50 MIME-Version: 1.0 Content-ID: <9087.1655407590.1@famine> Date: Thu, 16 Jun 2022 12:26:30 -0700 Message-ID: <9088.1655407590@famine> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Since commit 21a75f0915dd ("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 Tested-by: Jonathan Toppins Signed-off-by: Jay Vosburgh Fixes: 21a75f0915dd ("bonding: Fix ARP monitor validation") Link: https://lore.kernel.org/netdev/b2fd4147-8f50-bebd-963a-1a3e8d1d9715@redhat.com/ --- drivers/net/veth.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/veth.c b/drivers/net/veth.c index 466da01ba2e3..2cb833b3006a 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c @@ -312,6 +312,7 @@ static bool veth_skb_is_eligible_for_gro(const struct net_device *dev, static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) { struct veth_priv *rcv_priv, *priv = netdev_priv(dev); + struct netdev_queue *queue = NULL; struct veth_rq *rq = NULL; struct net_device *rcv; int length = skb->len; @@ -329,6 +330,7 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) rxq = skb_get_queue_mapping(skb); if (rxq < rcv->real_num_rx_queues) { rq = &rcv_priv->rq[rxq]; + queue = netdev_get_tx_queue(dev, rxq); /* The napi pointer is available when an XDP program is * attached or when GRO is enabled @@ -340,6 +342,8 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) skb_tx_timestamp(skb); if (likely(veth_forward_skb(rcv, skb, rq, use_napi) == NET_RX_SUCCESS)) { + if (queue) + txq_trans_cond_update(queue); if (!use_napi) dev_lstats_add(dev, length); } else {