Re: svn commit: r306148 - head/sys/dev/oce

2016-09-21 Thread Josh Paetzel
I clearly did not commit what I tested. Jenkins is sending breakages that have 
missing headers in oce.

It will be a few hours before I can look at this. Feel free to revert my commit.

Thanks,

Josh Paetzel

> On Sep 21, 2016, at 5:53 PM, Josh Paetzel  wrote:
> 
> Author: jpaetzel
> Date: Wed Sep 21 22:53:16 2016
> New Revision: 306148
> URL: https://svnweb.freebsd.org/changeset/base/306148
> 
> Log:
>  Update oce driver to 11.0.50.0
> 
>  Submitted by:Venkat Duvvuru 
> 
> Modified:
>  head/sys/dev/oce/oce_hw.c
>  head/sys/dev/oce/oce_hw.h
>  head/sys/dev/oce/oce_if.c
>  head/sys/dev/oce/oce_if.h
>  head/sys/dev/oce/oce_mbox.c
>  head/sys/dev/oce/oce_queue.c
>  head/sys/dev/oce/oce_sysctl.c
> 
> Modified: head/sys/dev/oce/oce_hw.c
> ==
> --- head/sys/dev/oce/oce_hw.cWed Sep 21 22:09:17 2016(r306147)
> +++ head/sys/dev/oce/oce_hw.cWed Sep 21 22:53:16 2016(r306148)
> @@ -393,6 +393,11 @@ oce_create_nw_interface(POCE_SOFTC sc)
>if (IS_SH(sc) || IS_XE201(sc))
>capab_flags |= MBX_RX_IFACE_FLAGS_MULTICAST;
> 
> +if (sc->enable_hwlro) {
> +capab_flags |= MBX_RX_IFACE_FLAGS_LRO;
> +capab_en_flags |= MBX_RX_IFACE_FLAGS_LRO;
> +}
> +
>/* enable capabilities controlled via driver startup parameters */
>if (is_rss_enabled(sc))
>capab_en_flags |= MBX_RX_IFACE_FLAGS_RSS;
> 
> Modified: head/sys/dev/oce/oce_hw.h
> ==
> --- head/sys/dev/oce/oce_hw.hWed Sep 21 22:09:17 2016(r306147)
> +++ head/sys/dev/oce/oce_hw.hWed Sep 21 22:53:16 2016(r306148)
> @@ -111,6 +111,9 @@
> #definePD_MPU_MBOX_DB0x0160
> #definePD_MQ_DB0x0140
> 
> +#define DB_OFFSET0xc0
> +#define DB_LRO_RQ_ID_MASK0x7FF
> +
> /* EQE completion types */
> #defineEQ_MINOR_CODE_COMPLETION0x00
> #defineEQ_MINOR_CODE_OTHER0x01
> @@ -180,6 +183,7 @@
> #define ASYNC_EVENT_GRP50x5
> #define ASYNC_EVENT_CODE_DEBUG0x6
> #define ASYNC_EVENT_PVID_STATE0x3
> +#define ASYNC_EVENT_OS2BMC0x5
> #define ASYNC_EVENT_DEBUG_QNQ0x1
> #define ASYNC_EVENT_CODE_SLIPORT0x11
> #define VLAN_VID_MASK0x0FFF
> @@ -722,6 +726,34 @@ struct oce_async_cqe_link_state {
>} u0;
> };
> 
> +/* OS2BMC async event */
> +struct oce_async_evt_grp5_os2bmc {
> +union {
> +struct {
> +uint32_t lrn_enable:1;
> +uint32_t lrn_disable:1;
> +uint32_t mgmt_enable:1;
> +uint32_t mgmt_disable:1;
> +uint32_t rsvd0:12;
> +uint32_t vlan_tag:16;
> +uint32_t arp_filter:1;
> +uint32_t dhcp_client_filt:1;
> +uint32_t dhcp_server_filt:1;
> +uint32_t net_bios_filt:1;
> +uint32_t rsvd1:3;
> +uint32_t bcast_filt:1;
> +uint32_t ipv6_nbr_filt:1;
> +uint32_t ipv6_ra_filt:1;
> +uint32_t ipv6_ras_filt:1;
> +uint32_t rsvd2[4];
> +uint32_t mcast_filt:1;
> +uint32_t rsvd3:16;
> +uint32_t evt_tag;
> +uint32_t dword3;
> +} s;
> +uint32_t dword[4];
> +} u;
> +};
> 
> /* PVID aync event */
> struct oce_async_event_grp5_pvid_state {
> @@ -1396,7 +1428,7 @@ typedef union oce_cq_ctx_u {
>uint32_t dw5rsvd3:1;
>uint32_t eventable:1;
>/* dw6 */
> -uint32_t eq_id:8;
> +uint32_t eq_id:16;
>uint32_t dw6rsvd1:15;
>uint32_t armed:1;
>/* dw7 */
> @@ -2403,8 +2435,8 @@ struct oce_nic_hdr_wqe {
>uint32_t tcpcs:1;
>uint32_t udpcs:1;
>uint32_t ipcs:1;
> -uint32_t rsvd3:1;
> -uint32_t rsvd2:1;
> +uint32_t mgmt:1;
> +uint32_t lso6:1;
>uint32_t forward:1;
>uint32_t crc:1;
>uint32_t event:1;
> @@ -2426,8 +2458,8 @@ struct oce_nic_hdr_wqe {
>uint32_t event:1;
>uint32_t crc:1;
>uint32_t forward:1;
> -uint32_t rsvd2:1;
> -uint32_t rsvd3:1;
> +uint32_t lso6:1;
> +uint32_t mgmt:1;
>uint32_t ipcs:1;
>uint32_t udpcs:1;
>uint32_t tcpcs:1;
> @@ -3010,6 +3042,53 @@ struct oce_rxf_stats_v0 {
>uint32_t rsvd1[6];
> };
> 
> +struct oce_port_rxf_stats_v2 {
> +uint32_t rsvd0[10];
> +uint32_t roce_bytes_received_lsd;
> +uint32_t roce_bytes_received_msd;
> +uint32_t rsvd1[5];
> +uint32_t roce_frames_received;
> +uint32_t rx_crc_errors;
> +uint32_t rx_alignment_symbol_errors;
> +uint32_t rx_pause_frames;
> +uint32_t rx_priority_pause_frames;
> +uint32_t rx_control_frames;
> +uint32_t rx_in_range_errors;
> +uint32_t rx_out_

svn commit: r306148 - head/sys/dev/oce

2016-09-21 Thread Josh Paetzel
Author: jpaetzel
Date: Wed Sep 21 22:53:16 2016
New Revision: 306148
URL: https://svnweb.freebsd.org/changeset/base/306148

Log:
  Update oce driver to 11.0.50.0
  
  Submitted by: Venkat Duvvuru 

Modified:
  head/sys/dev/oce/oce_hw.c
  head/sys/dev/oce/oce_hw.h
  head/sys/dev/oce/oce_if.c
  head/sys/dev/oce/oce_if.h
  head/sys/dev/oce/oce_mbox.c
  head/sys/dev/oce/oce_queue.c
  head/sys/dev/oce/oce_sysctl.c

Modified: head/sys/dev/oce/oce_hw.c
==
--- head/sys/dev/oce/oce_hw.c   Wed Sep 21 22:09:17 2016(r306147)
+++ head/sys/dev/oce/oce_hw.c   Wed Sep 21 22:53:16 2016(r306148)
@@ -393,6 +393,11 @@ oce_create_nw_interface(POCE_SOFTC sc)
if (IS_SH(sc) || IS_XE201(sc))
capab_flags |= MBX_RX_IFACE_FLAGS_MULTICAST;
 
+if (sc->enable_hwlro) {
+capab_flags |= MBX_RX_IFACE_FLAGS_LRO;
+capab_en_flags |= MBX_RX_IFACE_FLAGS_LRO;
+}
+
/* enable capabilities controlled via driver startup parameters */
if (is_rss_enabled(sc))
capab_en_flags |= MBX_RX_IFACE_FLAGS_RSS;

Modified: head/sys/dev/oce/oce_hw.h
==
--- head/sys/dev/oce/oce_hw.h   Wed Sep 21 22:09:17 2016(r306147)
+++ head/sys/dev/oce/oce_hw.h   Wed Sep 21 22:53:16 2016(r306148)
@@ -111,6 +111,9 @@
 #definePD_MPU_MBOX_DB  0x0160
 #definePD_MQ_DB0x0140
 
+#define DB_OFFSET  0xc0
+#define DB_LRO_RQ_ID_MASK  0x7FF
+
 /* EQE completion types */
 #defineEQ_MINOR_CODE_COMPLETION0x00
 #defineEQ_MINOR_CODE_OTHER 0x01
@@ -180,6 +183,7 @@
 #define ASYNC_EVENT_GRP5   0x5
 #define ASYNC_EVENT_CODE_DEBUG 0x6
 #define ASYNC_EVENT_PVID_STATE 0x3
+#define ASYNC_EVENT_OS2BMC 0x5
 #define ASYNC_EVENT_DEBUG_QNQ  0x1
 #define ASYNC_EVENT_CODE_SLIPORT   0x11
 #define VLAN_VID_MASK  0x0FFF
@@ -722,6 +726,34 @@ struct oce_async_cqe_link_state {
} u0;
 };
 
+/* OS2BMC async event */
+struct oce_async_evt_grp5_os2bmc {
+   union {
+   struct {
+   uint32_t lrn_enable:1;
+   uint32_t lrn_disable:1;
+   uint32_t mgmt_enable:1;
+   uint32_t mgmt_disable:1;
+   uint32_t rsvd0:12;
+   uint32_t vlan_tag:16;
+   uint32_t arp_filter:1;
+   uint32_t dhcp_client_filt:1;
+   uint32_t dhcp_server_filt:1;
+   uint32_t net_bios_filt:1;
+   uint32_t rsvd1:3;
+   uint32_t bcast_filt:1;
+   uint32_t ipv6_nbr_filt:1;
+   uint32_t ipv6_ra_filt:1;
+   uint32_t ipv6_ras_filt:1;
+   uint32_t rsvd2[4];
+   uint32_t mcast_filt:1;
+   uint32_t rsvd3:16;
+   uint32_t evt_tag;
+   uint32_t dword3;
+   } s;
+   uint32_t dword[4];
+   } u;
+};
 
 /* PVID aync event */
 struct oce_async_event_grp5_pvid_state {
@@ -1396,7 +1428,7 @@ typedef union oce_cq_ctx_u {
uint32_t dw5rsvd3:1;
uint32_t eventable:1;
/* dw6 */
-   uint32_t eq_id:8;
+   uint32_t eq_id:16;
uint32_t dw6rsvd1:15;
uint32_t armed:1;
/* dw7 */
@@ -2403,8 +2435,8 @@ struct oce_nic_hdr_wqe {
uint32_t tcpcs:1;
uint32_t udpcs:1;
uint32_t ipcs:1;
-   uint32_t rsvd3:1;
-   uint32_t rsvd2:1;
+   uint32_t mgmt:1;
+   uint32_t lso6:1;
uint32_t forward:1;
uint32_t crc:1;
uint32_t event:1;
@@ -2426,8 +2458,8 @@ struct oce_nic_hdr_wqe {
uint32_t event:1;
uint32_t crc:1;
uint32_t forward:1;
-   uint32_t rsvd2:1;
-   uint32_t rsvd3:1;
+   uint32_t lso6:1;
+   uint32_t mgmt:1;
uint32_t ipcs:1;
uint32_t udpcs:1;
uint32_t tcpcs:1;
@@ -3010,6 +3042,53 @@ struct oce_rxf_stats_v0 {
uint32_t rsvd1[6];
 };
 
+struct oce_port_rxf_stats_v2 {
+uint32_t rsvd0[10];
+uint32_t roce_bytes_received_lsd;
+uint32_t roce_bytes_received_msd;
+uint32_t rsvd1[5];
+uint32_t roce_frames_received;
+uint32_t rx_crc_errors;
+uint32_t rx_alignment_symbol_errors;