From simon@comsys.ntu-kpi.kiev.ua  Wed Feb  6 12:28:38 2013
Return-Path: <simon@comsys.ntu-kpi.kiev.ua>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id CAFE2704
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  6 Feb 2013 12:28:38 +0000 (UTC)
	(envelope-from simon@comsys.ntu-kpi.kiev.ua)
Received: from comsys.kpi.ua (comsys.kpi.ua [77.47.192.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 68A736D4
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  6 Feb 2013 12:28:37 +0000 (UTC)
Received: from pm513-1.comsys.kpi.ua ([10.18.52.101] helo=pm513-1.comsys.ntu-kpi.kiev.ua)
	by comsys.kpi.ua with esmtpsa (TLSv1:AES256-SHA:256)
	(Exim 4.63)
	(envelope-from <simon@comsys.ntu-kpi.kiev.ua>)
	id 1U3479-0001iG-Mb
	for FreeBSD-gnats-submit@freebsd.org; Wed, 06 Feb 2013 14:28:35 +0200
Received: by pm513-1.comsys.ntu-kpi.kiev.ua (Postfix, from userid 1001)
	id D69E71CC1E; Wed,  6 Feb 2013 14:28:35 +0200 (EET)
Message-Id: <20130206122835.GA74795@pm513-1.comsys.ntu-kpi.kiev.ua>
Date: Wed, 6 Feb 2013 14:28:35 +0200
From: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Add support for SCM_BINTIME for PF_LOCAL sockets

>Number:         175883
>Category:       kern
>Synopsis:       [uipc] [patch] Add support for SCM_BINTIME for PF_LOCAL sockets
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pluknet
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 06 12:30:00 UTC 2013
>Closed-Date:    Mon Apr 29 21:15:21 UTC 2013
>Last-Modified:  Mon Apr 29 21:20:03 UTC 2013
>Originator:     Andrey Simonenko
>Release:        FreeBSD 10-CURRENT
>Organization:
>Environment:
>Description:

The following change adds support of SCM_BINTIME ancillary data object for
PF_LOCAL sockets.  The style of the following change follows the style of
SCM_TIMESTAMP support.

>How-To-Repeat:
>Fix:
--- uipc_usrreq.c.orig	2012-12-10 13:20:29.000000000 +0200
+++ uipc_usrreq.c	2013-02-06 13:53:03.000000000 +0200
@@ -1802,6 +1802,7 @@ unp_internalize(struct mbuf **controlp, 
 	struct cmsgcred *cmcred;
 	struct file **rp;
 	struct file *fp;
+	struct bintime *bt;
 	struct timeval *tv;
 	int i, fd, *fdp;
 	void *data;
@@ -1906,6 +1907,18 @@ unp_internalize(struct mbuf **controlp, 
 			microtime(tv);
 			break;
 
+		case SCM_BINTIME:
+			*controlp = sbcreatecontrol(NULL, sizeof(*bt),
+			    SCM_BINTIME, SOL_SOCKET);
+			if (*controlp == NULL) {
+				error = ENOBUFS;
+				goto out;
+			}
+			bt = (struct bintime *)
+			    CMSG_DATA(mtod(*controlp, struct cmsghdr *));
+			bintime(bt);
+			break;
+
 		default:
 			error = EINVAL;
 			goto out;

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->glebius 
Responsible-Changed-By: glebius 
Responsible-Changed-When: Thu Feb 7 09:10:37 UTC 2013 
Responsible-Changed-Why:  
I'll look at this one once I have time. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=175883 
Responsible-Changed-From-To: glebius->pluknet 
Responsible-Changed-By: pluknet 
Responsible-Changed-When: Fri Feb 15 10:29:47 UTC 2013 
Responsible-Changed-Why:  
Steal this PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=175883 
State-Changed-From-To: open->patched 
State-Changed-By: pluknet 
State-Changed-When: Fri Feb 15 13:02:56 UTC 2013 
State-Changed-Why:  
Committed to HEAD with MFC in 2 weeks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=175883 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/175883: commit references a PR
Date: Fri, 15 Feb 2013 13:00:33 +0000 (UTC)

 Author: pluknet
 Date: Fri Feb 15 13:00:20 2013
 New Revision: 246826
 URL: http://svnweb.freebsd.org/changeset/base/246826
 
 Log:
   Add support of passing SCM_BINTIME ancillary data object for PF_LOCAL
   sockets.
   
   PR:		kern/175883
   Submitted by:	Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
   Discussed with:	glebius, phk
   MFC after:	2 weeks
 
 Modified:
   head/sys/kern/uipc_usrreq.c
 
 Modified: head/sys/kern/uipc_usrreq.c
 ==============================================================================
 --- head/sys/kern/uipc_usrreq.c	Fri Feb 15 12:35:16 2013	(r246825)
 +++ head/sys/kern/uipc_usrreq.c	Fri Feb 15 13:00:20 2013	(r246826)
 @@ -1798,6 +1798,7 @@ unp_internalize(struct mbuf **controlp, 
  	struct mbuf *control = *controlp;
  	struct proc *p = td->td_proc;
  	struct filedesc *fdescp = p->p_fd;
 +	struct bintime *bt;
  	struct cmsghdr *cm = mtod(control, struct cmsghdr *);
  	struct cmsgcred *cmcred;
  	struct file **rp;
 @@ -1906,6 +1907,18 @@ unp_internalize(struct mbuf **controlp, 
  			microtime(tv);
  			break;
  
 +		case SCM_BINTIME:
 +			*controlp = sbcreatecontrol(NULL, sizeof(*bt),
 +			    SCM_BINTIME, SOL_SOCKET);
 +			if (*controlp == NULL) {
 +				error = ENOBUFS;
 +				goto out;
 +			}
 +			bt = (struct bintime *)
 +			    CMSG_DATA(mtod(*controlp, struct cmsghdr *));
 +			bintime(bt);
 +			break;
 +
  		default:
  			error = EINVAL;
  			goto out;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: pluknet 
State-Changed-When: Mon Apr 29 21:14:47 UTC 2013 
State-Changed-Why:  
Merged to all supported branches. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=175883 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/175883: commit references a PR
Date: Mon, 29 Apr 2013 21:12:00 +0000 (UTC)

 Author: pluknet
 Date: Mon Apr 29 21:11:21 2013
 New Revision: 250072
 URL: http://svnweb.freebsd.org/changeset/base/250072
 
 Log:
   MFC r246826:
    Add support of passing SCM_BINTIME ancillary data object for PF_LOCAL
    sockets.
   
   PR:		kern/175883
   Submitted by:	Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
 
 Modified:
   stable/9/sys/kern/uipc_usrreq.c
 Directory Properties:
   stable/9/sys/   (props changed)
 
 Modified: stable/9/sys/kern/uipc_usrreq.c
 ==============================================================================
 --- stable/9/sys/kern/uipc_usrreq.c	Mon Apr 29 21:11:05 2013	(r250071)
 +++ stable/9/sys/kern/uipc_usrreq.c	Mon Apr 29 21:11:21 2013	(r250072)
 @@ -1815,6 +1815,7 @@ unp_internalize(struct mbuf **controlp, 
  	struct mbuf *control = *controlp;
  	struct proc *p = td->td_proc;
  	struct filedesc *fdescp = p->p_fd;
 +	struct bintime *bt;
  	struct cmsghdr *cm = mtod(control, struct cmsghdr *);
  	struct cmsgcred *cmcred;
  	struct file **rp;
 @@ -1923,6 +1924,18 @@ unp_internalize(struct mbuf **controlp, 
  			microtime(tv);
  			break;
  
 +		case SCM_BINTIME:
 +			*controlp = sbcreatecontrol(NULL, sizeof(*bt),
 +			    SCM_BINTIME, SOL_SOCKET);
 +			if (*controlp == NULL) {
 +				error = ENOBUFS;
 +				goto out;
 +			}
 +			bt = (struct bintime *)
 +			    CMSG_DATA(mtod(*controlp, struct cmsghdr *));
 +			bintime(bt);
 +			break;
 +
  		default:
  			error = EINVAL;
  			goto out;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/175883: commit references a PR
Date: Mon, 29 Apr 2013 21:12:26 +0000 (UTC)

 Author: pluknet
 Date: Mon Apr 29 21:12:18 2013
 New Revision: 250074
 URL: http://svnweb.freebsd.org/changeset/base/250074
 
 Log:
   MFC r246826:
    Add support of passing SCM_BINTIME ancillary data object for PF_LOCAL
    sockets.
   
   PR:		kern/175883
   Submitted by:	Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
 
 Modified:
   stable/8/sys/kern/uipc_usrreq.c
 Directory Properties:
   stable/8/sys/   (props changed)
   stable/8/sys/kern/   (props changed)
 
 Modified: stable/8/sys/kern/uipc_usrreq.c
 ==============================================================================
 --- stable/8/sys/kern/uipc_usrreq.c	Mon Apr 29 21:11:31 2013	(r250073)
 +++ stable/8/sys/kern/uipc_usrreq.c	Mon Apr 29 21:12:18 2013	(r250074)
 @@ -1706,6 +1706,7 @@ unp_internalize(struct mbuf **controlp, 
  	struct mbuf *control = *controlp;
  	struct proc *p = td->td_proc;
  	struct filedesc *fdescp = p->p_fd;
 +	struct bintime *bt;
  	struct cmsghdr *cm = mtod(control, struct cmsghdr *);
  	struct cmsgcred *cmcred;
  	struct file **rp;
 @@ -1814,6 +1815,18 @@ unp_internalize(struct mbuf **controlp, 
  			microtime(tv);
  			break;
  
 +		case SCM_BINTIME:
 +			*controlp = sbcreatecontrol(NULL, sizeof(*bt),
 +			    SCM_BINTIME, SOL_SOCKET);
 +			if (*controlp == NULL) {
 +				error = ENOBUFS;
 +				goto out;
 +			}
 +			bt = (struct bintime *)
 +			    CMSG_DATA(mtod(*controlp, struct cmsghdr *));
 +			bintime(bt);
 +			break;
 +
  		default:
  			error = EINVAL;
  			goto out;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
