svn commit: r267903 - stable/9/sys/kern

2014-06-26 Thread Sergey Kandaurov
Author: pluknet
Date: Thu Jun 26 08:44:28 2014
New Revision: 267903
URL: http://svnweb.freebsd.org/changeset/base/267903

Log:
  MFC r261901:
  
  Preserve one character space for a trailing '\0'.

Modified:
  stable/9/sys/kern/subr_hints.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/kern/subr_hints.c
==
--- stable/9/sys/kern/subr_hints.c  Thu Jun 26 08:41:54 2014
(r267902)
+++ stable/9/sys/kern/subr_hints.c  Thu Jun 26 08:44:28 2014
(r267903)
@@ -129,7 +129,7 @@ res_find(int *line, int *startln,
if (strncmp(cp, "hint.", 5) != 0)
hit = 0;
else
-   n = sscanf(cp, "hint.%32[^.].%d.%32[^=]=%128s",
+   n = sscanf(cp, "hint.%32[^.].%d.%32[^=]=%127s",
r_name, &r_unit, r_resname, r_value);
if (hit && n != 4) {
printf("CONFIG: invalid hint '%s'\n", cp);
___
svn-src-stable-9@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "svn-src-stable-9-unsubscr...@freebsd.org"


svn commit: r267907 - in stable/9: bin/ps sys/kern

2014-06-26 Thread Sergey Kandaurov
Author: pluknet
Date: Thu Jun 26 10:09:37 2014
New Revision: 267907
URL: http://svnweb.freebsd.org/changeset/base/267907

Log:
  MFC r254943 (by will, partially):
  
  Add the ability to display the default FIB number for a process to the
  ps(1) utility, e.g. "ps -O fib".
  
  The rest was previously (mis-)merged with r260208.

Modified:
  stable/9/bin/ps/keyword.c
  stable/9/bin/ps/ps.1
  stable/9/sys/kern/kern_proc.c
Directory Properties:
  stable/9/bin/ps/   (props changed)
  stable/9/sys/   (props changed)

Modified: stable/9/bin/ps/keyword.c
==
--- stable/9/bin/ps/keyword.c   Thu Jun 26 09:42:00 2014(r267906)
+++ stable/9/bin/ps/keyword.c   Thu Jun 26 10:09:37 2014(r267907)
@@ -87,6 +87,7 @@ static VAR var[] = {
{"etimes", "ELAPSED", NULL, USER, elapseds, 0, CHAR, NULL, 0},
{"euid", "", "uid", 0, NULL, 0, CHAR, NULL, 0},
{"f", "F", NULL, 0, kvar, KOFF(ki_flag), INT, "x", 0},
+   {"fib", "FIB", NULL, 0, kvar, KOFF(ki_fibnum), INT, "d", 0},
{"flags", "", "f", 0, NULL, 0, CHAR, NULL, 0},
{"gid", "GID", NULL, 0, kvar, KOFF(ki_groups), UINT, UIDFMT, 0},
{"group", "GROUP", NULL, LJUST, egroupname, 0, CHAR, NULL, 0},

Modified: stable/9/bin/ps/ps.1
==
--- stable/9/bin/ps/ps.1Thu Jun 26 09:42:00 2014(r267906)
+++ stable/9/bin/ps/ps.1Thu Jun 26 10:09:37 2014(r267907)
@@ -523,6 +523,9 @@ elapsed running time, format
 minutes:seconds.
 .It Cm etimes
 elapsed running time, in decimal integer seconds
+.It Cm fib
+default FIB number, see
+.Xr setfib 1
 .It Cm flags
 the process flags, in hexadecimal (alias
 .Cm f )

Modified: stable/9/sys/kern/kern_proc.c
==
--- stable/9/sys/kern/kern_proc.c   Thu Jun 26 09:42:00 2014
(r267906)
+++ stable/9/sys/kern/kern_proc.c   Thu Jun 26 10:09:37 2014
(r267907)
@@ -864,6 +864,7 @@ fill_kinfo_proc_only(struct proc *p, str
kp->ki_swtime = (ticks - p->p_swtick) / hz;
kp->ki_pid = p->p_pid;
kp->ki_nice = p->p_nice;
+   kp->ki_fibnum = p->p_fibnum;
kp->ki_start = p->p_stats->p_start;
timevaladd(&kp->ki_start, &boottime);
PROC_SLOCK(p);
___
svn-src-stable-9@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "svn-src-stable-9-unsubscr...@freebsd.org"


svn commit: r267908 - stable/9/bin/ps

2014-06-26 Thread Sergey Kandaurov
Author: pluknet
Date: Thu Jun 26 10:13:11 2014
New Revision: 267908
URL: http://svnweb.freebsd.org/changeset/base/267908

Log:
  MFC r267196:
  
  Add support for inspecting process flags set in p_flag2.

Modified:
  stable/9/bin/ps/keyword.c
  stable/9/bin/ps/ps.1
Directory Properties:
  stable/9/bin/ps/   (props changed)

Modified: stable/9/bin/ps/keyword.c
==
--- stable/9/bin/ps/keyword.c   Thu Jun 26 10:09:37 2014(r267907)
+++ stable/9/bin/ps/keyword.c   Thu Jun 26 10:13:11 2014(r267908)
@@ -87,8 +87,10 @@ static VAR var[] = {
{"etimes", "ELAPSED", NULL, USER, elapseds, 0, CHAR, NULL, 0},
{"euid", "", "uid", 0, NULL, 0, CHAR, NULL, 0},
{"f", "F", NULL, 0, kvar, KOFF(ki_flag), INT, "x", 0},
+   {"f2", "F2", NULL, 0, kvar, KOFF(ki_flag2), INT, "08x", 0},
{"fib", "FIB", NULL, 0, kvar, KOFF(ki_fibnum), INT, "d", 0},
{"flags", "", "f", 0, NULL, 0, CHAR, NULL, 0},
+   {"flags2", "", "f2", 0, NULL, 0, CHAR, NULL, 0},
{"gid", "GID", NULL, 0, kvar, KOFF(ki_groups), UINT, UIDFMT, 0},
{"group", "GROUP", NULL, LJUST, egroupname, 0, CHAR, NULL, 0},
{"ignored", "", "sigignore", 0, NULL, 0, CHAR, NULL, 0},

Modified: stable/9/bin/ps/ps.1
==
--- stable/9/bin/ps/ps.1Thu Jun 26 10:09:37 2014(r267907)
+++ stable/9/bin/ps/ps.1Thu Jun 26 10:13:11 2014(r267908)
@@ -29,7 +29,7 @@
 .\" @(#)ps.1   8.3 (Berkeley) 4/18/94
 .\" $FreeBSD$
 .\"
-.Dd May 2, 2014
+.Dd June 6, 2014
 .Dt PS 1
 .Os
 .Sh NAME
@@ -340,6 +340,15 @@ the include file
 .It Dv "P_SWAPPINGIN" Ta No "0x4000Process is being swapped in"
 .It Dv "P_PPTRACE" Ta No "0x8000" Ta "Vforked child issued 
ptrace(PT_TRACEME)"
 .El
+.It Cm flags2
+The flags kept in
+.Va p_flag2
+associated with the process as in
+the include file
+.In sys/proc.h :
+.Bl -column P2_INHERIT_PROTECTED 0x0001
+.It Dv "P2_INHERIT_PROTECTED" Ta No "0x0001" Ta "New children get 
P_PROTECTED"
+.El
 .It Cm label
 The MAC label of the process.
 .It Cm lim
@@ -529,6 +538,9 @@ default FIB number, see
 .It Cm flags
 the process flags, in hexadecimal (alias
 .Cm f )
+.It Cm flags2
+the additional set of process flags, in hexadecimal (alias
+.Cm f2 )
 .It Cm gid
 effective group ID (alias
 .Cm egid )
___
svn-src-stable-9@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "svn-src-stable-9-unsubscr...@freebsd.org"


svn commit: r267944 - stable/9/sys/dev/oce

2014-06-26 Thread Xin LI
Author: delphij
Date: Fri Jun 27 00:37:03 2014
New Revision: 267944
URL: http://svnweb.freebsd.org/changeset/base/267944

Log:
  MFC r258941,267839:
  
  Apply vendor improvements to oce(4) driver:
  
   - Add support to 20Gbps, 25Gbps, 40Gbps devices;
   - Add support to control adaptive interrupt coalescing (AIC)
 via sysctl;
   - Improve support of BE3 devices;
   - Big endian support fixes;
  
  Many thanks to Emulex for their continued support of FreeBSD.
  
  Submitted by: Venkata Duvvuru 

Modified:
  stable/9/sys/dev/oce/oce_hw.c
  stable/9/sys/dev/oce/oce_hw.h
  stable/9/sys/dev/oce/oce_if.c
  stable/9/sys/dev/oce/oce_if.h
  stable/9/sys/dev/oce/oce_mbox.c
  stable/9/sys/dev/oce/oce_sysctl.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/oce/oce_hw.c
==
--- stable/9/sys/dev/oce/oce_hw.c   Fri Jun 27 00:11:01 2014
(r267943)
+++ stable/9/sys/dev/oce/oce_hw.c   Fri Jun 27 00:37:03 2014
(r267944)
@@ -487,11 +487,7 @@ oce_hw_start(POCE_SOFTC sc)
if_link_state_change(sc->ifp, LINK_STATE_DOWN);
}
 
-   if (link.mac_speed > 0 && link.mac_speed < 5)
-   sc->link_speed = link.mac_speed;
-   else
-   sc->link_speed = 0;
-
+   sc->link_speed = link.phys_port_speed;
sc->qos_link_speed = (uint32_t )link.qos_link_speed * 10;
 
rc = oce_start_mq(sc->mq);

Modified: stable/9/sys/dev/oce/oce_hw.h
==
--- stable/9/sys/dev/oce/oce_hw.h   Fri Jun 27 00:11:01 2014
(r267943)
+++ stable/9/sys/dev/oce/oce_hw.h   Fri Jun 27 00:37:03 2014
(r267944)
@@ -1023,7 +1023,7 @@ struct mbx_hdr {
 #defineOCE_MBX_ADDL_STATUS(_MHDR) ((_MHDR)->u0.rsp.additional_status)
 #defineOCE_MBX_STATUS(_MHDR) ((_MHDR)->u0.rsp.status)
 
-/* [05] OPCODE_COMMON_QUERY_LINK_CONFIG */
+/* [05] OPCODE_COMMON_QUERY_LINK_CONFIG_V1 */
 struct mbx_query_common_link_config {
struct mbx_hdr hdr;
union {
@@ -1032,16 +1032,37 @@ struct mbx_query_common_link_config {
} req;
 
struct {
-   /* dw 0 */
-   uint8_t physical_port;
-   uint8_t mac_duplex;
-   uint8_t mac_speed;
-   uint8_t mac_fault;
-   /* dw 1 */
-   uint8_t mgmt_mac_duplex;
-   uint8_t mgmt_mac_speed;
+   #ifdef _BIG_ENDIAN
+   uint32_t physical_port_fault:8;
+   uint32_t physical_port_speed:8;
+   uint32_t link_duplex:8;
+   uint32_t pt:2;
+   uint32_t port_number:6;
+
uint16_t qos_link_speed;
-   uint32_t logical_link_status;
+   uint16_t rsvd0;
+
+   uint32_t rsvd1:21;
+   uint32_t phys_fcv:1;
+   uint32_t phys_rxf:1;
+   uint32_t phys_txf:1;
+   uint32_t logical_link_status:8;
+   #else
+   uint32_t port_number:6;
+   uint32_t pt:2;
+   uint32_t link_duplex:8;
+   uint32_t physical_port_speed:8;
+   uint32_t physical_port_fault:8;
+
+   uint16_t rsvd0;
+   uint16_t qos_link_speed;
+
+   uint32_t logical_link_status:8;
+   uint32_t phys_txf:1;
+   uint32_t phys_rxf:1;
+   uint32_t phys_fcv:1;
+   uint32_t rsvd1:21;
+   #endif
} rsp;
} params;
 };

Modified: stable/9/sys/dev/oce/oce_if.c
==
--- stable/9/sys/dev/oce/oce_if.c   Fri Jun 27 00:11:01 2014
(r267943)
+++ stable/9/sys/dev/oce/oce_if.c   Fri Jun 27 00:37:03 2014
(r267944)
@@ -828,6 +828,21 @@ oce_media_status(struct ifnet *ifp, stru
req->ifm_active |= IFM_10G_SR | IFM_FDX;
sc->speed = 1;
break;
+   case 5: /* 20 Gbps */
+   req->ifm_active |= IFM_10G_SR | IFM_FDX;
+   sc->speed = 2;
+   break;
+   case 6: /* 25 Gbps */
+   req->ifm_active |= IFM_10G_SR | IFM_FDX;
+   sc->speed = 25000;
+   break;
+   case 7: /* 40 Gbps */
+   req->ifm_active |= IFM_40G_SR4 | IFM_FDX;
+   sc->speed = 4;
+   break;
+   default:
+   sc->speed = 0;
+   break;
}

return;
@@ -1940,7 +1955,6 @@ done:
/* Is the