From nobody Fri Apr 15 15:56:49 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4F3F87CD693; Fri, 15 Apr 2022 15:56:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kg1D16K6zz3Fj7; Fri, 15 Apr 2022 15:56:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650038209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=grGKYAHgDlnZPwSjQompThHtt3N0eG8VJLYD0QRht84=; b=Y3lD0r1GHOcstiQ0HkSRCII6XU9RGLKNbXbiLWUm0gJk6cV+IRoEJK1c8l0J6AJsQTuV4I FsitTYE189Wy/lmXO+SL/q2p3SecTvCgprL1IlMcizTu3amtTv9vbzI4guHsFQ6F2/dGIZ 0yHDBIup+aYC8M9/fTO5EjLrw5CvzXe98DUDw8sM7VxQlbyW/ne7ehXiuLdtLIElPq65UM V/W8xbfrsD84PrE4KCBjlrJqn3V5eTQ5CbbrHHuDIhjw9HnGx3ICrVhrm592eJJiD3a5xp awLJFjDLCsd+p5TzuyKKZq7SB05K3DitxSj+N4+zl7sRYf6swhJl5iz9r0HayA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8BBC18389; Fri, 15 Apr 2022 15:56:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23FFunGK084286; Fri, 15 Apr 2022 15:56:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23FFunxE084285; Fri, 15 Apr 2022 15:56:49 GMT (envelope-from git) Date: Fri, 15 Apr 2022 15:56:49 GMT Message-Id: <202204151556.23FFunxE084285@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 952643ea4526 - main - LinuxKPI: skbuff: dev_kfree_skb_irq() and improvements List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 952643ea452655a8e80d1b5e1cc2cae35cb73870 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650038209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=grGKYAHgDlnZPwSjQompThHtt3N0eG8VJLYD0QRht84=; b=jp++0YQarwBZ7MfQ+6Uc4d2/Ni0a42Q01IRp/lsuG6UTEkWQpV/ngCc78WiaAdjeKw4OkU Jn5FuG+6Y7Yb77ECFWGyw/lGU/WkRowbAfBpX6JaH4ow2APeuUJOQvNhUqEgv51le2fFZ5 CZoECff4muK1xcoHTNQSBh9SWqekE3gaytqQL6iYQm+fImkf8PPO4xzb9KMAj6AUS2r68C x0KE5KV3gJ2EVThJY38pJBGnRdSTkV4l4Tue0jO37A8TkwgSgoeroApkciVBQE78gdTiEk jbgMRpItOJNTH4nJxgj9rFOphQXbHGxOTPiJQ/2M/Ec/5uer6vLqrrc2wpo7lA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650038209; a=rsa-sha256; cv=none; b=KiR7V9gjwu0t6K+YN3gcCOJxmQsTr02JhPaHhy38l2xf2iPr7XknCeP+T+BcI6AZJIoci+ s0MEsBKjsKjI7Ax89SmcaqSlx2/bl82gs2zNCxgVisR9iKyLCUIs90omigsUHyE+rY+Ijr LEVUM3a6gJorN1q3VKsY4sP3PGjRBpy4aosPduaSJw1GmL0rbvRleU53E2VnV8C+kO0GnA JlbaXMKz3h19Vindfq1IRtAw1brs3+RtJ/w9A8IjTALTCsKRW434o8KRe1sNKylW+hjy8b luGAachQx1e7P0uewqRIv+NETVGqLKqn02f/mDO/VrzVswyg0MJu2cQm7+Ickw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=952643ea452655a8e80d1b5e1cc2cae35cb73870 commit 952643ea452655a8e80d1b5e1cc2cae35cb73870 Author: Bjoern A. Zeeb AuthorDate: 2022-04-15 12:25:39 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-04-15 15:54:03 +0000 LinuxKPI: skbuff: dev_kfree_skb_irq() and improvements While it is currently unclear if we will have to defer work in dev_kfree_skb_irq() to call dev_kfree_skb(). We only have one caller which seems to be fine on FreeBSD by calling it directly for now. While here shortcut skb_put()/skb_put_data() saving us work if there are no adjustments to do. Also adjust the logging in skb_is_gso() to avoid getting spammed by it. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/include/linux/skbuff.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/skbuff.h b/sys/compat/linuxkpi/common/include/linux/skbuff.h index 79d65c0169b3..2b1b66844640 100644 --- a/sys/compat/linuxkpi/common/include/linux/skbuff.h +++ b/sys/compat/linuxkpi/common/include/linux/skbuff.h @@ -231,7 +231,8 @@ static inline void dev_kfree_skb_irq(struct sk_buff *skb) { SKB_TRACE(skb); - SKB_TODO(); + SKB_IMPROVE("Do we have to defer this?"); + dev_kfree_skb(skb); } /* -------------------------------------------------------------------------- */ @@ -331,6 +332,8 @@ skb_put(struct sk_buff *skb, size_t len) skb, skb->tail, len, skb->end, skb->head, skb->data, skb->len)); s = skb_tail_pointer(skb); + if (len == 0) + return (s); skb->tail += len; skb->len += len; #ifdef SKB_DEBUG @@ -350,6 +353,8 @@ skb_put_data(struct sk_buff *skb, const void *buf, size_t len) SKB_TRACE2(skb, buf); s = skb_put(skb, len); + if (len == 0) + return (s); memcpy(s, buf, len); return (s); } @@ -752,7 +757,7 @@ static inline bool skb_is_gso(struct sk_buff *skb) { SKB_TRACE(skb); - SKB_TODO(); + SKB_IMPROVE("Really a TODO but get it away from logging"); return (false); }