From owner-freebsd-net@freebsd.org Sun Apr 10 11:35:58 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5876BAE26CB for ; Sun, 10 Apr 2016 11:35:58 +0000 (UTC) (envelope-from wafah@mellanox.com) Received: from emea01-am1-obe.outbound.protection.outlook.com (mail-am1on0100.outbound.protection.outlook.com [157.56.112.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AEED3105D for ; Sun, 10 Apr 2016 11:35:57 +0000 (UTC) (envelope-from wafah@mellanox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=HW57LrmHD9rFbeSjFVh5KPRZmqKcnP0RC6uGpK0L7nw=; b=a1pxBVHLGTdurI4cpSvWNMauE2HZPDgvVKUFeYjSjpzDzzZmLZ9+l4TAJfX47t1wtX06lUhH++C/QpKd9Z1MDTo1lgNW/WahUy93wfBq7JCi3o6ARbFV+2MADbry2mNdfT9SOOyxKFKCFx0nlBwTRKQA2VpnDIy65E8lAx5FW4k= Received: from HE1PR05MB1676.eurprd05.prod.outlook.com (10.169.119.154) by HE1PR05MB1306.eurprd05.prod.outlook.com (10.162.250.151) with Microsoft SMTP Server (TLS) id 15.1.447.15; Sun, 10 Apr 2016 08:00:51 +0000 Received: from HE1PR05MB1676.eurprd05.prod.outlook.com ([10.169.119.154]) by HE1PR05MB1676.eurprd05.prod.outlook.com ([10.169.119.154]) with mapi id 15.01.0453.028; Sun, 10 Apr 2016 08:00:51 +0000 From: Wafa Hamzah To: "freebsd-net@freebsd.org" CC: Meny Yossefi , Yuval Bason Subject: Create socket to send and receive arp packets - Freebsd Thread-Topic: Create socket to send and receive arp packets - Freebsd Thread-Index: AdGS/vMmvJQbA6w/Rh6OngjzhaUatA== Date: Sun, 10 Apr 2016 08:00:50 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: freebsd.org; dkim=none (message not signed) header.d=none;freebsd.org; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [5.34.160.170] x-ms-office365-filtering-correlation-id: eb532ba8-eb0a-4af9-e266-08d361163bcf x-microsoft-exchange-diagnostics: 1; HE1PR05MB1306; 5:a7flyX3U/BBhgbPRyZNdsliX7XoqK4Gou41vz9oOLAnxAl9LO3V0ldIRaEhyB8MEFTdPxZzG9+4jfKgKeiKM+CuehbL4c0CIzZDaNzPB5iuAajBha+RqBeVfD6PijbOcvwiEy9nt52ueUPqfvJ6Byg==; 24:okJd44WC/kxHkxqlhn1XZg7YFMaZog9w8JEaHTMabe/mWmuYD3+WPZF3cqROe8SQ9YhEW6WJIHcmCWqsoamhgP+5E9B6MPN0Mg1bd40cV8c= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HE1PR05MB1306; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001); SRVR:HE1PR05MB1306; BCL:0; PCL:0; RULEID:; SRVR:HE1PR05MB1306; x-forefront-prvs: 09086FB5C5 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(2906002)(4001430100002)(2501003)(3660700001)(33656002)(76576001)(586003)(2900100001)(4326007)(5008740100001)(16236675004)(3280700002)(5630700001)(11100500001)(229853001)(189998001)(74316001)(9686002)(110136002)(92566002)(107886002)(2351001)(10400500002)(54356999)(19300405004)(86362001)(122556002)(5004730100002)(15975445007)(71446004)(19580395003)(5003600100002)(77096005)(81166005)(5002640100001)(87936001)(1096002)(790700001)(50986999)(97736004)(6116002)(19625215002)(102836003)(66066001)(3846002)(450100001)(5640700001)(1220700001); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR05MB1306; H:HE1PR05MB1676.eurprd05.prod.outlook.com; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2016 08:00:50.8151 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR05MB1306 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2016 11:35:58 -0000 Hi, We are trying to send arp requests from user space using a RAW socket. Our Linux reference suggest the following flags when creating the socket: s= =3D socket (PF_PACKET, SOCK_PACKET, htons(ETH_P_ARP))). For FreeBSD support, we replaced PF_PACKET with PF_ARP , SOCK_PACKET with S= OCK_RAW and htons(ETH_P_ARP) with ETHERTYPE_ARP Which resulted in a failur= e to create the socket (the return code was -1). Please advise, Wafa Hamzah SW engineer, FreeBSD verification From owner-freebsd-net@freebsd.org Sun Apr 10 17:56:47 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E5DAB0BEB4 for ; Sun, 10 Apr 2016 17:56:47 +0000 (UTC) (envelope-from kristof@sigsegv.be) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 464B61195 for ; Sun, 10 Apr 2016 17:56:46 +0000 (UTC) (envelope-from kristof@sigsegv.be) Received: from [IPv6:2a02:1811:2419:4e02:b962:9614:3775:ea1] (unknown [IPv6:2a02:1811:2419:4e02:b962:9614:3775:ea1]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id A8FA2733C; Sun, 10 Apr 2016 19:56:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sigsegv.be; s=mail; t=1460311003; bh=lo5Fee1qBRyOmMjlOQA2i2iDyAG0UjRhyUUg/dvMuas=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=R/AxqB+NuurnZuw4XJFRQQ19qYsDE6aiUqximr7hl/GYwp71rIi57kt4jkRMhzy6H HXe62xSwaPYFDAm6jZdHUML61ZFCjP3PGYskPMvM0iP4KeOjUiDss9j2Gb7H/tpV3W stPTPLAqnNPJSCYlLESqlm5HCX6a0T7sVTplnihA= Subject: Re: Create socket to send and receive arp packets - Freebsd Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=utf-8 From: Kristof Provost X-Checked-By-Nsa: Probably In-Reply-To: Date: Sun, 10 Apr 2016 19:56:45 +0200 Cc: "freebsd-net@freebsd.org" , Meny Yossefi , Yuval Bason Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Wafa Hamzah X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2016 17:56:47 -0000 > On 10 Apr 2016, at 10:00, Wafa Hamzah wrote: >=20 > Hi, >=20 > We are trying to send arp requests from user space using a RAW socket. > Our Linux reference suggest the following flags when creating the = socket: s =3D socket (PF_PACKET, SOCK_PACKET, htons(ETH_P_ARP))). > For FreeBSD support, we replaced PF_PACKET with PF_ARP , SOCK_PACKET = with SOCK_RAW and htons(ETH_P_ARP) with ETHERTYPE_ARP Which resulted in = a failure to create the socket (the return code was -1). >=20 > Please advise, I=E2=80=99d start by looking at =E2=80=98errno=E2=80=99, because = that=E2=80=99ll tell you a little more. It should give you a better indication of why the call fails. It might also be useful to reduce the code to the bare minimum required to reproduce your problem. Not only will that often help you to find the = problem it also makes it easier to post the code, which is the next step in = helping you. Regards, Kristof= From owner-freebsd-net@freebsd.org Sun Apr 10 18:37:28 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FCF7B0ADDC for ; Sun, 10 Apr 2016 18:37:28 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward18j.cmail.yandex.net (forward18j.cmail.yandex.net [IPv6:2a02:6b8:0:1630::f5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 385041A1D for ; Sun, 10 Apr 2016 18:37:28 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp14.mail.yandex.net (smtp14.mail.yandex.net [IPv6:2a02:6b8:0:801:1::13]) by forward18j.cmail.yandex.net (Yandex) with ESMTP id F416820ECC; Sun, 10 Apr 2016 21:37:13 +0300 (MSK) Received: from smtp14.mail.yandex.net (localhost [127.0.0.1]) by smtp14.mail.yandex.net (Yandex) with ESMTP id 2CBB51B60253; Sun, 10 Apr 2016 21:37:13 +0300 (MSK) Received: by smtp14.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id HL3V6ffZNZ-bC2W2Bpv; Sun, 10 Apr 2016 21:37:12 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1460313432; bh=KPC/U7WkSDKcUX0Ifhc9zaBnGVXaIpHzpcC39YyMr4w=; h=Subject:To:References:Cc:From:X-Enigmail-Draft-Status:Message-ID: Date:User-Agent:MIME-Version:In-Reply-To:Content-Type; b=V/+KJ8PdBlP4dZVg9/Z9zcyPDxNs33X8dWBXqxUzMZJuftg1DuPy1ymGkGpeUHSWU +uJ3Bn9Q214ECoV8NBzS0tVVP6dMvAHWDqWp1qVbYU5ih5jSQrPJPCYFENI3GGhEjg 7RkIp2kaDW94WZpvDtulsv95DEbBXHxAiY/rUOww= Authentication-Results: smtp14.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-ForeignMX: GB X-Yandex-Suid-Status: 1 0,1 0,1 0,1 0 Subject: Re: Create socket to send and receive arp packets - Freebsd To: Wafa Hamzah , "freebsd-net@freebsd.org" References: Cc: Meny Yossefi , Yuval Bason From: "Andrey V. Elsukov" X-Enigmail-Draft-Status: N1110 Message-ID: <570A9CED.5060806@yandex.ru> Date: Sun, 10 Apr 2016 21:35:25 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="i5fAVlFTxXtjsvcKGSrq0UbksVLK6f7he" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2016 18:37:28 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --i5fAVlFTxXtjsvcKGSrq0UbksVLK6f7he Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 10.04.16 11:00, Wafa Hamzah wrote: > We are trying to send arp requests from user space using a RAW > socket. Our Linux reference suggest the following flags when creating > the socket: s =3D socket (PF_PACKET, SOCK_PACKET, htons(ETH_P_ARP))). = > For FreeBSD support, we replaced PF_PACKET with PF_ARP , SOCK_PACKET > with SOCK_RAW and htons(ETH_P_ARP) with ETHERTYPE_ARP Which resulted > in a failure to create the socket (the return code was -1). Hi, AFAIR, you can't send ARP packets via RAW sockets in FreeBSD. You need to use bpf(4) or some libraries like libpcap. --=20 WBR, Andrey V. Elsukov --i5fAVlFTxXtjsvcKGSrq0UbksVLK6f7he Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXCpzuAAoJEAHF6gQQyKF6bOIIAIw7DtErIblsO4ePhINFxvIW F4LSvkFq7XlVc4iJjGtwqqle03P5zDWUZEhEMfQzH3LFmiKQa1b+i9XrFyJ5P+BW uUN2oUaY827e/P/avvaatNOvpNs0ZpdtbMxvgouq6Sl+WbNFdDr5aEPOayej107g P/+KFDWSLT/SHLrxixxF3NxToJdftSH9zx/U1DRfF8Gu4Dwpx8m28xkfMjNnrqcR IVqRx8wiKr1MTEawAvj7xfj6l5tkWBpxKzGbGjY8mRnyoEU6HZxHQDYHOxDkWtO3 FtxwTwpuVVFy2sviJcjGAMD1MKDtgtNWb0/YQWp3zyAyzreU315luO4xIlaA5Nk= =g7hE -----END PGP SIGNATURE----- --i5fAVlFTxXtjsvcKGSrq0UbksVLK6f7he-- From owner-freebsd-net@freebsd.org Sun Apr 10 21:01:35 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03BDCB0BB54 for ; Sun, 10 Apr 2016 21:01:35 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF6211D9C for ; Sun, 10 Apr 2016 21:01:34 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u3AL01W8070502 for ; Sun, 10 Apr 2016 21:01:34 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Message-Id: <201604102101.u3AL01W8070502@kenobi.freebsd.org> From: bugzilla-noreply@FreeBSD.org To: freebsd-net@FreeBSD.org Subject: Problem reports for freebsd-net@FreeBSD.org that need special attention Date: Sun, 10 Apr 2016 21:01:34 +0000 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2016 21:01:35 -0000 To view an individual PR, use: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=(Bug Id). The following is a listing of current problems submitted by FreeBSD users, which need special attention. These represent problem reports covering all versions including experimental development code and obsolete releases. Status | Bug Id | Description ------------+-----------+--------------------------------------------------- In Progress | 193452 | Dell PowerEdge 210 II -- Kernel panic bce (broadc In Progress | 203422 | mpd/ppoe not working with re(4) with revision 285 New | 204438 | setsockopt() handling of kern.ipc.maxsockbuf limi New | 205592 | TCP processing in IPSec causes kernel panic New | 206053 | kqueue support code of netmap causes panic Open | 148807 | [panic] 8.1-RELEASE/10.1-STABLE "panic: sbdrop" a Open | 194485 | Userland cannot add IPv6 prefix routes Open | 194515 | Fatal Trap 12 Kernel with vimage Open | 199136 | [if_tap] Added down_on_close sysctl variable to t Open | 201694 | 10.2-BETA2 crashing when killing VIMAGE/VNET jail Open | 206544 | sendmsg(2) (sendto(2) too?) can fail with EINVAL; 11 problems total for which you should take action. From owner-freebsd-net@freebsd.org Mon Apr 11 06:41:56 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 916D9B0B54F for ; Mon, 11 Apr 2016 06:41:56 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp002.me.com (mr11p00im-asmtp002.me.com [17.110.69.253]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8001815FF for ; Mon, 11 Apr 2016 06:41:56 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from [192.168.1.4] (c-50-174-208-73.hsd1.ca.comcast.net [50.174.208.73]) by mr11p00im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.36.0 64bit (built Sep 8 2015)) with ESMTPSA id <0O5G00271ILVY020@mr11p00im-asmtp002.me.com> for freebsd-net@freebsd.org; Mon, 11 Apr 2016 06:41:56 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-04-11_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1510270003 definitions=main-1604110102 User-Agent: Microsoft-MacOutlook/0.0.0.160212 Date: Sun, 10 Apr 2016 23:41:54 -0700 Subject: Re: libifconfig: Initial code available, looking for feedback From: Ravi Pokala Sender: "Pokala, Ravi" To: "freebsd-net@freebsd.org" Message-id: <25165EFB-4D17-476D-86C6-D99C3E97F227@panasas.com> Thread-topic: libifconfig: Initial code available, looking for feedback MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 06:41:56 -0000 -----Original Message----- >Date: Sat, 09 Apr 2016 13:59:29 +0000 >From: Marie Helene Kvello-Aune >To: freebsd-net@freebsd.org >Subject: libifconfig: Initial code available, looking for feedback >Message-ID: > >Content-Type: text/plain; charset=UTF-8 > >Hey! > >Please see previous thread[1] for context on what libifconfig is. > >I've just pushed an initial version of libifconfig to the github >repository[2]. I would appreciate feedback, in particular on the API design >and usage, and especially on how it communicates error state to the >application. Hi, I'm definitely not a networking person, but I have some comments: libifconfig.h #pragma once - I'm not sure if that's supported in every compiler used in the base system; I'd stick with a traditional guard macro. struct errstate::ioctl_request - should be unsigned long to match type of ioctl() argument. libifconfig.c libifconfig_ioctlwrap_ret() - the value of "rcode" which is passed in is always the return value of ioctl(), which always returns 0 or -1; I'm pretty sure you want to set ioctl_err to "errno", not "rcode". libifconfig_ioctlwrap() / libifconfig_ioctlwrap_caddr() - it's not clear why you're using one versus the other. libifconfig_get_description() - the case of the ioctl failing is not handled. libifconfig_socketcache.h Needs a guard macro to prevent multiple inclusion. libifconfig_socketcache.c libifconfig_socket() - similar to libifconfig_ioctlwrap_ret(), the value of "errno" is lost. Thanks, Ravi (rpokala@) From owner-freebsd-net@freebsd.org Mon Apr 11 07:16:01 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3594CB0B273 for ; Mon, 11 Apr 2016 07:16:01 +0000 (UTC) (envelope-from dan_partelly@rdsor.ro) Received: from mail.rdsor.ro (mail.rdsor.ro [193.231.238.10]) by mx1.freebsd.org (Postfix) with ESMTP id 9BF6A16D2 for ; Mon, 11 Apr 2016 07:16:00 +0000 (UTC) (envelope-from dan_partelly@rdsor.ro) Received: from [192.168.1.155] (unknown [86.125.33.32]) by mail.rdsor.ro (Postfix) with ESMTP id 00944DC10F; Mon, 11 Apr 2016 10:06:36 +0300 (EEST) Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Subject: Re: libifconfig: Initial code available, looking for feedback From: Dan Partelly In-Reply-To: Date: Mon, 11 Apr 2016 10:06:36 +0300 Cc: freebsd-net@freebsd.org Message-Id: References: To: Marie Helene Kvello-Aune X-Mailer: Apple Mail (2.3112) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 07:16:01 -0000 Im interested in this work, I believe having libraries to interface = with various FreeSBD subsystems=20 would be a very valuable addition to FreeBSD.=20 A first comment: =E2=80=94 from Github descrition -- "'m currently working on a library called 'libifconfig' which will = provide a C API to do the actual work that /sbin/ifconfig currently does, except that of lib80211.=E2=80=9D ------------------ It is my opinion that this shouldn't be a monolitical libary, and at = least two libraries should be created: 1. layer 2 access lib (universal ) 2. protocol level libraries (initially IP suite configuration would = be more than enough) Also, it may (or may very well be a stupid ideea, didnt thinked it = throughly) to expose such config APIs=20 using Nvlists. It makes using the API extremely easy. See nv(3) . > On 09 Apr 2016, at 16:59, Marie Helene Kvello-Aune = wrote: >=20 > d appreciate feedback, in particular on the API design > and usage, and especially on how it communicates error state to the > application. >=20 > Expect the API to break frequently/often for the time being From owner-freebsd-net@freebsd.org Mon Apr 11 07:41:34 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6699FB0BE70 for ; Mon, 11 Apr 2016 07:41:34 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:607c::16:b]) by mx1.freebsd.org (Postfix) with ESMTP id 3EA0611EF for ; Mon, 11 Apr 2016 07:41:34 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id C5C0B15E10; Mon, 11 Apr 2016 07:41:33 +0000 (UTC) Date: Mon, 11 Apr 2016 07:41:33 +0000 To: freebsd-net@freebsd.org From: "sepherosa_gmail.com (Sepherosa Ziehau)" Reply-to: D5853+325+47f73f6fef2a530d@reviews.freebsd.org Subject: [Differential] [Updated] D5853: dhclient: Log a warning instead of bailing upon "illegal" options Message-ID: <20b6d6f1e88b1a527d4515727725005e@localhost.localdomain> X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: Thread-Topic: D5853: dhclient: Log a warning instead of bailing upon "illegal" options X-Herald-Rules: none X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: Precedence: bulk In-Reply-To: References: Thread-Index: NzcwN2IzZDEwOWQ3OGQ5NTIxYzJjMDI3ZmM0IFcLVS0= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 07:41:34 -0000 sepherosa_gmail.com added a reviewer: freebsd-net-list. REVISION DETAIL https://reviews.freebsd.org/D5853 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, network, secteam, delphij, glebius, adrian, honzhan_microsoft.com, howard0su_gmail.com, decui_microsoft.com, freebsd-net-list From owner-freebsd-net@freebsd.org Mon Apr 11 07:42:05 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C5CBB0BEC0 for ; Mon, 11 Apr 2016 07:42:05 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:607c::16:b]) by mx1.freebsd.org (Postfix) with ESMTP id 46819141E for ; Mon, 11 Apr 2016 07:42:05 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id D611515E87; Mon, 11 Apr 2016 07:42:04 +0000 (UTC) Date: Mon, 11 Apr 2016 07:42:04 +0000 To: freebsd-net@freebsd.org From: "sepherosa_gmail.com (Sepherosa Ziehau)" Reply-to: D5872+325+9dea0574509cdbb3@reviews.freebsd.org Subject: [Differential] [Updated] D5872: tcp: Don't prematurely drop receiving-only connections Message-ID: <35aad85bde4c9d559a3f85c0af349561@localhost.localdomain> X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: Thread-Topic: D5872: tcp: Don't prematurely drop receiving-only connections X-Herald-Rules: <64> X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: Precedence: bulk In-Reply-To: References: Thread-Index: MmVmNzYzNzljOGQxMmM4MWI4MmNjYzcxMzczIFcLVUw= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 07:42:05 -0000 sepherosa_gmail.com added a reviewer: freebsd-net-list. REVISION DETAIL https://reviews.freebsd.org/D5872 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, network, glebius, hiren, lstewart, adrian, delphij, decui_microsoft.com, honzhan_microsoft.com, howard0su_gmail.com, transport, freebsd-net-list From owner-freebsd-net@freebsd.org Mon Apr 11 17:46:53 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5F63B0C124 for ; Mon, 11 Apr 2016 17:46:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6C6A1CA3 for ; Mon, 11 Apr 2016 17:46:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u3BHkqom074333 for ; Mon, 11 Apr 2016 17:46:53 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 208649] 10.3 release crashing in ipfw or intel drivers Date: Mon, 11 Apr 2016 17:46:52 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.3-BETA2 X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: hiren@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 17:46:54 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208649 Hiren Panchasara changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sbruno@FreeBSD.org Assignee|freebsd-bugs@FreeBSD.org |freebsd-net@FreeBSD.org --- Comment #1 from Hiren Panchasara --- I am not sure what could cause this. I don't see much changes to that code except r272089 (from Sean - cc'd). But I don't think can be a cause of your crash.=20 Unsure if any change in igb can cause this. You are reporting that this worked fine on 9.3. Is it possible for you to further bisect this? Try 10.1 or 10.2 and see? --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Mon Apr 11 17:51:52 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBEA9B0C3B6 for ; Mon, 11 Apr 2016 17:51:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCFCB1FE6 for ; Mon, 11 Apr 2016 17:51:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u3BHpqHg086461 for ; Mon, 11 Apr 2016 17:51:52 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 208649] 10.3 release crashing in ipfw or intel drivers Date: Mon, 11 Apr 2016 17:51:52 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.3-BETA2 X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: h-k@mail.ru X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 17:51:53 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208649 --- Comment #2 from h-k@mail.ru --- Yes, i can try 10.1 or 10.2 but not too fast, probably on this weekends (16= -17 apr). --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Mon Apr 11 18:18:23 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3292AB0CFFF for ; Mon, 11 Apr 2016 18:18:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2376410E9 for ; Mon, 11 Apr 2016 18:18:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u3BIIM38033934 for ; Mon, 11 Apr 2016 18:18:23 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 208649] 10.3 release crashing in ipfw or intel drivers Date: Mon, 11 Apr 2016 18:18:23 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.3-BETA2 X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: sbruno@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 18:18:23 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208649 --- Comment #3 from Sean Bruno --- (In reply to h-k from comment #0) The crash dumps at the url referred to don't seem to exist. :-( --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Mon Apr 11 20:31:56 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B60E9AEC4A8 for ; Mon, 11 Apr 2016 20:31:56 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7DDEA111B for ; Mon, 11 Apr 2016 20:31:56 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [IPv6:2a02:1811:2419:4e02:4030:c8ed:a23e:5044] (unknown [IPv6:2a02:1811:2419:4e02:4030:c8ed:a23e:5044]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id 0D3FE76C7; Mon, 11 Apr 2016 22:31:54 +0200 (CEST) Subject: Re: libifconfig: Initial code available, looking for feedback Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=utf-8 From: Kristof Provost X-Checked-By-Nsa: Probably In-Reply-To: Date: Mon, 11 Apr 2016 22:31:52 +0200 Cc: freebsd-net@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Marie Helene Kvello-Aune X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 20:31:56 -0000 > On 09 Apr 2016, at 15:59, Marie Helene Kvello-Aune = wrote: > I've just pushed an initial version of libifconfig to the github > repository[2]. I would appreciate feedback, in particular on the API = design > and usage, and especially on how it communicates error state to the > application. >=20 Awesome. This is important work. I can=E2=80=99t be the only one who=E2=80= =99s tired of writing ioctl() calls to set an IP address. Is it still your intention to re-implement/refactor/re-whatever ifconfig = to use this library? It seems like it=E2=80=99d be both a good test-case and a good = way to ensure the library stays up to date, and grows new capabilities as features are = added to the network stack. > Expect the API to break frequently/often for the time being, as it is = still > in very early stages of development. I=E2=80=99ve had a quick look at the library so far, and have a few = remarks. It might be better to have an explicit (opaque to the library user) = handle to contain both the error state (libifconfig_errstate) and the open = sockets (sdkeys). This would go a long way in making the library thread-safe (because = users can now rely on their error state not getting clobbered by another thread). Bikeshedding: - libifconfig_ seems quite long for a prefix. Perhaps libifc_ or lifc_ = ? - if (foo !=3D NULL) free(foo); can be safely written as free(foo); Regards, Kristof= From owner-freebsd-net@freebsd.org Mon Apr 11 21:03:09 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B5D2AECE48 for ; Mon, 11 Apr 2016 21:03:09 +0000 (UTC) (envelope-from kmacybsd@gmail.com) Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5795D1D53 for ; Mon, 11 Apr 2016 21:03:09 +0000 (UTC) (envelope-from kmacybsd@gmail.com) Received: by mail-io0-x229.google.com with SMTP id u185so2505046iod.3 for ; Mon, 11 Apr 2016 14:03:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=S6YDVpN59fcOgOQcboZNpCPggpKMo906ucLF7TtwrMI=; b=zJ+vAEowota0EEpM25l7o3YU0aCvo2B1VUu0/AvUJ0YH8+Gaplpo4Pzktddeh38S85 xB5pIKQEkNCDoK7X+BQw+EjsiNblrlDozMCUEp83t4LmQmXezxBGotoyZjVxfAGVCSqT snDdNKBY3u+jIMPK2XmbbQ+q7KvKCvps1OzIbr7g/NIvgyRtI/C/kHjEVdFScQDTSW7a CCAlatdKNbcRrGFSIPBjaKSTXiI0+Xj64SAzy8wsPIYj5vd5BAgyQQcZEwZcu8eUS0bG raq6d6tGtmgHCIS7ZWLF/R4YXSSkBbfKCJxvI93CCcH4ejTNuTTxm3GqX/YkWnFHtTE+ dyXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=S6YDVpN59fcOgOQcboZNpCPggpKMo906ucLF7TtwrMI=; b=E/rbKciLJgi5RnFnc6/XGoTyntTnwy7DLa8nHW3mk7e1svNP08wfKVwPkBbOly3d8a ghgUjPK+9nfyO7KG06j9MV+AuFUzopiy8joz/V8coKbOPV+COwNdUkWbSfGzSv8dLh23 ZifKrpqIcKq5ZDd7bKSXQFmCyxZScskhAQzwGctsDzyzLSVLTwUBJmy3/GgEn54pDB6k rYro8Rxcs66z1ckiZMTcfdTwZZVlAw0yneRKBdKADrKGoaI6pECUFCHUCWroU9DKUOiJ oEsVMfQ4sl0mSsKgflbtG2Pm3aOb8ZJshq/wD4Bnulvyf6RmE9xpZUDIIhTSNyeoDEAi bG4A== X-Gm-Message-State: AOPr4FWmvq6jdVW+WMbNjvo/KZkHsqShtXrT02nq8suyndmu+Jiov1OKzO/UsqU1C6JIiNpomUbNSqVWjqQopw== MIME-Version: 1.0 X-Received: by 10.107.7.135 with SMTP id g7mr114595ioi.81.1460408588709; Mon, 11 Apr 2016 14:03:08 -0700 (PDT) Sender: kmacybsd@gmail.com Received: by 10.107.6.166 with HTTP; Mon, 11 Apr 2016 14:03:08 -0700 (PDT) In-Reply-To: References: Date: Mon, 11 Apr 2016 14:03:08 -0700 X-Google-Sender-Auth: Rxt5VZTjisKmsiy1N9LvKke7htc Message-ID: Subject: Re: Question on sysctl tree handling From: "K. Macy" To: Jack Vogel Cc: FreeBSD Net Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 21:03:09 -0000 You do understand that init needs to be run every time interface settings are changed (TSO / PROMISC / CSUM/ etc)? Reallocating queues and interrupts every time is fragile (long running systems can run low on contiguous memory) and, in the common case that you're not actually changing the number, gratuitous. Cheers. -M On Fri, Apr 8, 2016 at 2:56 PM, Jack Vogel wrote: > LOL, why does it seem that as soon as I ask the answer hits me in the nose > :) > > I found the sysctl_ctx_free call, sorry for the noise.... > > Jack > > > On Fri, Apr 8, 2016 at 2:51 PM, Jack Vogel wrote: > >> >> I have a driver design where the queue/ring/irq layout is done in init >> rather >> than in attach, allowing easy reconfiguration. What I'm not sure about is >> how to handle the sysctl tree during a reinit, I don't see a procedure to >> free up things so I can restructure :( >> >> Am I missing something, any pointers or suggestions appreciated. >> >> Thanks, >> >> Jack >> >> > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" From owner-freebsd-net@freebsd.org Mon Apr 11 22:01:22 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52ABDB0C532 for ; Mon, 11 Apr 2016 22:01:22 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-vk0-x236.google.com (mail-vk0-x236.google.com [IPv6:2607:f8b0:400c:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 156041F66; Mon, 11 Apr 2016 22:01:22 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: by mail-vk0-x236.google.com with SMTP id t129so146803913vkg.2; Mon, 11 Apr 2016 15:01:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=7Y4tnV9mfwVKzXTczu4vpl+AmnuiZeTmbBYo73jbMkc=; b=cKvnR7O5lP9TDn1n/j08OXp6ao5qDiYrzfpGv3VYq/sYMptpgqgQcw8hrCL209TkAy dhLJVD3aucvmsaYmJuAu2TolOXArt8NUNyQNk/J5qua1k1jtI3uzU+pj0/D8YwfrBZe0 yBPT+ErHibCvOr2Bt44AgsKkjZWLZfqEzAtjZf9kvoBmqXjj1JgG1/WnMuXkk+3EABRe 1+taruztXQ6qgRLFr30lb/HeLRgrFxtESIe4leFF+HDQBPmVHxyrtKOCrU9WlX0wbTkT 6NiylL1IcHtd55v20quHrRaRs+gYC14j70A/rLmWJWCq3+u6USKJwAcZAJItXl4MvZLO 7HOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=7Y4tnV9mfwVKzXTczu4vpl+AmnuiZeTmbBYo73jbMkc=; b=h1p7BOz4Q7GhSYry3KEzVG+aAniX61q/WJxXa8eI8DLNh9zFZzm5MEwtUjLAW6aO1+ 3yMmodBfbh8U7k0/6mh5JJG06arMWPD1i5v3HbVEMq8NN/7DcTENopaAKjJ5+yx+nU1b u1dhrMCCq72k58Tmh139lbHe0Ogooax/UrQBGA5n9DwOJ7qgx4xLJucG56enOaJt6Hpv nqz7Mkp7Leq4sLAr8d6cLMJy38v1ChpctntDE+x2qqcbkQLm221GJ77uyBmssbzbMjim 0W+Tn9N9WTqPwiT2LAoSz6FJYLuvQqC7QIuyTEUM/aGIM7ZpnvWzxcpWYAZJYcMuqCzG oD8g== X-Gm-Message-State: AD7BkJJw0klzA0m2JHfZMsYO49rpvp6VSygxQxckgk2qWQS/Rj7Y4vpXnbYbI/lLcA0udBV6GFXqL9W6djYgEQ== MIME-Version: 1.0 X-Received: by 10.31.52.147 with SMTP id b141mr12931947vka.82.1460412081099; Mon, 11 Apr 2016 15:01:21 -0700 (PDT) Received: by 10.31.171.206 with HTTP; Mon, 11 Apr 2016 15:01:21 -0700 (PDT) In-Reply-To: References: Date: Mon, 11 Apr 2016 15:01:21 -0700 Message-ID: Subject: Re: Question on sysctl tree handling From: Jack Vogel To: "K. Macy" Cc: FreeBSD Net Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 22:01:22 -0000 Why should init have to be rerun just because TSO or CSUM is turned off or on, its a flag that is checked in the TX routines? I am controlling some cases in the ioctl routine so it does the necessary things, but does not rerun all of init. If its a long running system that means its unlikely be go undergoing a config change, yes? BTW, the sysctl stuff is still giving me trouble. I create a new node, and add stats oids to that, if a reinit happens, they can be removed, but then I get a warning message when the driver goes thru detach complaining that an oid cannot be unregistered... It's proving to be frustrating :( I appreciate the comments Kip. Jack On Mon, Apr 11, 2016 at 2:03 PM, K. Macy wrote: > You do understand that init needs to be run every time interface > settings are changed (TSO / PROMISC / CSUM/ etc)? Reallocating queues > and interrupts every time is fragile (long running systems can run low > on contiguous memory) and, in the common case that you're not actually > changing the number, gratuitous. > > Cheers. > -M > > On Fri, Apr 8, 2016 at 2:56 PM, Jack Vogel wrote: > > LOL, why does it seem that as soon as I ask the answer hits me in the > nose > > :) > > > > I found the sysctl_ctx_free call, sorry for the noise.... > > > > Jack > > > > > > On Fri, Apr 8, 2016 at 2:51 PM, Jack Vogel wrote: > > > >> > >> I have a driver design where the queue/ring/irq layout is done in init > >> rather > >> than in attach, allowing easy reconfiguration. What I'm not sure about > is > >> how to handle the sysctl tree during a reinit, I don't see a procedure > to > >> free up things so I can restructure :( > >> > >> Am I missing something, any pointers or suggestions appreciated. > >> > >> Thanks, > >> > >> Jack > >> > >> > > _______________________________________________ > > freebsd-net@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-net > > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > From owner-freebsd-net@freebsd.org Mon Apr 11 22:09:31 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8B80B0C9A1 for ; Mon, 11 Apr 2016 22:09:31 +0000 (UTC) (envelope-from matt.joras@gmail.com) Received: from mail-ob0-x230.google.com (mail-ob0-x230.google.com [IPv6:2607:f8b0:4003:c01::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8FF3815DA; Mon, 11 Apr 2016 22:09:31 +0000 (UTC) (envelope-from matt.joras@gmail.com) Received: by mail-ob0-x230.google.com with SMTP id j9so119937138obd.3; Mon, 11 Apr 2016 15:09:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=QKCPV3kx/k4uyI7SQ4kzcKlaJ0X1PB/mQQ/ni7W8KHw=; b=Yek70WzLFgwLUyP9SG/aW/9I4CbI+8msoaTFuFg5Q+z07dfRJEhR87NM9lthCGZw3G Rnwphlg/QUKDFvKXOYW1XB5tiosBx+XFq+vwBPdwmeJKhWm/qSNLGF3XpEvFQO+pFQpM cc8c64xQS6bh0hixvz7QsXyyuBQyzNNnzf4ZDz47i7xHiyWcebuOq3F3LuoFN8ygVFIk TgJtL9He8UGpJW14TcraSxmD5cq/ePyuIX11AhobueyKO0y2TLN/vQXXIQEZ7tHy9A1K 16PD5kNW64EPhT83fAQnElLDiLhbIbQ114ZnLwsdMoJEuF0s4d4ZfVMF/F7tMM76ZxPY KXWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=QKCPV3kx/k4uyI7SQ4kzcKlaJ0X1PB/mQQ/ni7W8KHw=; b=Bkinass9Nu9j6xmxy5H+2UUzQr1jhViuOVgteg1lEGziWxRW7lKIsC6raUc1IUHJrD HAPVoL3B/HjqE2wGh2b5/7XbR5MOcUGhv03BYLLqVFDQ1qdyQHfMtd4JkZPX11YjH3eg mf9DBCIsf/e6FDrIMBpaqeh2KEnLXoytrc4vmY+cy0yxLgHufd333SxscW7FxCX0Qm7L e5wOPKDEUPnSbw9EVKYaDYyirfbs9i/n3HTryCsXS8JvJ9PNU4izzvrGkjI8UVKNZjPO IodDGBWgfh9IkE4eG7+UO+hN5f6PcvNeap7HTt2n1Az7xXGPKfUq/qB1d8wRjG5x8xoV jFhQ== X-Gm-Message-State: AOPr4FW4fsulYu94/NE+MSGfLetXfecMNHjVuF1bA4Lpt8x83fBqXmhUa9qh4RcHYURArttYSH/J4fYB53yFag== MIME-Version: 1.0 X-Received: by 10.182.248.199 with SMTP id yo7mr220082obc.73.1460412570790; Mon, 11 Apr 2016 15:09:30 -0700 (PDT) Received: by 10.202.170.20 with HTTP; Mon, 11 Apr 2016 15:09:30 -0700 (PDT) In-Reply-To: References: Date: Mon, 11 Apr 2016 15:09:30 -0700 Message-ID: Subject: Re: Question on sysctl tree handling From: Matt Joras To: "K. Macy" Cc: Jack Vogel , FreeBSD Net Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 22:09:31 -0000 Expanding on what mmacy said... I don't think the benefits of "easy reconfiguration" are worth the headaches you're going to potentially run into in production. bxe(4) used to do this, and it caused us a lot of problems (i.e. panics) at $DAY_JOB. For example, if a lagg was on top of bxe and then you downed bxe you could very easily hit a use-after-free since bxe free'd its rings while if_lagg is trying to transmit a packet. Matt Joras On Mon, Apr 11, 2016 at 2:03 PM, K. Macy wrote: > You do understand that init needs to be run every time interface > settings are changed (TSO / PROMISC / CSUM/ etc)? Reallocating queues > and interrupts every time is fragile (long running systems can run low > on contiguous memory) and, in the common case that you're not actually > changing the number, gratuitous. > > Cheers. > -M > > On Fri, Apr 8, 2016 at 2:56 PM, Jack Vogel wrote: >> LOL, why does it seem that as soon as I ask the answer hits me in the nose >> :) >> >> I found the sysctl_ctx_free call, sorry for the noise.... >> >> Jack >> >> >> On Fri, Apr 8, 2016 at 2:51 PM, Jack Vogel wrote: >> >>> >>> I have a driver design where the queue/ring/irq layout is done in init >>> rather >>> than in attach, allowing easy reconfiguration. What I'm not sure about is >>> how to handle the sysctl tree during a reinit, I don't see a procedure to >>> free up things so I can restructure :( >>> >>> Am I missing something, any pointers or suggestions appreciated. >>> >>> Thanks, >>> >>> Jack >>> >>> >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" From owner-freebsd-net@freebsd.org Mon Apr 11 22:16:23 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86B9BB0CD85 for ; Mon, 11 Apr 2016 22:16:23 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-vk0-x232.google.com (mail-vk0-x232.google.com [IPv6:2607:f8b0:400c:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D8D91C22; Mon, 11 Apr 2016 22:16:23 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: by mail-vk0-x232.google.com with SMTP id k1so244149vkb.0; Mon, 11 Apr 2016 15:16:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=DF6U6i8bucy87e1walC/7z8OuKllmIUoMQth+3EDVuw=; b=nddRDm94jWZPQPFHQZBRUDMNEzKBsc4T+I66pdCNC74x6YGcX91UuwCscw+911khFI H/aFYbmXO9j3NHfC+Jtfxq5Aj04gO1LNrQzX3WP8TZyaxnUZwOc4pfxoecnq6/u4ASq5 cd6EywFJesh8XtdFVZFrNxpHcVUMWaFklW0BQlJeWLiuia4vSWJTCUquw+AEqOrByYim N9rYED39G1s+EDdMANt/R/tkGakjkTEhoisW88uONolO84mV81Z8T/uPLczora8Z99c0 1zBnVtyghhdHK7WJ2lz4dBAjANjQwH9qM290t7siZP1USlD9Cc1Awe7esq2Kw/2YG0Ex nC3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=DF6U6i8bucy87e1walC/7z8OuKllmIUoMQth+3EDVuw=; b=hAUZysuXzmKaP6QRYyluQ9ksMy0ie7HB9NMpWPwoQzVDtTO2tnfSjJOzPam2OYJvsz /v+h1CGEu/s7s1RvGnkHE0VF0UxoLwdfQnW1ejDiyN1UFsxIggjS4UJq+2QT4vvm50OJ U9de4x6CeQMPKDh7eoEqSuFyhWgQf+5zNMl4l+8oSnzzRfEE0aFpneTGN4UkE1/IptoR CfJk66VRAKDXTsFfzFnM98wP3mAUhHV04vEg0HU56H6L6YHWlD6LNHneHTpQPGv2mdxs q1CecHg+pIGizNp0nhIGAusbDc9DobkE270GM9Wuc3oKJcwWRI2pmpXjJ3pqR1yZ5QTC 65YQ== X-Gm-Message-State: AD7BkJIYTU3vptEmSVClWkk9PubC01cHw7Q/K8FytJUmSbBVY5mRP26FQ8GfFhi99Gi8ncD+w7dKQMYRru8dIg== MIME-Version: 1.0 X-Received: by 10.31.165.76 with SMTP id o73mr11122590vke.67.1460412982291; Mon, 11 Apr 2016 15:16:22 -0700 (PDT) Received: by 10.31.171.206 with HTTP; Mon, 11 Apr 2016 15:16:22 -0700 (PDT) In-Reply-To: References: Date: Mon, 11 Apr 2016 15:16:22 -0700 Message-ID: Subject: Re: Question on sysctl tree handling From: Jack Vogel To: Matt Joras Cc: "K. Macy" , FreeBSD Net Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 22:16:23 -0000 Hmmm, after so many years of unloading and reloading drivers, it just seemed like such a convenience :) But, instability isn't fun either, I've looked at bxe a little, such a monstrous driver :) I'll give it some thought, and maybe discuss it with David. Thanks. Cheers, Jack On Mon, Apr 11, 2016 at 3:09 PM, Matt Joras wrote: > Expanding on what mmacy said... I don't think the benefits of "easy > reconfiguration" are worth the headaches you're going to potentially > run into in production. > > bxe(4) used to do this, and it caused us a lot of problems (i.e. panics) > at $DAY_JOB. For example, if a lagg was on top of bxe and then you > downed bxe you could very easily hit a use-after-free since bxe free'd > its rings while if_lagg is trying to transmit a packet. > > Matt Joras > > On Mon, Apr 11, 2016 at 2:03 PM, K. Macy wrote: > > You do understand that init needs to be run every time interface > > settings are changed (TSO / PROMISC / CSUM/ etc)? Reallocating queues > > and interrupts every time is fragile (long running systems can run low > > on contiguous memory) and, in the common case that you're not actually > > changing the number, gratuitous. > > > > Cheers. > > -M > > > > On Fri, Apr 8, 2016 at 2:56 PM, Jack Vogel wrote: > >> LOL, why does it seem that as soon as I ask the answer hits me in the > nose > >> :) > >> > >> I found the sysctl_ctx_free call, sorry for the noise.... > >> > >> Jack > >> > >> > >> On Fri, Apr 8, 2016 at 2:51 PM, Jack Vogel wrote: > >> > >>> > >>> I have a driver design where the queue/ring/irq layout is done in init > >>> rather > >>> than in attach, allowing easy reconfiguration. What I'm not sure about > is > >>> how to handle the sysctl tree during a reinit, I don't see a procedure > to > >>> free up things so I can restructure :( > >>> > >>> Am I missing something, any pointers or suggestions appreciated. > >>> > >>> Thanks, > >>> > >>> Jack > >>> > >>> > >> _______________________________________________ > >> freebsd-net@freebsd.org mailing list > >> https://lists.freebsd.org/mailman/listinfo/freebsd-net > >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > _______________________________________________ > > freebsd-net@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-net > > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > From owner-freebsd-net@freebsd.org Mon Apr 11 22:20:51 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16B9AB0C32A for ; Mon, 11 Apr 2016 22:20:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0789F1285 for ; Mon, 11 Apr 2016 22:20:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u3BMKnTK068988 for ; Mon, 11 Apr 2016 22:20:50 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 208653] PCN driver will not handle all PC net pro cards Date: Mon, 11 Apr 2016 22:20:50 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.3-BETA2 X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: linimon@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 22:20:51 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208653 Mark Linimon changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|freebsd-bugs@FreeBSD.org |freebsd-net@FreeBSD.org --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Mon Apr 11 22:29:29 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AAC8B0C903 for ; Mon, 11 Apr 2016 22:29:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B4A9198C for ; Mon, 11 Apr 2016 22:29:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u3BMTTp0085955 for ; Mon, 11 Apr 2016 22:29:29 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 208566] Ipnat (10.1-10.2) does not work properly after 1-2 days Date: Mon, 11 Apr 2016 22:29:29 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 10.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: linimon@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to short_desc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 22:29:29 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208566 Mark Linimon changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|freebsd-bugs@FreeBSD.org |freebsd-net@FreeBSD.org Summary|Ipnat (10.1-10.2) |Ipnat (10.1-10.2) does not | |work properly after 1-2 | |days --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Mon Apr 11 22:29:50 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC54EB0C967 for ; Mon, 11 Apr 2016 22:29:50 +0000 (UTC) (envelope-from kmacybsd@gmail.com) Received: from mail-ig0-x244.google.com (mail-ig0-x244.google.com [IPv6:2607:f8b0:4001:c05::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B6C1E1A78 for ; Mon, 11 Apr 2016 22:29:50 +0000 (UTC) (envelope-from kmacybsd@gmail.com) Received: by mail-ig0-x244.google.com with SMTP id fn8so414864igb.2 for ; Mon, 11 Apr 2016 15:29:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=b+47kTwfjxjahQphyll1JZodo82Fq/m2Ovxm5vorzUA=; b=BmkhPqgoKsks24tCX1r9Jrrq8BHiJB6qGe1XW9yOwJ0cve3qinvbtNd+enQNhbJaQ5 DYLCl8RIiWJtddv9IrIO12l51L4Y3EA5er4x6pvQdK1gRAFaF4SWDzDFs/XUvu5/lemw MSr3yONby4wbzp9tP7Jo/Bz/u8NCt4CH3xJ2sq7tBOoUuCjhgm+SLo/J6drWFD0aeioP kZsj7gz2kRh5iZtA2GyJwIHxUk+9FhqQFXgd5m/Acta2h0FZ13Amnk8/XcDVnidLH1Gl HN4JW1jhP6xoZwMT20/++QUAj5zHCljBy7QCS9wf0VoJFm9EOVVOAkP9HwE4ZE846mSb oXjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=b+47kTwfjxjahQphyll1JZodo82Fq/m2Ovxm5vorzUA=; b=IkdTy9k51DavttSybyDC/A/pqX0QBuwe+IjgK0m0W1ox+fXWKD7I1y+S6Jonc88EjI WgsicxpR0r788m8zJIjq4pIgwKHqO3I30wMwAJUC9y9J5ww9khopdLnFLxcZ754lMeHA kCSShYdc+LZ95Ds1n8MAXcU3dv/gkLb9djm74I3iT+dy5VTHYvEKlabq4RagVllBKtg1 b/dmZ9cePVW3y9zSqtsbxCnCC/0iFDQQbanv/XxjlzzXmZzRC3AKoxq+UasZ1jXS5j0U jP5DA8X4JW4ZqhBBg/17CUGOYXbnK14+qMszOeMkBXEp+xB8uNBMQLUntqNfuDIR42qn LoJQ== X-Gm-Message-State: AD7BkJKrOxlcrNjKuy1CVgtTUMfgv6INsNipUueR/8JXjLrWUw/XdvoRQ9dl+IPBy/URPsw3PRhHUCthmlziSw== MIME-Version: 1.0 X-Received: by 10.50.111.163 with SMTP id ij3mr21276206igb.76.1460413790203; Mon, 11 Apr 2016 15:29:50 -0700 (PDT) Sender: kmacybsd@gmail.com Received: by 10.107.6.166 with HTTP; Mon, 11 Apr 2016 15:29:50 -0700 (PDT) In-Reply-To: References: Date: Mon, 11 Apr 2016 15:29:50 -0700 X-Google-Sender-Auth: 6I1A8YryN3i09tKinApqp86AT-U Message-ID: Subject: Re: Question on sysctl tree handling From: "K. Macy" To: Jack Vogel Cc: FreeBSD Net Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 22:29:51 -0000 On Mon, Apr 11, 2016 at 3:01 PM, Jack Vogel wrote: > Why should init have to be rerun just because TSO or CSUM is turned off or > on, > its a flag that is checked in the TX routines? I actually haven't looked in to it yet. But it does annoy the heck out of me. Nonetheless, it is the current state of affairs. > If its a long running system that means its unlikely be go undergoing a > config > change, yes? Well, it just as easily means that it's undergoing some flag change. Except for the exceptional case where you're allocating more or fewer queues we don't want to do any more work there than we have to. > BTW, the sysctl stuff is still giving me trouble. I create a new node, and > add > stats oids to that, if a reinit happens, they can be removed, but then I get > a > warning message when the driver goes thru detach complaining that an oid > cannot be unregistered... It's proving to be frustrating :( I'm only familiar with how to add things to a device's sysctl tree. It obviously gets torn down at detach, so you can probably look at subr_bus.c to see what it does. > I appreciate the comments Kip. You're welcome. Good luck. -M > > On Mon, Apr 11, 2016 at 2:03 PM, K. Macy wrote: >> >> You do understand that init needs to be run every time interface >> settings are changed (TSO / PROMISC / CSUM/ etc)? Reallocating queues >> and interrupts every time is fragile (long running systems can run low >> on contiguous memory) and, in the common case that you're not actually >> changing the number, gratuitous. >> >> Cheers. >> -M >> >> On Fri, Apr 8, 2016 at 2:56 PM, Jack Vogel wrote: >> > LOL, why does it seem that as soon as I ask the answer hits me in the >> > nose >> > :) >> > >> > I found the sysctl_ctx_free call, sorry for the noise.... >> > >> > Jack >> > >> > >> > On Fri, Apr 8, 2016 at 2:51 PM, Jack Vogel wrote: >> > >> >> >> >> I have a driver design where the queue/ring/irq layout is done in init >> >> rather >> >> than in attach, allowing easy reconfiguration. What I'm not sure about >> >> is >> >> how to handle the sysctl tree during a reinit, I don't see a procedure >> >> to >> >> free up things so I can restructure :( >> >> >> >> Am I missing something, any pointers or suggestions appreciated. >> >> >> >> Thanks, >> >> >> >> Jack >> >> >> >> >> > _______________________________________________ >> > freebsd-net@freebsd.org mailing list >> > https://lists.freebsd.org/mailman/listinfo/freebsd-net >> > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > From owner-freebsd-net@freebsd.org Tue Apr 12 05:38:39 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C48D1B0C628 for ; Tue, 12 Apr 2016 05:38:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A515F1152 for ; Tue, 12 Apr 2016 05:38:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u3C5cdLS078961 for ; Tue, 12 Apr 2016 05:38:39 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 208649] 10.3 release crashing in ipfw or intel drivers Date: Tue, 12 Apr 2016 05:38:39 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.3-BETA2 X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: h-k@mail.ru X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2016 05:38:39 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208649 --- Comment #4 from h-k@mail.ru --- (In reply to Sean Bruno from comment #3) my fault. was wiped by crontab. right url now - https://mail.proc.ru/xz.tar.bz --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Tue Apr 12 13:45:51 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3BB2B0D9C1 for ; Tue, 12 Apr 2016 13:45:51 +0000 (UTC) (envelope-from marieheleneka@gmail.com) Received: from mail-lf0-x22b.google.com (mail-lf0-x22b.google.com [IPv6:2a00:1450:4010:c07::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A1001347 for ; Tue, 12 Apr 2016 13:45:51 +0000 (UTC) (envelope-from marieheleneka@gmail.com) Received: by mail-lf0-x22b.google.com with SMTP id e190so26002083lfe.0 for ; Tue, 12 Apr 2016 06:45:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=9ummW+OovOPZgxkoF+nCalhkk54+NSXF893nFja4Gbs=; b=tj01SKnrr4F3PI0VtQbVEH/ILvc5QWpaCoRu0RQFn6IfVBK7Tlt+7PsTG4uRjYUqlT wOdFpuB32/C/RtcRQu361CufPMf66qd7hZ739zaJoTcrRgbU7YTlKvVGsuRjydNF4Aga WfqU3CZQVVh5KJJY0JXkphjgTVp5SQvJFlKzYAQ2uWmckPHhXJV7eznY6hxoMScBav3X uwdRp6Nj+ekJpSSeszejKl24RUhlwkDKOo6kWgHtS/3iI9zkpOOZ7kPfxl8EOGy5qEx7 QVU6reaTZzigBLgxaAK+j8qicQMw5GnM3mOIDnCkw93OOeFMVxx1yNVbuNgSEclqTb6M cz3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=9ummW+OovOPZgxkoF+nCalhkk54+NSXF893nFja4Gbs=; b=CnkPOUHyc9JP2V+ECW1biWsHru0L4wuVdkQZuFKvlpkfv1omdN3dcIxGAM8AR+/Gzn p72HTy+8EErLQ9+KjmJKcRimnxq+3hrsm7Z5RwzLAbYrE0Hk6i6ZOFhT5u/WPaDIdrnw vHlv8Kz5FD6b3QVjXxdHCX3HUr6MBolbyVr3feBzt18J3FA413HFkkAnz0M08ctx36PY mztJxyBHB+P+N8z9xeSWZSURFBYVgsO9owB4cu2jOpDEbrHk7WvT8XuWwfB7dL1pc4rX s7OofSHbpc3gBl0UF0W/XIIZLaAHFvYAzLVeKhl7yXUta5zk8ZUJ3bUijJ3UxOLmmskm e2ww== X-Gm-Message-State: AOPr4FV0N3OcNOQqcVJfEOnElspwgw4ycrzeAxKOjyUkPr6W72XTjMtYNQtvGDst7Sav3V/8JTsjqhsw8gD9LQ== X-Received: by 10.112.151.207 with SMTP id us15mr1225664lbb.28.1460468749410; Tue, 12 Apr 2016 06:45:49 -0700 (PDT) MIME-Version: 1.0 References: <25165EFB-4D17-476D-86C6-D99C3E97F227@panasas.com> In-Reply-To: <25165EFB-4D17-476D-86C6-D99C3E97F227@panasas.com> From: Marie Helene Kvello-Aune Date: Tue, 12 Apr 2016 13:45:39 +0000 Message-ID: Subject: Re: libifconfig: Initial code available, looking for feedback To: Ravi Pokala , "freebsd-net@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2016 13:45:51 -0000 On Mon, Apr 11, 2016 at 8:42 AM Ravi Pokala wrote: > -----Original Message----- > > > >Date: Sat, 09 Apr 2016 13:59:29 +0000 > >From: Marie Helene Kvello-Aune > >To: freebsd-net@freebsd.org > >Subject: libifconfig: Initial code available, looking for feedback > >Message-ID: > > j-eVVJQQ@mail.gmail.com> > >Content-Type: text/plain; charset=UTF-8 > > > >Hey! > > > >Please see previous thread[1] for context on what libifconfig is. > > > >I've just pushed an initial version of libifconfig to the github > >repository[2]. I would appreciate feedback, in particular on the API > design > >and usage, and especially on how it communicates error state to the > >application. > > Hi, > > I'm definitely not a networking person, but I have some comments: > > Thanks for the feedback! I've made note of all of it, even though I'm not commenting on all of it. :) > libifconfig.h > > #pragma once - I'm not sure if that's supported in every compiler used > in the base system; I'd stick with a traditional guard macro. > > I did research this some, and came to the conclusion it's supported. But I'll take another look at it. > libifconfig_ioctlwrap() / libifconfig_ioctlwrap_caddr() - it's not > clear why you're using one versus the other. > > I'm basically reusing ifconfig code where I can, and the ifconfig code has some places where it casts to caddr_t and some places it doesn't. I haven't researched whether casting is necessary yet, and therefore I'm mimicking the original code as closely as I can, to be on the safe side. If it turns out it's unnecessary, it should be a simple task to clean it up. :) > libifconfig_get_description() - the case of the ioctl failing is not > handled. > Good catch. This code was fine in ifconfig because the later break statement ends the loop, but this is not sufficient for libifconfig. :) libifconfig_socketcache.c > > libifconfig_socket() - similar to libifconfig_ioctlwrap_ret(), the > value of "errno" is lost. > > It looks like I'll have to restructure the errstate struct a bit and make it clear it's a stored errno. But at that point it may be pointless to store it there, as 'errno' is thread safe, and the calling application can access that directly. [1] Issue 1: https://github.com/Savagedlight/libifconfig/issues/1 Thanks! -- Marie Helene Kvello-Aune marieheleneka@gmail.com > Thanks, > > Ravi (rpokala@) > > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > From owner-freebsd-net@freebsd.org Tue Apr 12 14:09:15 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CB40B0C5F6 for ; Tue, 12 Apr 2016 14:09:15 +0000 (UTC) (envelope-from marieheleneka@gmail.com) Received: from mail-lf0-x236.google.com (mail-lf0-x236.google.com [IPv6:2a00:1450:4010:c07::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F6AB1F1E; Tue, 12 Apr 2016 14:09:14 +0000 (UTC) (envelope-from marieheleneka@gmail.com) Received: by mail-lf0-x236.google.com with SMTP id j11so26898012lfb.1; Tue, 12 Apr 2016 07:09:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=onM1+frCJuZoeOM9KKmmiyvJPXdDc2LCGJrrsIOAAI8=; b=uGUMpA4eq+8FXkIF6SnLzpFZgWV320he4SiX+3JNPVWkuBrimNZ03oFQtJoa2DhJT6 PNi/uV+Uczan7zmU7dnUPo/WmmL6fgxTU8/TL0La3j/pbR3g8QD82cBt5N6N4/qZCv8f /vYFBmSqx+XQ3vdFneZ6rV4i4VsWnV3/XSe9tgcZ7BRZ0hnIo3yWcAy5yW3sBQ9BSE4E gp8UZo9ygmRmdFSqRPwzvPk00g2GyBi+O4jBCSHckmQkgsiHqswAlokgVqtM/t/y3OEs scYP69eJpHMytFfTvosAPP/lAO7BxauYNlRdyTgDfsw0XsA/uCDfKjIhEcFv+ZILEkt2 rUxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=onM1+frCJuZoeOM9KKmmiyvJPXdDc2LCGJrrsIOAAI8=; b=P68bZuAGXj1Wl+aU+yVD5sJw+bcuwZs4jI5GcUBJgnX8pBBUpvpc/lYuOTlXX/2tDi GJ6Uqj+k62qNIkXP3FD1CdhRUsaDkXHCAy0oc3qrhbNnDrA5WCx+6Va1z4MC3qIfbu8m YtQR3lYpFHhZfCTLPjQLXDg43C3wqQWBn2AOh1/Uxmas+Oz/No+RpTTGdZK6s1zkKMqq t1woyKlxMq0V+ELoElycdpDyTDyFRSEIpKYOk6U33mrxN4nb9TO6VtzGK4dkYCkHPFK/ isusrSqz6/O6kU4wZL0WgcMBGDKfKB4w7KwjaDXnKqPw4oCFMvd65wkVpe7yBgQgBxRN BIiQ== X-Gm-Message-State: AOPr4FXdwlqIHnHq23d9/cM2G9kW2Mhjy+9CYTX+/m5mwO2Qvar1iyyhor6kQAZ9C78qmuDKLTGBb+kSLiZFmA== X-Received: by 10.25.150.147 with SMTP id y141mr1269429lfd.95.1460470152391; Tue, 12 Apr 2016 07:09:12 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Marie Helene Kvello-Aune Date: Tue, 12 Apr 2016 14:09:02 +0000 Message-ID: Subject: Re: libifconfig: Initial code available, looking for feedback To: Kristof Provost Cc: freebsd-net@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2016 14:09:15 -0000 On Mon, Apr 11, 2016 at 10:31 PM Kristof Provost wrote: > > > On 09 Apr 2016, at 15:59, Marie Helene Kvello-Aune < > marieheleneka@gmail.com> wrote: > > I've just pushed an initial version of libifconfig to the github > > repository[2]. I would appreciate feedback, in particular on the API > design > > and usage, and especially on how it communicates error state to the > > application. > > > Awesome. This is important work. I can=E2=80=99t be the only one who=E2= =80=99s tired of > writing > ioctl() calls to set an IP address. > > Is it still your intention to re-implement/refactor/re-whatever ifconfig > to use this > library? It seems like it=E2=80=99d be both a good test-case and a good w= ay to > ensure > the library stays up to date, and grows new capabilities as features are > added > to the network stack. I'm actually converting ifconfig as I add features to the library. It's how I test that things seem to work. :) > > > Expect the API to break frequently/often for the time being, as it is > still > > in very early stages of development. > > I=E2=80=99ve had a quick look at the library so far, and have a few remar= ks. > > It might be better to have an explicit (opaque to the library user) handl= e > to contain both the error state (libifconfig_errstate) and the open > sockets (sdkeys). > This would go a long way in making the library thread-safe (because users > can now > rely on their error state not getting clobbered by another thread). > > Good idea. Adrian Chadd mentioned something like this off-list as well, and I still haven't quite decided how to implement it. I have considered looking into implementing this similar to how the global 'errno' variable is implemented, but I haven't actually researched how to do this yet. I'm currently leaning towards having a libifconfig_state_create() (or similarily named) method which retrieves an appropriate struct for the calling application to pass into the library methods. Both approaches should be thread friendly. > Bikeshedding: > - libifconfig_ seems quite long for a prefix. Perhaps libifc_ or lifc_ ? > - if (foo !=3D NULL) free(foo); can be safely written as free(foo); > > Yeah, I have been feeling the prefix is a bit long as well. libifc_ looks ok to me. > Regards, > Kristof Thanks for the feedback! Regards, Marie Helene Kvello-Aune marieheleneka@gmail.com From owner-freebsd-net@freebsd.org Tue Apr 12 14:23:23 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B03CB0CE49 for ; Tue, 12 Apr 2016 14:23:23 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0FD861ADD for ; Tue, 12 Apr 2016 14:23:23 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [IPv6:::1] (vega.codepro.be [IPv6:2a01:4f8:162:1127::3]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id 2761575D4; Tue, 12 Apr 2016 16:23:20 +0200 (CEST) Subject: Re: libifconfig: Initial code available, looking for feedback Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) From: Kristof Provost X-Checked-By-Nsa: Probably In-Reply-To: Date: Tue, 12 Apr 2016 16:23:16 +0200 Cc: freebsd-net@freebsd.org Message-Id: <24C6C827-DD53-447B-B9EB-90E73347DC1A@FreeBSD.org> References: To: Marie Helene Kvello-Aune X-Mailer: Apple Mail (2.3124) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2016 14:23:23 -0000 > On 12 Apr 2016, at 16:09, Marie Helene Kvello-Aune = wrote: >=20 > > Expect the API to break frequently/often for the time being, as it = is still > > in very early stages of development. >=20 > I=E2=80=99ve had a quick look at the library so far, and have a few = remarks. >=20 > It might be better to have an explicit (opaque to the library user) = handle > to contain both the error state (libifconfig_errstate) and the open = sockets (sdkeys). > This would go a long way in making the library thread-safe (because = users can now > rely on their error state not getting clobbered by another thread). >=20 >=20 > Good idea. Adrian Chadd mentioned something like this off-list as = well, and I still haven't quite decided how to implement it. I have = considered looking into implementing this similar to how the global = 'errno' variable is implemented, but I haven't actually researched how = to do this yet. Iirc. errno is implemented using a thread-local variable. /usr/include/sys/errno.h #defines it to (* __error()), which is = implemented in lib/libc/sys/__error.c and lib/libthr/sys/thr_error.c That seems both complicated and needlessly restrictive. The second option gives all freedom to implementors. If they want one = libifc handle protected by a mutex that=E2=80=99s easy. If they want one = libifc handle per thread that=E2=80=99s also easy. >=20 > I'm currently leaning towards having a libifconfig_state_create() (or = similarily named) method which retrieves an appropriate struct for the = calling application to pass into the library methods. >=20 Yeah, I was thinking something along the lines of this: libifc_handle_t* libifc_open(); void libifc_close(libifc_handle_t *h); int libifc_set_mtu(libifc_handle_t *h, const char *name, int mtu); =E2=80=A6 Possibly also: int libifc_get_error(libifc_handle_t *h); If the definition of libifc_handle_t is kept opaque (so the headers only = have =E2=80=98struct libifc_handle; typedef struct libifc_handle = libifc_handle_t;=E2=80=99) you can get away with changing the size or = contents of the struct without breaking any of the users. (Because they=E2=80=99ll only have a pointer to keep track of, the size = of the object it points to doesn=E2=80=99t matter to them.) Regards, Kristof From owner-freebsd-net@freebsd.org Tue Apr 12 17:03:38 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F7A3B0CFD1 for ; Tue, 12 Apr 2016 17:03:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 805471E99 for ; Tue, 12 Apr 2016 17:03:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u3CH3c8T033703 for ; Tue, 12 Apr 2016 17:03:38 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 208653] PCN driver will not handle all PC net pro cards Date: Tue, 12 Apr 2016 17:03:38 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.3-BETA2 X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: mats42@home.se X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2016 17:03:38 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208653 --- Comment #1 from Mats --- I'm not a C developer but I can ofcourse help with testing of this issue --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Thu Apr 14 03:26:49 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12E7AB0E3C0 for ; Thu, 14 Apr 2016 03:26:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03A361CAF for ; Thu, 14 Apr 2016 03:26:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u3E3Qmbh031120 for ; Thu, 14 Apr 2016 03:26:48 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 197076] Only One Port Of Dual Port EC2000S (RTL8111E, r8169) Detected Date: Thu, 14 Apr 2016 03:26:48 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: webdawg@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 03:26:49 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D197076 --- Comment #7 from webdawg@gmail.com --- Created attachment 169304 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D169304&action= =3Dedit dmesg output --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Thu Apr 14 03:27:29 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2066BB0E411 for ; Thu, 14 Apr 2016 03:27:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 113131D57 for ; Thu, 14 Apr 2016 03:27:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u3E3RSj2046063 for ; Thu, 14 Apr 2016 03:27:28 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 197076] Only One Port Of Dual Port EC2000S (RTL8111E, r8169) Detected Date: Thu, 14 Apr 2016 03:27:28 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: webdawg@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 03:27:29 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D197076 --- Comment #8 from webdawg@gmail.com --- Created attachment 169305 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D169305&action= =3Dedit pciconf --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Thu Apr 14 03:28:11 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 657D6B0E4D4 for ; Thu, 14 Apr 2016 03:28:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5677F1EA2 for ; Thu, 14 Apr 2016 03:28:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u3E3SBKh063312 for ; Thu, 14 Apr 2016 03:28:11 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 197076] Only One Port Of Dual Port EC2000S (RTL8111E, r8169) Detected Date: Thu, 14 Apr 2016 03:28:11 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: webdawg@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 03:28:11 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D197076 --- Comment #9 from webdawg@gmail.com --- Still no luck. I am ready this time with a system to work with if you want to pursue this. I have attached two new files with what you asked for. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Fri Apr 15 08:03:32 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37364AEDFAD for ; Fri, 15 Apr 2016 08:03:32 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:607c::16:b]) by mx1.freebsd.org (Postfix) with ESMTP id 1531A12E3 for ; Fri, 15 Apr 2016 08:03:32 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id B6A38CDE1; Fri, 15 Apr 2016 08:03:31 +0000 (UTC) Date: Fri, 15 Apr 2016 08:03:31 +0000 To: freebsd-net@freebsd.org From: "sepherosa_gmail.com (Sepherosa Ziehau)" Reply-to: D5853+325+47f73f6fef2a530d@reviews.freebsd.org Subject: [Differential] [Commented On] D5853: dhclient: Log a warning instead of bailing upon "illegal" options Message-ID: X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: Thread-Topic: D5853: dhclient: Log a warning instead of bailing upon "illegal" options X-Herald-Rules: none X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: Precedence: bulk In-Reply-To: References: Thread-Index: NzcwN2IzZDEwOWQ3OGQ5NTIxYzJjMDI3ZmM0IFcQoFM= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 08:03:32 -0000 sepherosa_gmail.com added a comment. If no objection comes, it will be committed in the middle of next week. REVISION DETAIL https://reviews.freebsd.org/D5853 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, network, secteam, delphij, glebius, adrian, honzhan_microsoft.com, howard0su_gmail.com, decui_microsoft.com, freebsd-net-list From owner-freebsd-net@freebsd.org Fri Apr 15 08:04:05 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E486AEC017 for ; Fri, 15 Apr 2016 08:04:05 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:607c::16:b]) by mx1.freebsd.org (Postfix) with ESMTP id 165EF13CB for ; Fri, 15 Apr 2016 08:04:05 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id E177BCE4F; Fri, 15 Apr 2016 08:04:04 +0000 (UTC) Date: Fri, 15 Apr 2016 08:04:04 +0000 To: freebsd-net@freebsd.org From: "sepherosa_gmail.com (Sepherosa Ziehau)" Reply-to: D5872+325+9dea0574509cdbb3@reviews.freebsd.org Subject: [Differential] [Commented On] D5872: tcp: Don't prematurely drop receiving-only connections Message-ID: <598ed3c89495c238774ab8a6b94e6267@localhost.localdomain> X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: Thread-Topic: D5872: tcp: Don't prematurely drop receiving-only connections X-Herald-Rules: <64> X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: Precedence: bulk In-Reply-To: References: Thread-Index: MmVmNzYzNzljOGQxMmM4MWI4MmNjYzcxMzczIFcQoHQ= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 08:04:05 -0000 sepherosa_gmail.com added a comment. If no objection comes, it will be committed in the middle of next week. REVISION DETAIL https://reviews.freebsd.org/D5872 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, network, glebius, hiren, lstewart, adrian, delphij, decui_microsoft.com, honzhan_microsoft.com, howard0su_gmail.com, transport, freebsd-net-list From owner-freebsd-net@freebsd.org Fri Apr 15 12:00:24 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E95A3AED2E2 for ; Fri, 15 Apr 2016 12:00:24 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:607c::16:b]) by mx1.freebsd.org (Postfix) with ESMTP id BABE91C81 for ; Fri, 15 Apr 2016 12:00:24 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id 48C7CB8AE; Fri, 15 Apr 2016 12:00:24 +0000 (UTC) Date: Fri, 15 Apr 2016 12:00:24 +0000 To: freebsd-net@freebsd.org From: "jtl (Jonathan T. Looney)" Reply-to: D5872+325+9dea0574509cdbb3@reviews.freebsd.org Subject: [Differential] [Requested Changes To] D5872: tcp: Don't prematurely drop receiving-only connections Message-ID: <35a14b87d2d7829600f8081128199c1e@localhost.localdomain> X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: , , , Thread-Topic: D5872: tcp: Don't prematurely drop receiving-only connections X-Herald-Rules: <64> X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: Precedence: bulk In-Reply-To: References: Thread-Index: MmVmNzYzNzljOGQxMmM4MWI4MmNjYzcxMzczIFcQ19g= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 12:00:25 -0000 jtl requested changes to this revision. jtl added a reviewer: jtl. jtl added a comment. This revision now requires changes to proceed. Doesn't tp->t_rxtshift get updated on a successful send? If not, I think that is what we should be fixing. Personally, I think a connection should drop if we aren't able to send any ACKs for 350 seconds. INLINE COMMENTS sys/netinet/tcp_output.c:1561 You already own a lock on tp. No need to do atomic operations. REVISION DETAIL https://reviews.freebsd.org/D5872 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, network, glebius, hiren, lstewart, adrian, delphij, decui_microsoft.com, honzhan_microsoft.com, howard0su_gmail.com, freebsd-net-list, transport, jtl Cc: jtl From owner-freebsd-net@freebsd.org Fri Apr 15 13:40:59 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50752AED55A for ; Fri, 15 Apr 2016 13:40:59 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:607c::16:b]) by mx1.freebsd.org (Postfix) with ESMTP id 2B1CF1181 for ; Fri, 15 Apr 2016 13:40:59 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id C733ECD91; Fri, 15 Apr 2016 13:40:58 +0000 (UTC) Date: Fri, 15 Apr 2016 13:40:58 +0000 To: freebsd-net@freebsd.org From: "jtl (Jonathan T. Looney)" Reply-to: D5872+325+9dea0574509cdbb3@reviews.freebsd.org Subject: [Differential] [Commented On] D5872: tcp: Don't prematurely drop receiving-only connections Message-ID: X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: Thread-Topic: D5872: tcp: Don't prematurely drop receiving-only connections X-Herald-Rules: <64> X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: Precedence: bulk In-Reply-To: References: Thread-Index: MmVmNzYzNzljOGQxMmM4MWI4MmNjYzcxMzczIFcQ72o= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 13:40:59 -0000 jtl added a comment. In https://reviews.freebsd.org/D5872#127063, @jtl wrote: > Doesn't tp->t_rxtshift get updated on a successful send? If not, I think that is what we should be fixing. Of course, tp->t_rxtshift doesn't get updated on a successful send. That's not the way this works. :-) Now that I've had more coffee... This probably amounts to the generic problem of: - When we send data, we should be setting the retransmit timer to make sure we retransmit. - When we are not sending data, we should be setting a different timer (DELACK, perhaps?) to make sure we send an ACK, when able. The key feature that makes the retransmit timer inappropriate for an ACK-only case is that it is only stopped when we receive input; however, in the ACK-only case, we really want to stop it as soon as we transmit a successful ACK. Of course, we could just drop the ACK and everything would "just work". But, it //probably// is still a good idea to try to re-transmit the ACK. REVISION DETAIL https://reviews.freebsd.org/D5872 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, network, glebius, hiren, lstewart, adrian, delphij, decui_microsoft.com, honzhan_microsoft.com, howard0su_gmail.com, freebsd-net-list, transport, jtl Cc: jtl From owner-freebsd-net@freebsd.org Fri Apr 15 16:58:24 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53FCAAED19D for ; Fri, 15 Apr 2016 16:58:24 +0000 (UTC) (envelope-from raitech@gmail.com) Received: from mail-ob0-x22b.google.com (mail-ob0-x22b.google.com [IPv6:2607:f8b0:4003:c01::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1624B13A8 for ; Fri, 15 Apr 2016 16:58:24 +0000 (UTC) (envelope-from raitech@gmail.com) Received: by mail-ob0-x22b.google.com with SMTP id j9so67414837obd.3 for ; Fri, 15 Apr 2016 09:58:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=fn/GYKuphg6wbSAJhNU4mxAvSiUlDzvECwcaleTi6Fw=; b=twtBxt161ek3ZiYq1K+Y/+9fVGdpBrAPRCUZvGhB0IhKF2UK/zgwmqNhFIQjrOC++h PgRZ5BQpHkDR7nWqSLhNJUAcQ4kG2zoS5b/jn2QQ5Ne6KH+oigL2cYLwTE5KQFW4EzFE 0SDm00QjNcPuxJIVQOLQo1IxoPZa69O0PCZeI2AO+Q3riN2p2vO1jL94ebMzYLButOb2 CElUPkuUuWEtapS6DBbOfpJhSvTHtOF/XTQCeiwX2z/LlwUslW/5VtuyuIUZ9nNXDkqK iK00U5KVpQJKNIXC0LM00/WRdV6XeeHoAf0GAx3UUaKp7+SMupjI9FHQydYweM4Z1yY4 FGqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=fn/GYKuphg6wbSAJhNU4mxAvSiUlDzvECwcaleTi6Fw=; b=GS9EVBwQWShN//IpGMqHrgJmZAph6Ji7RboazndpFlQVXu9ZlkZleHSrg1QLKcl4pA pLNLSEPujqY8FrwgkVWXk7V9YqhiO2BaTQOfY0Mgs3zbuT6anb2x5i9JnK1lcYmbbLkm /288hwPtohcGDw021oXNJXcdVY5AoOMLugspChcSmeF5K7v/e6VwdVXprkjvQhSERz90 qi1p456VDak8VYzRJG31/KUBtOoXo/5ysykE+lodh0iZrotw8LvYYN0MyQoY76OYBgtN s2HI4pNn2Vr4e8skLwiCxj2p2Q/Y3ADz3afzGHlwcQ+iRyFfU/QFczgxB/KB5HOURfkl xSUw== X-Gm-Message-State: AOPr4FXn/aM8wj0tSHgs/vI5Ig2u5C0ASmKpQZ8ngFXf+Tu/hzc9CEbBGqLWjwVtGqqzOjjxWivXxLBbqPVKaQ== X-Received: by 10.182.79.200 with SMTP id l8mr11783908obx.18.1460739503292; Fri, 15 Apr 2016 09:58:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.57.131 with HTTP; Fri, 15 Apr 2016 09:58:03 -0700 (PDT) In-Reply-To: <20151106080905.cb3369337a481b23dc894539@aei.mpg.de> References: <3546_1446644979_563A0CF3_3546_724_1_20151104144354.acccf3c7315a6009264d755d@aei.mpg.de> <20151106080905.cb3369337a481b23dc894539@aei.mpg.de> From: Raimundo Santos Date: Fri, 15 Apr 2016 13:58:03 -0300 Message-ID: Subject: Re: strange nfs/rsync stalls To: =?UTF-8?B?R2Vycml0IEvDvGhu?= Cc: "freebsd-net@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 16:58:24 -0000 Hello, sorry for the necromancy here. I had issues with a simples NAS that exports NFS only for "nobody:nobody" as rsync tries to set uid and gid. Just take off this feature with: rsync -a --no-g --no-o and everything went fine. Hope it helps someone. Best regards, Raimundo Santos On 6 November 2015 at 05:09, Gerrit K=C3=BChn wro= te: > On Wed, 4 Nov 2015 14:43:54 +0100 Gerrit K=C3=BChn > wrote about strange nfs/rsync stalls: > > > I have a couple of other machines that use the same server in the same > > way, none of them ever showed this behaviour. Are there any > > suggestions how to debug/fix this? > > Some more pointers from my side: I see a similar issue when using rsync > over ssh, so this does not appear to be a nfs issue. However, even when > running rsync with -vvv and debug turned on, I cannot find any hard reaso= n > for the lockups. They appear to happen erratically, not at a fixed file o= r > such. When transferring over ssh, I can press CTRL-C to make the syncing > go on until the next lockup happens. > I also tried to swap client and server (i.e., the machine where I start > rsync), and that runs without any issue... which leaves me even more > puzzled. Any hints are still very welcome. > > > cu > Gerrit > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > From owner-freebsd-net@freebsd.org Fri Apr 15 17:00:57 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40EACAED694 for ; Fri, 15 Apr 2016 17:00:57 +0000 (UTC) (envelope-from raitech@gmail.com) Received: from mail-ob0-x230.google.com (mail-ob0-x230.google.com [IPv6:2607:f8b0:4003:c01::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0A5C718E5 for ; Fri, 15 Apr 2016 17:00:57 +0000 (UTC) (envelope-from raitech@gmail.com) Received: by mail-ob0-x230.google.com with SMTP id n10so8727383obb.2 for ; Fri, 15 Apr 2016 10:00:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=6Lhc1LhXqyegHi+fX+TsuezUnUZGsWqdFT+OWyoUgK4=; b=XFTHoXeAoaUA85wDGJ7+xH6nAZD8jeO0fIKAkDd+kzRm2473uXX8ClkwQRENqZnNPv WXnhu0sZvoghet0QsUVIR5o+swAAtnmi0qMNckoAuJPvWhk7T8iE3qqrScUp6VuB3xUm Np7VM32+XAM9MYJbKML2HgkWv4HwM2P7A0dLmKrEK2kFvmvZ/3HMaBvKQYuAR251blh4 Ng3lGJlZUMSPahpsXh6mSr5pxMoGixC2GH8DaTz3ssd7Ve5PgIano33/tkHL7LVlVaUO bYTW25SWUJ8gs58K+SfHX9AaZp6dxL8UgA2EhsJatlmpuICbhU6SP9nzqcFVg7lyQ1vP pNFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=6Lhc1LhXqyegHi+fX+TsuezUnUZGsWqdFT+OWyoUgK4=; b=LfxhJWt4qYQ9o9bKieam+od6wY2OkEVfqovfZzsVMkVxRg9UGr4IoBZvUzgJqqytE0 Btqj1NCGvCojUQ/9jZ+t7MOs9mLvl6sfDo045HYpMVCQdTSHR0uTtihkkU9OVXNiIsiq AAIcc51zHTWeIm0Y8wYOQwL1O007K9T7QqLMf9QQ3vGZTJczjzny4Tr9GD5Ww8lg3o3C 87VhbnQeFsb1W5k4wPFEzxO6FJdTT7anW/PmSPGvg9e+ak17Mzgx+35AeT5EFTUBG21y ng0QUGTBlw4+ZLDrg4xri1Iv6txAt1Zbl4EzWesHh3MS74OaI0hIRCqn671sY0wWKm1A tKqw== X-Gm-Message-State: AOPr4FWVeVpqvDh47gfUWm7gMKnmG41txAgFFVsvurOhMvYShI4H1KAfomzmtxA6AOtUuAZFfS70jfR9hOQWIQ== X-Received: by 10.60.123.41 with SMTP id lx9mr11721060oeb.55.1460739656385; Fri, 15 Apr 2016 10:00:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.57.131 with HTTP; Fri, 15 Apr 2016 10:00:37 -0700 (PDT) From: Raimundo Santos Date: Fri, 15 Apr 2016 14:00:37 -0300 Message-ID: Subject: Why anyone can read and write to a nobody NFS mounted volume? To: "freebsd-net@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 17:00:57 -0000 Hello all! i have a strange situation: everyone and not just root can read and write to a NFS mount point whose owner is nobody:nobody. Is this an expected behaviour? FreeBSD 10.2 RELEASE as NFS client. Seagate NAS400 as NFS server. Thank you all, Raimundo Santos From owner-freebsd-net@freebsd.org Fri Apr 15 17:05:20 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3F30AED860 for ; Fri, 15 Apr 2016 17:05:20 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:607c::16:b]) by mx1.freebsd.org (Postfix) with ESMTP id 7F59B1CF2 for ; Fri, 15 Apr 2016 17:05:20 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id E9A74C7DD; Fri, 15 Apr 2016 17:05:19 +0000 (UTC) Date: Fri, 15 Apr 2016 17:05:19 +0000 To: freebsd-net@freebsd.org From: "hiren (hiren panchasara)" Reply-to: D5872+325+9dea0574509cdbb3@reviews.freebsd.org Subject: [Differential] [Updated] D5872: tcp: Don't prematurely drop receiving-only connections Message-ID: <83a03c2539e897161fee4a3e4274beaa@localhost.localdomain> X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: , Thread-Topic: D5872: tcp: Don't prematurely drop receiving-only connections X-Herald-Rules: <64> X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: Precedence: bulk In-Reply-To: References: Thread-Index: MmVmNzYzNzljOGQxMmM4MWI4MmNjYzcxMzczIFcRH08= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 17:05:20 -0000 hiren added a comment. In https://reviews.freebsd.org/D5872#127123, @jtl wrote: > > The key feature that makes the retransmit timer inappropriate for an ACK-only case is that it is only stopped when we receive input; however, in the ACK-only case, we really want to stop it as soon as we transmit a successful ACK. Indeed. I guess we want to treat internal insufficient memory error with retransmit timer remedy. One would also argue that do you really want to go on when you failed to respond (with the ACK) for these many times. Don't you have bigger problems by now? > Of course, we could just drop the ACK and everything would "just work". But, it //probably// is still a good idea to try to re-transmit the ACK. I am not opposed to the suggested patch but its just...weird. (Also if its not obvious, I don't have a better solution to present. :-)) REVISION DETAIL https://reviews.freebsd.org/D5872 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, network, glebius, lstewart, adrian, delphij, decui_microsoft.com, honzhan_microsoft.com, howard0su_gmail.com, freebsd-net-list, transport, jtl, hiren Cc: jtl From owner-freebsd-net@freebsd.org Fri Apr 15 22:24:17 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE463AEDE1E for ; Fri, 15 Apr 2016 22:24:17 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id AA458194A for ; Fri, 15 Apr 2016 22:24:17 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) IronPort-PHdr: 9a23:3ZshwhchPsA9LYKEawaUuEprlGMj4u6mDksu8pMizoh2WeGdxc6/Yh7h7PlgxGXEQZ/co6odzbGG4+a9BidasMzJmUtBWaIPfidNsd8RkQ0kDZzNImzAB9muURYHGt9fXkRu5XCxPBsdMs//Y1rPvi/6tmZKSV3BPAZ4bt74BpTVx5zukbviq9uOPE4S1WD1SIgxBSv1hD2ZjtMRj4pmJ/R54TryiVwMRd5rw3h1L0mYhRf265T41pdi9yNNp6BprJYYAu2pN5g/GIZRDTE7NWwyrPbiswXEVkPb/HIdTmgdkjJHBgHE6FfxWZKn4QXgse8o4iiRPoXTRLs3XTmnp/NxTRbjiyMKMhYk927Kh8hojORQqUTy9FRE34fIbdTNZ7JFdaTHcIZCSA== X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CvBABsaBFX/61jaINdhAt9BrwTFwuFIkoCgXcRAQEBAQEBAQFkJ4ItghUBAQQBAQEgBCcgCwwEAgEIDgwCDRkCAicBCSYCBAgHBAEcBIgIDrA0kX8BAQEBAQEEAQEBAQEBFgR8hSWBfYJOhCABAQWDGIJWBYd2hVyKOoV4hSyEUYd3hTOPJwI2LIIEGoFmIDAHiBA2fgEBAQ X-IronPort-AV: E=Sophos;i="5.24,489,1454994000"; d="scan'208";a="276417093" Received: from nipigon.cs.uoguelph.ca (HELO zcs1.mail.uoguelph.ca) ([131.104.99.173]) by esa-jnhn.mail.uoguelph.ca with ESMTP; 15 Apr 2016 18:23:07 -0400 Received: from localhost (localhost [127.0.0.1]) by zcs1.mail.uoguelph.ca (Postfix) with ESMTP id B5AE515F587; Fri, 15 Apr 2016 18:23:07 -0400 (EDT) Received: from zcs1.mail.uoguelph.ca ([127.0.0.1]) by localhost (zcs1.mail.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Ulu6kDgYlEUm; Fri, 15 Apr 2016 18:23:07 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by zcs1.mail.uoguelph.ca (Postfix) with ESMTP id 37C2715F589; Fri, 15 Apr 2016 18:23:07 -0400 (EDT) X-Virus-Scanned: amavisd-new at zcs1.mail.uoguelph.ca Received: from zcs1.mail.uoguelph.ca ([127.0.0.1]) by localhost (zcs1.mail.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 6YDr_NDYdRyb; Fri, 15 Apr 2016 18:23:07 -0400 (EDT) Received: from zcs1.mail.uoguelph.ca (zcs1.mail.uoguelph.ca [172.17.95.18]) by zcs1.mail.uoguelph.ca (Postfix) with ESMTP id 1F99715F587; Fri, 15 Apr 2016 18:23:07 -0400 (EDT) Date: Fri, 15 Apr 2016 18:23:07 -0400 (EDT) From: Rick Macklem To: Raimundo Santos Cc: freebsd-net@freebsd.org Message-ID: <960500313.65065742.1460758987017.JavaMail.zimbra@uoguelph.ca> In-Reply-To: References: Subject: Re: Why anyone can read and write to a nobody NFS mounted volume? MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.95.11] X-Mailer: Zimbra 8.0.9_GA_6191 (ZimbraWebClient - FF18 (Linux)/8.0.9_GA_6191) Thread-Topic: Why anyone can read and write to a nobody NFS mounted volume? Thread-Index: DiF5ModEZ4EIhwqpf095H8jrTipSlA== X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 22:24:18 -0000 Well, I suppose it is up to the server implementor. (In your case Seagate...) Normally NFS servers map root->nobody by default, under the assumption that "nobody" is not a real user and is checked via world permissions. --> I'd say a typical server would allow anyone (including "nobody" access) if the file's mode includes world "rw". But none of this is defined in any of the NFS RFCs as far as I recall (the RFCs basically define what goes on the wire), so I think it is up to the server implementor. --> If the file doesn't have world permissions, then I would consider this atypical and you might want to check with the server implementor in case this is configurable? Now, if you are using NFSv4 and uid<->user mapping isn't set up correctly, any uid/gid that can't be mapped to another name will go on the wire to the server as "nobody" (and "nogroup" if I recall it correctly). So, you might want to "nfsstat -m" on the client to see if you are using NFSv3 or NFSv4 and try NFSv3 if it isn't already what you are using. rick ----- Original Message ----- > Hello all! > > i have a strange situation: everyone and not just root can read and write > to a NFS mount point whose owner is nobody:nobody. > > Is this an expected behaviour? > > FreeBSD 10.2 RELEASE as NFS client. > Seagate NAS400 as NFS server. > > Thank you all, > Raimundo Santos > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > From owner-freebsd-net@freebsd.org Fri Apr 15 23:21:17 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD5D0B10410 for ; Fri, 15 Apr 2016 23:21:17 +0000 (UTC) (envelope-from raitech@gmail.com) Received: from mail-oi0-x234.google.com (mail-oi0-x234.google.com [IPv6:2607:f8b0:4003:c06::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D19F19A2 for ; Fri, 15 Apr 2016 23:21:17 +0000 (UTC) (envelope-from raitech@gmail.com) Received: by mail-oi0-x234.google.com with SMTP id y204so138648132oie.3 for ; Fri, 15 Apr 2016 16:21:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=mcu4f6RtjFExuu1IP7KkDjvCLtrWtt0VQPZ2H2NUffY=; b=eZYqqX+N1WY/kdN2uP3RXhhCnr2w/ubBMcT4AgxdTB9uv/jLnex8TD4NL7Lsdq251K r3m+cSa6vWwnr5dLjL3xyXQ91iXcvDt83k3oPu26gxiTXPDYZjWY3HYp5f9pfb6ZQzmn dgZsU8SQ8teyyRV4iP4i4PG/MIxxcuhygTmb/C9DB10dkwkNw8GJzYzMqlkkgl374Xlw NRBm54OUrI7BSlF9RpBrZaXxLV+asuEwNNWvwgpE4HYSEz7jOLzrM36CKiJ/0GImHegD MidsGWcLM34ob+qhONOgSPpuTYJ0dDaVbtwKaxj87gnmPu2LvwZxKqyyskSSUuh0FnyI xRqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=mcu4f6RtjFExuu1IP7KkDjvCLtrWtt0VQPZ2H2NUffY=; b=VX5zWlGEiX3yVB9T5ieF7l3mH8CTgq0llchXv+yfWgSkORFeEiUXUxx1xpa5ZHCD+N XBN7z7lmCnkhlKooign1jqkEBvE5GtWbqYShhd/TDy6Rmm/4gVhffwF/7xezqW++T611 WefZmv62j8HZqv8hzIC9OmGA6GLz2zlw/RoR8cYDsYrJrt5nn2d80Xp+JUG4w/0P1BKG MzDUPiJGEdBTKu51quQSw61cX+nFYjyCt8d8C60wIH741JDFkngajocN1ILeb4KGxfSm XqLA2y0e8jT7e1xkCWA1bfsOy+/lpfkOM8Fgjd+RSXAWtyymNX/p5pHb9tdsD2md56eV 80Fw== X-Gm-Message-State: AOPr4FVbvGK7Yk+cB6S0BmAwpiovWzoet6AUT1YwGJghiAFPqftTEH8TkE8hJz7IaopLdWZHio0r2Ggz/R8TmQ== X-Received: by 10.157.33.76 with SMTP id l12mr1739508otd.32.1460762476624; Fri, 15 Apr 2016 16:21:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.57.131 with HTTP; Fri, 15 Apr 2016 16:20:57 -0700 (PDT) In-Reply-To: <960500313.65065742.1460758987017.JavaMail.zimbra@uoguelph.ca> References: <960500313.65065742.1460758987017.JavaMail.zimbra@uoguelph.ca> From: Raimundo Santos Date: Fri, 15 Apr 2016 20:20:57 -0300 Message-ID: Subject: Re: Why anyone can read and write to a nobody NFS mounted volume? To: Rick Macklem Cc: "freebsd-net@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 23:21:17 -0000 Thank you for your time, Rick! I will take a look on the permissions of the dirs I am mounting from the server, but you clarified a big thing for me: it is up to the server machine to decide about permissions. Am I right? Thank you, Raimundo Santos On 15 April 2016 at 19:23, Rick Macklem wrote: > Well, I suppose it is up to the server implementor. (In your case > Seagate...) > Normally NFS servers map root->nobody by default, under the assumption that > "nobody" is not a real user and is checked via world permissions. > --> I'd say a typical server would allow anyone (including "nobody" access) > if the file's mode includes world "rw". > > But none of this is defined in any of the NFS RFCs as far as I recall (the > RFCs basically define what goes on the wire), so I think it is up to the > server implementor. > --> If the file doesn't have world permissions, then I would consider this > atypical and you might want to check with the server implementor in > case > this is configurable? > > Now, if you are using NFSv4 and uid<->user mapping isn't set up correctly, > any uid/gid that can't be mapped to another name will go on the wire to the > server as "nobody" (and "nogroup" if I recall it correctly). So, you might > want to "nfsstat -m" on the client to see if you are using NFSv3 or NFSv4 > and try NFSv3 if it isn't already what you are using. > > rick > > ----- Original Message ----- > > Hello all! > > > > i have a strange situation: everyone and not just root can read and write > > to a NFS mount point whose owner is nobody:nobody. > > > > Is this an expected behaviour? > > > > FreeBSD 10.2 RELEASE as NFS client. > > Seagate NAS400 as NFS server. > > > > Thank you all, > > Raimundo Santos > > _______________________________________________ > > freebsd-net@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-net > > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > > From owner-freebsd-net@freebsd.org Fri Apr 15 23:35:12 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89420B107FF for ; Fri, 15 Apr 2016 23:35:12 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.net.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 3DA891141 for ; Fri, 15 Apr 2016 23:35:11 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) IronPort-PHdr: 9a23:fklouxbF2vo/KXgJB5+FexH/LSx+4OfEezUN459isYplN5qZpM2/bnLW6fgltlLVR4KTs6sC0LqG9f2wEjZeqb+681k8M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aJBzzOEJPK/jvHcaK1oLsh7D0ps2YOVsArQH+SI0xBS3+lR/WuMgSjNkqAYcK4TyNnEF1ff9Lz3hjP1OZkkW0zM6x+Jl+73YY4Kp5pIYTGZj8ZLkyGLxEECw9YSdy4MzwqQKFQxGC63EHXiMRiBUPBgHE6BTzWND1szDmt+xz326UJ8D7R6s4HDKv8/RXT0rSgSYCKjg19ynsg8psi7kT9AiopgByyI78b4ScNf44daTYK4A0X21EC/xQXC8JJ4q3bI8CCqJVJ+NRpIr5ql4msByxGASoHOOpwTYe1Sy+5rEzz+l0SVKO5wcnBd9b6Hk= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2DQAQADehFX/61jaINdhAt9BroWAQ2BcRcLhSJKAoFrFAEBAQEBAQEBZCeCLYIUAQEBAwEBAQEgBCcgCwUHBAIBCA4KAgINGQICJwEJJgIECAcEARwEiAAIDrAjkggBAQEBAQEEAQEBAQEBAQEUBHyFJYF9gk6EIAEBBYMYglYFh3aFXIo6hXiFLIRRh3eFM48nAh4BAUKCBBqBZiAwB4gQNn4BAQE X-IronPort-AV: E=Sophos;i="5.24,489,1454994000"; d="scan'208";a="278152414" Received: from nipigon.cs.uoguelph.ca (HELO zcs1.mail.uoguelph.ca) ([131.104.99.173]) by esa-annu.net.uoguelph.ca with ESMTP; 15 Apr 2016 19:35:04 -0400 Received: from localhost (localhost [127.0.0.1]) by zcs1.mail.uoguelph.ca (Postfix) with ESMTP id 65F4815F58D; Fri, 15 Apr 2016 19:35:04 -0400 (EDT) Received: from zcs1.mail.uoguelph.ca ([127.0.0.1]) by localhost (zcs1.mail.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id LkjLrX24X9im; Fri, 15 Apr 2016 19:35:03 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by zcs1.mail.uoguelph.ca (Postfix) with ESMTP id AD1E615F58E; Fri, 15 Apr 2016 19:35:03 -0400 (EDT) X-Virus-Scanned: amavisd-new at zcs1.mail.uoguelph.ca Received: from zcs1.mail.uoguelph.ca ([127.0.0.1]) by localhost (zcs1.mail.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id rc7fZabO1ch6; Fri, 15 Apr 2016 19:35:03 -0400 (EDT) Received: from zcs1.mail.uoguelph.ca (zcs1.mail.uoguelph.ca [172.17.95.18]) by zcs1.mail.uoguelph.ca (Postfix) with ESMTP id 8914C15F58D; Fri, 15 Apr 2016 19:35:03 -0400 (EDT) Date: Fri, 15 Apr 2016 19:35:03 -0400 (EDT) From: Rick Macklem To: Raimundo Santos Cc: freebsd-net@freebsd.org Message-ID: <1343714271.65108200.1460763303481.JavaMail.zimbra@uoguelph.ca> In-Reply-To: References: <960500313.65065742.1460758987017.JavaMail.zimbra@uoguelph.ca> Subject: Re: Why anyone can read and write to a nobody NFS mounted volume? MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.95.11] X-Mailer: Zimbra 8.0.9_GA_6191 (ZimbraWebClient - FF18 (Linux)/8.0.9_GA_6191) Thread-Topic: Why anyone can read and write to a nobody NFS mounted volume? Thread-Index: e5TEXDDOcNPkWnsrTKmNselPnQ5JjQ== X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 23:35:12 -0000 Raimundo Santos wrote: > Thank you for your time, Rick! > > I will take a look on the permissions of the dirs I am mounting from the > server, but you clarified a big thing for me: it is up to the server > machine to decide about permissions. > > Am I right? > Generally yes. (Typically an NFS client does an Access RPC to check permissions with the server.) One exception to normal checking is that most NFS servers allow the owner all permissions despite the mode and acl settings. This is mainly because NFS doesn't do a POSIX Open and checks permissions on every read/write (whereas POSIX checks at Open only). As such, a POSIX app. expects to be able to Open/Create a file for writing although the mode it sets on the file is read-only. rick > Thank you, > Raimundo Santos > > On 15 April 2016 at 19:23, Rick Macklem wrote: > > > Well, I suppose it is up to the server implementor. (In your case > > Seagate...) > > Normally NFS servers map root->nobody by default, under the assumption that > > "nobody" is not a real user and is checked via world permissions. > > --> I'd say a typical server would allow anyone (including "nobody" access) > > if the file's mode includes world "rw". > > > > But none of this is defined in any of the NFS RFCs as far as I recall (the > > RFCs basically define what goes on the wire), so I think it is up to the > > server implementor. > > --> If the file doesn't have world permissions, then I would consider this > > atypical and you might want to check with the server implementor in > > case > > this is configurable? > > > > Now, if you are using NFSv4 and uid<->user mapping isn't set up correctly, > > any uid/gid that can't be mapped to another name will go on the wire to the > > server as "nobody" (and "nogroup" if I recall it correctly). So, you might > > want to "nfsstat -m" on the client to see if you are using NFSv3 or NFSv4 > > and try NFSv3 if it isn't already what you are using. > > > > rick > > > > ----- Original Message ----- > > > Hello all! > > > > > > i have a strange situation: everyone and not just root can read and write > > > to a NFS mount point whose owner is nobody:nobody. > > > > > > Is this an expected behaviour? > > > > > > FreeBSD 10.2 RELEASE as NFS client. > > > Seagate NAS400 as NFS server. > > > > > > Thank you all, > > > Raimundo Santos > > > _______________________________________________ > > > freebsd-net@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/freebsd-net > > > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > > > > > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > From owner-freebsd-net@freebsd.org Sat Apr 16 01:17:27 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B5F7AEE81E for ; Sat, 16 Apr 2016 01:17:27 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 40AAE19B1 for ; Sat, 16 Apr 2016 01:17:23 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-252-92.lns20.per4.internode.on.net [121.45.252.92]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id u3G1HF7a000114 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Fri, 15 Apr 2016 18:17:21 -0700 (PDT) (envelope-from julian@freebsd.org) To: "freebsd-net@freebsd.org" From: Julian Elischer Subject: tcp guys: please look at this one Message-ID: <57119295.7000504@freebsd.org> Date: Sat, 16 Apr 2016 09:17:09 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2016 01:17:27 -0000 https://reviews.freebsd.org/D5872 This one needs more scrutiny. The cure may be worse than the problem, but it needs more eyes on it.. From owner-freebsd-net@freebsd.org Sat Apr 16 02:08:49 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA75FAED03B for ; Sat, 16 Apr 2016 02:08:49 +0000 (UTC) (envelope-from marieheleneka@gmail.com) Received: from mail-lf0-x231.google.com (mail-lf0-x231.google.com [IPv6:2a00:1450:4010:c07::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 33A13130F; Sat, 16 Apr 2016 02:08:49 +0000 (UTC) (envelope-from marieheleneka@gmail.com) Received: by mail-lf0-x231.google.com with SMTP id g184so164248166lfb.3; Fri, 15 Apr 2016 19:08:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nB3hne9MQkRWAZkA/6m/PPe3NKiQF2fZQoxfE4+owT4=; b=M2+sWTosPwARK1OFZt9GFsuhGVxG4fmij15n55VqrrMEUjyh0pax3TyyZ8bIHBq72s bLjCfWXqsnwH+L21CQ8nJ0Dxcom812EIUVHxjN7H8d3jtrSgi9n3eQq65zm/INzEuJ+g aAy1j5hzHI1ymvkeaAD3XL/03TH8VXhQE9huh39ubpvegJxBTOU80AAwl6g14jHeEozx cORfipvjMrulAR9C4GxqeqVtxR/hbZ7SP3HYGMKTFe3i+nGatoyMospS9mSR3WDfeCle Ih8osbJEhH224NH7GuuHFUpFlRC/tXGJfgapTuEAFHv39VvuqWVn1QvzH88waoBsnnm1 uZ4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nB3hne9MQkRWAZkA/6m/PPe3NKiQF2fZQoxfE4+owT4=; b=YeO3FcPR3kGR2nlg0nVOo6wn/ANTPEzEzaU0++z2m86WA52KRF/QKRaM4Id4bjroX4 xrfU6i6ZUVrfA9H8Q341X5SVZZKwQvECJbAA+lyqx1AeKWDNc51LA2bAEBLtv61o5XcD MtopkD0RVQ1UcgWfG2xAAGdJKMdRNrAIdbjzYv8R7HnjBKW0dgCl7KHeQMvm0S62mSbT PdASjqR2gkw8ZGYiOmyE4ikcRpiiCt2n6deKebRD9b+hLHruTpH3NNlQnSF/wnbrMMVt iL0HWGd8ng+8pXko/BQJHvaExhOjp1rJ5WM4H3fghNSoi0Paa1Gq1+T08EhDqtHPYg87 Id7w== X-Gm-Message-State: AOPr4FWdsOKNe7e+EeTZVXDBtnHdx2xX2/sozvOMNkgSAXk+0Wrg1Bp/t9A4XDEygSqaeP8Fj+iSO2IVbvqJng== X-Received: by 10.25.85.210 with SMTP id j201mr8774731lfb.132.1460772526343; Fri, 15 Apr 2016 19:08:46 -0700 (PDT) MIME-Version: 1.0 References: <24C6C827-DD53-447B-B9EB-90E73347DC1A@FreeBSD.org> In-Reply-To: <24C6C827-DD53-447B-B9EB-90E73347DC1A@FreeBSD.org> From: Marie Helene Kvello-Aune Date: Sat, 16 Apr 2016 02:08:36 +0000 Message-ID: Subject: Re: libifconfig: Initial code available, looking for feedback To: Kristof Provost Cc: freebsd-net@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2016 02:08:49 -0000 On Tue, Apr 12, 2016 at 4:23 PM Kristof Provost wrote: > On 12 Apr 2016, at 16:09, Marie Helene Kvello-Aune < > marieheleneka@gmail.com> wrote: > >> >> > Expect the API to break frequently/often for the time being, as it is >> still >> > in very early stages of development. >> >> I=E2=80=99ve had a quick look at the library so far, and have a few rema= rks. >> >> It might be better to have an explicit (opaque to the library user) hand= le >> to contain both the error state (libifconfig_errstate) and the open >> sockets (sdkeys). >> This would go a long way in making the library thread-safe (because user= s >> can now >> rely on their error state not getting clobbered by another thread). >> >> > Good idea. Adrian Chadd mentioned something like this off-list as well, > and I still haven't quite decided how to implement it. I have considered > looking into implementing this similar to how the global 'errno' variable > is implemented, but I haven't actually researched how to do this yet. > > Iirc. errno is implemented using a thread-local variable. > /usr/include/sys/errno.h #defines it to (* __error()), which is > implemented in lib/libc/sys/__error.c and lib/libthr/sys/thr_error.c > > That seems both complicated and needlessly restrictive. > The second option gives all freedom to implementors. If they want one > libifc handle protected by a mutex that=E2=80=99s easy. If they want one = libifc > handle per thread that=E2=80=99s also easy. > > > I'm currently leaning towards having a libifconfig_state_create() (or > similarily named) method which retrieves an appropriate struct for the > calling application to pass into the library methods. > > Yeah, I was thinking something along the lines of this: > > libifc_handle_t* libifc_open(); > void libifc_close(libifc_handle_t *h); > > int libifc_set_mtu(libifc_handle_t *h, const char *name, int mtu); > =E2=80=A6 > > Possibly also: > int libifc_get_error(libifc_handle_t *h); > > If the definition of libifc_handle_t is kept opaque (so the headers only > have =E2=80=98struct libifc_handle; typedef struct libifc_handle libifc_h= andle_t;=E2=80=99) > you can get away with changing the size or contents of the struct without > breaking any of the users. > (Because they=E2=80=99ll only have a pointer to keep track of, the size o= f the > object it points to doesn=E2=80=99t matter to them.) > > Regards, > Kristof > > Thanks for the feedback. The past couple of days, I've committed these changes to the API. The repo[1] have examples describing how to use libifconfig, updated to the new API structure. In short, the prefix is now libifc_ instead of libifconfig_, every method require a libifc_handle_t as first argument, and there are three methods to retrieve error state (libifc_err_errtype(handle), libifc_err_errno(handle), libifc_err_ioctlreq(handle)) I'll be working on reducing boilerplate code within the API implementation itself today, then start adding more features. [1] https://github.com/Savagedlight/libifconfig Regards, Marie Helene From owner-freebsd-net@freebsd.org Sat Apr 16 02:44:55 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4CCFB0E278 for ; Sat, 16 Apr 2016 02:44:55 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:607c::16:b]) by mx1.freebsd.org (Postfix) with ESMTP id 8044F17D1 for ; Sat, 16 Apr 2016 02:44:55 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id DA3D8C417; Sat, 16 Apr 2016 02:44:54 +0000 (UTC) Date: Sat, 16 Apr 2016 02:44:54 +0000 To: freebsd-net@freebsd.org From: "mike-karels.net (Mike Karels)" Reply-to: D5872+325+9dea0574509cdbb3@reviews.freebsd.org Subject: [Differential] [Commented On] D5872: tcp: Don't prematurely drop receiving-only connections Message-ID: <1e469155ddd9499ac7ff51b86a92a80e@localhost.localdomain> X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: Thread-Topic: D5872: tcp: Don't prematurely drop receiving-only connections X-Herald-Rules: <64> X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: Precedence: bulk In-Reply-To: References: Thread-Index: MmVmNzYzNzljOGQxMmM4MWI4MmNjYzcxMzczIFcRpyY= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2016 02:44:55 -0000 mike-karels.net added a comment. I believe that the original code is wrong, and the change is not sufficient to fix it. The retransmit timer should be running if and only if we have sent data into the receive window and are awaiting an ACK. The persist timer should be running if and only if the retransmit timer is not running, and we have data to send that do not reasonably fit in the window. If we get an ENOBUFS when sending data, we will already be running the retransmit timer. If we drop an ACK on ENOBUFS, either we will receive more data and attempt another ACK, or the sender will time out and resend data. Either will get the connection started again. I believe lines 1552-1554 should simply be deleted. REVISION DETAIL https://reviews.freebsd.org/D5872 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, network, glebius, lstewart, adrian, delphij, decui_microsoft.com, honzhan_microsoft.com, howard0su_gmail.com, freebsd-net-list, transport, jtl, hiren Cc: mike-karels.net, jtl From owner-freebsd-net@freebsd.org Sat Apr 16 03:02:16 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1816B0F1C8 for ; Sat, 16 Apr 2016 03:02:16 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:607c::16:b]) by mx1.freebsd.org (Postfix) with ESMTP id 7AD9218E9 for ; Sat, 16 Apr 2016 03:02:16 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id 0ABC4CB49; Sat, 16 Apr 2016 03:02:16 +0000 (UTC) Date: Sat, 16 Apr 2016 03:02:16 +0000 To: freebsd-net@freebsd.org From: "jtl (Jonathan T. Looney)" Reply-to: D5872+325+9dea0574509cdbb3@reviews.freebsd.org Subject: [Differential] [Commented On] D5872: tcp: Don't prematurely drop receiving-only connections Message-ID: <8c94a729fc16cb66c9e0554cd899f11b@localhost.localdomain> X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: Thread-Topic: D5872: tcp: Don't prematurely drop receiving-only connections X-Herald-Rules: <64> X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: Precedence: bulk In-Reply-To: References: Thread-Index: MmVmNzYzNzljOGQxMmM4MWI4MmNjYzcxMzczIFcRqzg= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2016 03:02:16 -0000 jtl added a comment. I think something like this code will get you closer to what you want: Index: sys/netinet/tcp_output.c =================================================================== --- sys/netinet/tcp_output.c (revision 298090) +++ sys/netinet/tcp_output.c (working copy) @@ -1545,10 +1545,16 @@ tp->t_softerror = error; return (error); case ENOBUFS: - if (!tcp_timer_active(tp, TT_REXMT) && - !tcp_timer_active(tp, TT_PERSIST)) - tcp_timer_activate(tp, TT_REXMT, tp->t_rxtcur); - tp->snd_cwnd = tp->t_maxseg; + if (len > 0 || (flags & (TH_SYN|TH_FIN))) { + if (!tcp_timer_active(tp, TT_REXMT) && + !tcp_timer_active(tp, TT_PERSIST)) + tcp_timer_activate(tp, TT_REXMT, + tp->t_rxtcur); + tp->snd_cwnd = tp->t_maxseg; + } else if (!tcp_timer_active(tp, TT_DELACK) && + (flags & TH_RST) == 0) + tcp_timer_activate(tp, TT_DELACK, + tcp_delacktime); return (0); case EMSGSIZE: /* I think this code gets you closer to what you want. I agree that the present code seems wrong. Using the retransmit timers for ACKs seems inappropriate. But, I am generally concerned about how the system responds when loaded. I'm not sure its a good thing to add more work to a system that is already overloaded. Things will automatically fix themselves in the presence of lost ACKs. The reason to retransmit ACKs is simply to prevent unnecessary retransmissions and the latency that comes with waiting for the retransmission to timeout. But, on an overloaded system, that may or may not be a good thing. REVISION DETAIL https://reviews.freebsd.org/D5872 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, network, glebius, lstewart, adrian, delphij, decui_microsoft.com, honzhan_microsoft.com, howard0su_gmail.com, freebsd-net-list, transport, jtl, hiren Cc: mike-karels.net, jtl From owner-freebsd-net@freebsd.org Sat Apr 16 03:21:59 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A935AED706 for ; Sat, 16 Apr 2016 03:21:59 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:607c::16:b]) by mx1.freebsd.org (Postfix) with ESMTP id 1F7FA1FF3 for ; Sat, 16 Apr 2016 03:21:59 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id B72ECC17C; Sat, 16 Apr 2016 03:21:58 +0000 (UTC) Date: Sat, 16 Apr 2016 03:21:58 +0000 To: freebsd-net@freebsd.org From: "jtl (Jonathan T. Looney)" Reply-to: D5872+325+9dea0574509cdbb3@reviews.freebsd.org Subject: [Differential] [Commented On] D5872: tcp: Don't prematurely drop receiving-only connections Message-ID: <9cd7c0a26ebf84740702e39dc5d0a723@localhost.localdomain> X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: Thread-Topic: D5872: tcp: Don't prematurely drop receiving-only connections X-Herald-Rules: <64> X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: Precedence: bulk In-Reply-To: References: Thread-Index: MmVmNzYzNzljOGQxMmM4MWI4MmNjYzcxMzczIFcRr9Y= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2016 03:21:59 -0000 jtl added a comment. In https://reviews.freebsd.org/D5872#127343, @mike-karels.net wrote: > If we get an ENOBUFS when sending data, we will already be running the retransmit timer. Good point, but see below. > If we drop an ACK on ENOBUFS, either we will receive more data and > attempt another ACK, or the sender will time out and resend data. Either > will get the connection started again. True, but it may take time if we have to wait for a retransmission time out. That isn't necessarily a bad thing. > I believe lines 1552-1554 should > simply be deleted. On the surface, that seems like a reasonable alternative. However, its interesting to see why this code was originally added. It looks like it was added by jlemon in r61179. Here's what the commit message says: > When attempting to transmit a packet, if the system fails to allocate > a mbuf, it may return without setting any timers. If no more data is > scheduled to be transmitted (this was a FIN) the system will sit in > LAST_ACK state forever. > > Thus, when mbuf allocation fails, set the retransmit timer if neither > the retransmit or persist timer is already pending. Even back then, the retransmit and/or persist timers should have been running by this point in the code. It would be interesting to know if jlemon proved this code fixed the problem, or it was just speculated. We fixed a similar-sounding problem last year, and the code is different now, so these particular lines may truly no longer be necessary. But, I am a little hesitant to remove this code without knowing more about its origin. Just my 2c. REVISION DETAIL https://reviews.freebsd.org/D5872 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, network, glebius, lstewart, adrian, delphij, decui_microsoft.com, honzhan_microsoft.com, howard0su_gmail.com, freebsd-net-list, transport, jtl, hiren Cc: mike-karels.net, jtl From owner-freebsd-net@freebsd.org Sat Apr 16 04:27:52 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EB3EB10F36 for ; Sat, 16 Apr 2016 04:27:52 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 595E91B14 for ; Sat, 16 Apr 2016 04:27:51 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c110-21-41-193.carlnfd1.nsw.optusnet.com.au (c110-21-41-193.carlnfd1.nsw.optusnet.com.au [110.21.41.193]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 1F68B424B3B; Sat, 16 Apr 2016 13:59:36 +1000 (AEST) Date: Sat, 16 Apr 2016 13:59:35 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Raimundo Santos cc: "freebsd-net@freebsd.org" Subject: Re: Why anyone can read and write to a nobody NFS mounted volume? In-Reply-To: Message-ID: <20160416100811.Y905@besplex.bde.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=EfU1O6SC c=1 sm=1 tr=0 a=73JWPhLeruqQCjN69UNZtQ==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=B6pfZmMIkaIzbGj7saIA:9 a=CjuIK1q_8ugA:10 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2016 04:27:52 -0000 On Fri, 15 Apr 2016, Raimundo Santos wrote: > i have a strange situation: everyone and not just root can read and write > to a NFS mount point whose owner is nobody:nobody. > > Is this an expected behaviour? > > FreeBSD 10.2 RELEASE as NFS client. > Seagate NAS400 as NFS server. This is, unfortunately, expected. The defaults for nobody used to be 32767:9999. This was broken in FreeBSD in 1995 by changing them to 65534:65534. This conflicts with the best defaults for maproot and mapall on nfs servers. nfs servers should default to mapping to ids below 65535, so that the defaults work on clients with 16-bit ids. 65534 is a good choice, unless you want to support clients with 8-bit ids, when 254 is a good choice. Your server apparently uses good defaults, giving the expected conflict with the misconfigured client. This bug is normally not noticed, since FreeBSD servers are misconfigured by default to the mappings -2:-2. -2 is an invalid id. It last worked in FreeBSD-1. Then 3 or 4 layers of magic turned this into the good value of 65534. The magic included ids being 16 bits. It would have worked right to reduce 65534 to 254 if ids had been reduced to 8 bits, but it worked wrong to increase 65534 to 4294967294 when ids were increased to 32 bits. 4294967294 not only breaks 16-bi clients; it is too hard to remember or type, and is misparsed by the parser in mountd. The misconfigurations compensate for each other. See exports(5) for less details. Bruce From owner-freebsd-net@freebsd.org Sat Apr 16 05:39:03 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9FF7B1062F for ; Sat, 16 Apr 2016 05:39:03 +0000 (UTC) (envelope-from bazzoola@gmail.com) Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 523A91347 for ; Sat, 16 Apr 2016 05:39:03 +0000 (UTC) (envelope-from bazzoola@gmail.com) Received: by mail-wm0-x233.google.com with SMTP id v188so54974747wme.1 for ; Fri, 15 Apr 2016 22:39:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=acO3LcVxEyJjqb/IqSiq2mHF8/k5i9WAxQRAEFwgH1k=; b=ASDN4fOx6CgeVrwAeLZbX96atIbtLBptKgqfMw6lb2nMrmPOGbXI1rQV2AXc1p1KNC cKHPr3O5qKd5EBxqVdUrYk2iY58mdas2ImOn0Ranh98eRW/N0cVf5xe5acAJ+QnyTTvM fA9tsbjAElJvGVpq48t8Rfz8yXgXsHydvPYGz7eao5eWbAuvrN4mSjv9elumpPvRQ+Jg pm5aKxSC1Dva2Sy4P2smVxfSUt3yyWEoFxzSau5O8QOCbSkjA23a7E16xyuU976sK6kp P5szHkHo3AtPdaapR0zqJxzXrxAke1zTUHv8ARigj9wTc6+1YGQhlBjpMFPF7fMJLDJp HUnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=acO3LcVxEyJjqb/IqSiq2mHF8/k5i9WAxQRAEFwgH1k=; b=nKaUNJfSWpyznqDuY8x1oWWi5guAnK2RXN1ysSBfSxf7m+fiIyPvmr4i/KmaFBGgZS MtxIqTsnJSS9csaHEWTHDYP8yaNe8MOaNOjZXJjvVd8pH1m4yVvlNJab8CmRWxWfxpxI GJredK2UHaBYUzz9f3ypArf4xdIuqPSzR+IEXfFZ9bqnZGhm8lpn8D2lc1zznnJtvzJY gTxC9LT9xzXHbV+LHbwfvj8feD3+XLfLfRIIRqPKMYoqadIqEqRbQxy0BI8lYB2+ouwq /0PUvavNr8Fn+HKoFD/GN9fw27MF2iRqT211V/QwNoSx8E5AwuXG/nG+C5QbNeXbAT3C AUpg== X-Gm-Message-State: AOPr4FUSrpdQ9La0ScbNVRmJEHWsbiT9R4cz6BPw7SXSMFgc0s79jj8+le+a2KMs6l4zgw== X-Received: by 10.28.153.65 with SMTP id b62mr8286484wme.36.1460785141070; Fri, 15 Apr 2016 22:39:01 -0700 (PDT) Received: from ?IPv6:2601:644:8280:59de:6a17:29ff:fe85:4927? ([2601:644:8280:59de:6a17:29ff:fe85:4927]) by smtp.googlemail.com with ESMTPSA id h124sm1602732wmf.7.2016.04.15.22.38.59 for (version=TLSv1/SSLv3 cipher=OTHER); Fri, 15 Apr 2016 22:39:00 -0700 (PDT) To: freebsd-net@freebsd.org From: bazzoola Subject: Tracing dropped UDP packets Message-ID: <5711CFF1.60708@gmail.com> Date: Fri, 15 Apr 2016 22:38:57 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2016 05:39:03 -0000 Greetings, I would like to know where (in the kernel) UDP packets are dropped. I looked at udp_usrreq.c but is overwhelming for the 1st time. Is it possible to use DTrace to locate where the packets are being dropped? or is there a tool similar to 'dropwatch' which can tell me where in the kernel my packets are getting dropped? On Linux, I used dropwatch and they were dropped packets were at udp_queue_rcv_skb(). Thanks! From owner-freebsd-net@freebsd.org Sat Apr 16 07:09:29 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68BFFB104AB for ; Sat, 16 Apr 2016 07:09:29 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:607c::16:b]) by mx1.freebsd.org (Postfix) with ESMTP id 1B9E81EBB for ; Sat, 16 Apr 2016 07:09:29 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id 80424CCFB; Sat, 16 Apr 2016 07:09:28 +0000 (UTC) Date: Sat, 16 Apr 2016 07:09:28 +0000 To: freebsd-net@freebsd.org From: "hiren (hiren panchasara)" Reply-to: D5872+325+9dea0574509cdbb3@reviews.freebsd.org Subject: [Differential] [Commented On] D5872: tcp: Don't prematurely drop receiving-only connections Message-ID: X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: Thread-Topic: D5872: tcp: Don't prematurely drop receiving-only connections X-Herald-Rules: <64> X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: Precedence: bulk In-Reply-To: References: Thread-Index: MmVmNzYzNzljOGQxMmM4MWI4MmNjYzcxMzczIFcR5Sg= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2016 07:09:29 -0000 hiren added a comment. In https://reviews.freebsd.org/D5872#127345, @jtl wrote: > In https://reviews.freebsd.org/D5872#127343, @mike-karels.net wrote: > > > If we get an ENOBUFS when sending data, we will already be running the retransmit timer. > > > Good point, but see below. > > > If we drop an ACK on ENOBUFS, either we will receive more data and > > attempt another ACK, or the sender will time out and resend data. Either > > will get the connection started again. > > True, but it may take time if we have to wait for a retransmission time out. That isn't necessarily a bad thing. But setting retransmission timer on an ACK seems... wrong. >> I believe lines 1552-1554 should >> simply be deleted. > > On the surface, that seems like a reasonable alternative. However, its interesting to see why this code was originally added. It looks like it was added by jlemon in r61179. Here's what the commit message says: > >> When attempting to transmit a packet, if the system fails to allocate >> a mbuf, it may return without setting any timers. If no more data is >> scheduled to be transmitted (this was a FIN) the system will sit in >> LAST_ACK state forever. >> >> Thus, when mbuf allocation fails, set the retransmit timer if neither >> the retransmit or persist timer is already pending. > > Even back then, the retransmit and/or persist timers should have been running by this point in the code. It would be interesting to know if jlemon proved this code fixed the problem, or it was just speculated. We fixed a similar-sounding problem last year, and the code is different now, so these particular lines may truly no longer be necessary. But, I am a little hesitant to remove this code without knowing more about its origin. > > Just my 2c. I guess this boils down to how you want to "deal" with this (possibly) transient memory error. I'd like to go with @mike-karels.net's suggestion as when we reach to this point in code, I don't see how timers couldn't have been set already. And I doubt we can get any more info from that old commit :/ But because this is (sigh..) tcp and if we want to be really cautious, I like @jtl 's patch of handling this for 'acks' with delack. (In that patch, I am not sure why we want to drop cwnd down to 1mss only in case of data and not for acks. I think we should do that for both?) (fwiw, other BSDs don't have this special handling as Mark suggested.) REVISION DETAIL https://reviews.freebsd.org/D5872 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, network, glebius, lstewart, adrian, delphij, decui_microsoft.com, honzhan_microsoft.com, howard0su_gmail.com, freebsd-net-list, transport, jtl, hiren Cc: mike-karels.net, jtl From owner-freebsd-net@freebsd.org Sat Apr 16 15:18:33 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B504EB10039 for ; Sat, 16 Apr 2016 15:18:33 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:607c::16:b]) by mx1.freebsd.org (Postfix) with ESMTP id 8EAAB1724 for ; Sat, 16 Apr 2016 15:18:33 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id C4B48CEF7; Sat, 16 Apr 2016 15:18:32 +0000 (UTC) Date: Sat, 16 Apr 2016 15:18:32 +0000 To: freebsd-net@freebsd.org From: "mike-karels.net (Mike Karels)" Reply-to: D5872+325+9dea0574509cdbb3@reviews.freebsd.org Subject: [Differential] [Commented On] D5872: tcp: Don't prematurely drop receiving-only connections Message-ID: <8fa2f66acbbe112a91d1c46f63be3cbf@localhost.localdomain> X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: Thread-Topic: D5872: tcp: Don't prematurely drop receiving-only connections X-Herald-Rules: <64> X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: Precedence: bulk In-Reply-To: References: Thread-Index: MmVmNzYzNzljOGQxMmM4MWI4MmNjYzcxMzczIFcSV8g= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2016 15:18:33 -0000 mike-karels.net added a comment. Setting a retransmission timer on an ACK makes no sense; I don't think tcp_output will send an ACK on a retransmission timeout. Setting timers in the ENOBUFS case is at best a partial fix. If the ACK is lost locally, we know; if it is lost elsewhere, we don't. We need timers in any case. Setting a local timer for the ACK case is no better for latency than having the other end run a retransmit timer.. If there is a problem with setting the retransmit timer for a FIN, let's fix that. Otherwise, I stand by my recommendation of deleting the code to set a timer. REVISION DETAIL https://reviews.freebsd.org/D5872 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, network, glebius, lstewart, adrian, delphij, decui_microsoft.com, honzhan_microsoft.com, howard0su_gmail.com, freebsd-net-list, transport, jtl, hiren Cc: mike-karels.net, jtl