Project

General

Profile

Actions

Bug #14199

closed

sendfile compat checks shouldn't be done in so_sendmblk

Added by Andy Fiddaman 7 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

This is an upstream of https://smartos.org/bugview/OS-3893, a pre-requisite for #13500

From the original Joyent bug:

Currently we're checking in so_sendmblk whether or not we are using sendfile with this interface and whether the underlying protocol supports it. However, it's actually being done at the wrong layer in essence. One can use the so_sendmblk interface, such as with ksockets, without needing to use sendfile at all. And in fact the other interfaces just convert data into mblk_t's and pass it down to the lower layer.

Work by Robert Mustacchi


Related issues

Blocks illumos gate - Feature #13500: Want support for overlay networksClosedAndy Fiddaman

Actions
Actions #1

Updated by Andy Fiddaman 7 months ago

Actions #2

Updated by Electric Monk 5 months ago

  • Gerrit CR set to 1869
Actions #3

Updated by Andy Fiddaman 5 months ago

This change has been in SmartOS and OmniOS for some time as part of support for overlays.

I tested this change against gate using the nginx web server to ensure that sendfile() over sockets continued to work after the change.

# dtrace -n 'fbt::so_sendmblk:entry{@[execname, stack()] = count()}'
dtrace: description 'fbt::so_sendmblk:entry' matched 1 probe
^C

  nginx
              sockfs`socket_sendmblk+0x1f
              genunix`sendvec_chunk+0x902
              genunix`sendfilev+0x2ba
              unix`sys_syscall+0x1a8
               17
Actions #4

Updated by Electric Monk 5 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 940f8ece5acb5b0357183d67a538402d24d89a81

commit  940f8ece5acb5b0357183d67a538402d24d89a81
Author: Robert Mustacchi <rm@joyent.com>
Date:   2022-01-05T20:45:54.000Z

    14199 sendfile compat checks shouldn't be done in so_sendmblk
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Andy Fiddaman <andy@omnios.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF