From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F204C282C8 for ; Mon, 28 Jan 2019 07:54:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4EF3520881 for ; Mon, 28 Jan 2019 07:54:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726884AbfA1HyN convert rfc822-to-8bit (ORCPT ); Mon, 28 Jan 2019 02:54:13 -0500 Received: from vsmx011.vodafonemail.xion.oxcs.net ([153.92.174.89]:43543 "EHLO vsmx011.vodafonemail.xion.oxcs.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726627AbfA1HyN (ORCPT ); Mon, 28 Jan 2019 02:54:13 -0500 X-Greylist: delayed 569 seconds by postgrey-1.27 at vger.kernel.org; Mon, 28 Jan 2019 02:54:12 EST Received: from vsmx003.vodafonemail.xion.oxcs.net (unknown [192.168.75.197]) by mta-5-out.mta.xion.oxcs.net (Postfix) with ESMTP id 722063E02E0; Mon, 28 Jan 2019 07:44:42 +0000 (UTC) Received: from nextcloud.mskoehrer.de (unknown [85.13.129.61]) by mta-7-out.mta.xion.oxcs.net (Postfix) with ESMTPA id 3B9113003A8; Mon, 28 Jan 2019 07:44:38 +0000 (UTC) MIME-Version: 1.0 Date: Mon, 28 Jan 2019 07:44:37 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8BIT X-Mailer: RainLoop/1.12.1 From: mathias_koehrer@arcor.de Message-ID: Subject: TCP/IPv4 sending using MSG_ZEROCOPY and closing the socket To: netdev@vger.kernel.org, willemb@google.com X-VADE-STATUS: LEGIT Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi all, I have one question on the behavior of TCP/IPv4 sending using the MSG_ZEROCOPY flag, the kernel version is 4.19.18. What happens if I close the sending socket immediately after performing a socket send() or sendmsg() call (called with the MSG_ZEROCOPY flag)? I.e. in this situation not all messages have been sent yet, however - as the socket is closed - it is no longer possible to retrieve the completion notification via the error channel. Is it fine for the user space program to free all outstanding messages after the socket close() has returned? Or is there anything else that has to be considered? Thanks for any help Best regards Mathias