svn commit: r321511 - head/sys/dev/iwm

2017-07-25 Thread Adrian Chadd
Author: adrian
Date: Wed Jul 26 05:52:37 2017
New Revision: 321511
URL: https://svnweb.freebsd.org/changeset/base/321511

Log:
  [iwm] Sync rs (rate-selection) API definitions from Linux iwlwifi.
  
  * While there clean up alignments and line wrapping in existing
definitions for rs API in if_iwmreg.h
  
  Obtained from:dragonflybsd.git 
085e37a042bdb17081e495e46919359ce43aa118

Modified:
  head/sys/dev/iwm/if_iwmreg.h

Modified: head/sys/dev/iwm/if_iwmreg.h
==
--- head/sys/dev/iwm/if_iwmreg.hWed Jul 26 05:51:31 2017
(r321510)
+++ head/sys/dev/iwm/if_iwmreg.hWed Jul 26 05:52:37 2017
(r321511)
@@ -3981,12 +3981,12 @@ enum {
  * Bit 11-12: (0) 20MHz, (1) 40MHz, (2) 80MHz, (3) 160MHz
  * 0 and 1 are valid for HT and VHT, 2 and 3 only for VHT
  */
-#define IWM_RATE_MCS_CHAN_WIDTH_POS11
-#define IWM_RATE_MCS_CHAN_WIDTH_MSK(3 << 
IWM_RATE_MCS_CHAN_WIDTH_POS)
-#define IWM_RATE_MCS_CHAN_WIDTH_20 (0 << 
IWM_RATE_MCS_CHAN_WIDTH_POS)
-#define IWM_RATE_MCS_CHAN_WIDTH_40 (1 << 
IWM_RATE_MCS_CHAN_WIDTH_POS)
-#define IWM_RATE_MCS_CHAN_WIDTH_80 (2 << 
IWM_RATE_MCS_CHAN_WIDTH_POS)
-#define IWM_RATE_MCS_CHAN_WIDTH_160(3 << 
IWM_RATE_MCS_CHAN_WIDTH_POS)
+#define IWM_RATE_MCS_CHAN_WIDTH_POS11
+#define IWM_RATE_MCS_CHAN_WIDTH_MSK(3 << IWM_RATE_MCS_CHAN_WIDTH_POS)
+#define IWM_RATE_MCS_CHAN_WIDTH_20 (0 << IWM_RATE_MCS_CHAN_WIDTH_POS)
+#define IWM_RATE_MCS_CHAN_WIDTH_40 (1 << IWM_RATE_MCS_CHAN_WIDTH_POS)
+#define IWM_RATE_MCS_CHAN_WIDTH_80 (2 << IWM_RATE_MCS_CHAN_WIDTH_POS)
+#define IWM_RATE_MCS_CHAN_WIDTH_160(3 << IWM_RATE_MCS_CHAN_WIDTH_POS)
 
 /* Bit 13: (1) Short guard interval (0.4 usec), (0) normal GI (0.8 usec) */
 #define IWM_RATE_MCS_SGI_POS   13
@@ -3999,7 +3999,7 @@ enum {
 #define IWM_RATE_MCS_ANT_C_MSK (4 << IWM_RATE_MCS_ANT_POS)
 #define IWM_RATE_MCS_ANT_AB_MSK(IWM_RATE_MCS_ANT_A_MSK | \
 IWM_RATE_MCS_ANT_B_MSK)
-#define IWM_RATE_MCS_ANT_ABC_MSK   (IWM_RATE_MCS_ANT_AB_MSK | \
+#define IWM_RATE_MCS_ANT_ABC_MSK   (IWM_RATE_MCS_ANT_AB_MSK | \
 IWM_RATE_MCS_ANT_C_MSK)
 #define IWM_RATE_MCS_ANT_MSK   IWM_RATE_MCS_ANT_ABC_MSK
 #define IWM_RATE_MCS_ANT_NUM 3
@@ -4009,8 +4009,8 @@ enum {
 #define IWM_RATE_MCS_STBC_MSK  (1 << IWM_RATE_MCS_STBC_POS)
 
 /* Bit 19: (0) Beamforming is off, (1) Beamforming is on */
-#define IWM_RATE_MCS_BF_POS19
-#define IWM_RATE_MCS_BF_MSK(1 << IWM_RATE_MCS_BF_POS)
+#define IWM_RATE_MCS_BF_POS19
+#define IWM_RATE_MCS_BF_MSK(1 << IWM_RATE_MCS_BF_POS)
 
 /* Bit 20: (0) ZLF is off, (1) ZLF is on */
 #define IWM_RATE_MCS_ZLF_POS   20
@@ -4033,29 +4033,65 @@ enum {
 /* Link quality command flags bit fields */
 
 /* Bit 0: (0) Don't use RTS (1) Use RTS */
-#define IWM_LQ_FLAG_USE_RTS_POS 0
-#define IWM_LQ_FLAG_USE_RTS_MSK(1 << IWM_LQ_FLAG_USE_RTS_POS)
+#define IWM_LQ_FLAG_USE_RTS_POS 0
+#define IWM_LQ_FLAG_USE_RTS_MSK (1 << IWM_LQ_FLAG_USE_RTS_POS)
 
 /* Bit 1-3: LQ command color. Used to match responses to LQ commands */
-#define IWM_LQ_FLAG_COLOR_POS   1
-#define IWM_LQ_FLAG_COLOR_MSK   (7 << IWM_LQ_FLAG_COLOR_POS)
+#define IWM_LQ_FLAG_COLOR_POS   1
+#define IWM_LQ_FLAG_COLOR_MSK   (7 << IWM_LQ_FLAG_COLOR_POS)
 
 /* Bit 4-5: Tx RTS BW Signalling
  * (0) No RTS BW signalling
  * (1) Static BW signalling
  * (2) Dynamic BW signalling
  */
-#define IWM_LQ_FLAG_RTS_BW_SIG_POS  4
-#define IWM_LQ_FLAG_RTS_BW_SIG_NONE (0 << IWM_LQ_FLAG_RTS_BW_SIG_POS)
-#define IWM_LQ_FLAG_RTS_BW_SIG_STATIC   (1 << IWM_LQ_FLAG_RTS_BW_SIG_POS)
-#define IWM_LQ_FLAG_RTS_BW_SIG_DYNAMIC  (2 << IWM_LQ_FLAG_RTS_BW_SIG_POS)
+#define IWM_LQ_FLAG_RTS_BW_SIG_POS  4
+#define IWM_LQ_FLAG_RTS_BW_SIG_NONE (0 << IWM_LQ_FLAG_RTS_BW_SIG_POS)
+#define IWM_LQ_FLAG_RTS_BW_SIG_STATIC   (1 << IWM_LQ_FLAG_RTS_BW_SIG_POS)
+#define IWM_LQ_FLAG_RTS_BW_SIG_DYNAMIC  (2 << IWM_LQ_FLAG_RTS_BW_SIG_POS)
 
 /* Bit 6: (0) No dynamic BW selection (1) Allow dynamic BW selection
  * Dyanmic BW selection allows Tx with narrower BW then requested in rates
  */
-#define IWM_LQ_FLAG_DYNAMIC_BW_POS  6
-#define IWM_LQ_FLAG_DYNAMIC_BW_MSK  (1 << IWM_LQ_FLAG_DYNAMIC_BW_POS)
+#define IWM_LQ_FLAG_DYNAMIC_BW_POS  6
+#define IWM_LQ_FLAG_DYNAMIC_BW_MSK  (1 << IWM_LQ_FLAG_DYNAMIC_BW_POS)
 
+/* Single Stream Tx Parameters (lq_cmd->ss_params)
+ * Flags to control a smart FW decision about whether BFER/STBC/SISO will be
+ * used for single stream Tx.
+ */
+
+/* Bit 0-1: Max STBC streams allowed. Can be 0-3.
+ * (0) - No STBC allowed
+ * (1) - 2x1 STBC allowed (HT/VHT)
+ * (2) - 4x2 STBC allowed (HT/VHT)
+ * (3) - 

svn commit: r321510 - head/sys/dev/iwm

2017-07-25 Thread Adrian Chadd
Author: adrian
Date: Wed Jul 26 05:51:31 2017
New Revision: 321510
URL: https://svnweb.freebsd.org/changeset/base/321510

Log:
  [iwm] Add iwm_mvm_send_lq_cmd() from Linux iwlwifi to if_iwm_util.c.
  
  Obtained from:dragonflybsd.git 
8a5dd7783e407856754093f5b1c9c757c64534b7

Modified:
  head/sys/dev/iwm/if_iwm.c
  head/sys/dev/iwm/if_iwm_util.c
  head/sys/dev/iwm/if_iwm_util.h

Modified: head/sys/dev/iwm/if_iwm.c
==
--- head/sys/dev/iwm/if_iwm.c   Wed Jul 26 05:40:52 2017(r321509)
+++ head/sys/dev/iwm/if_iwm.c   Wed Jul 26 05:51:31 2017(r321510)
@@ -4451,13 +4451,6 @@ iwm_newstate(struct ieee80211vap *vap, enum ieee80211_
break;
 
case IEEE80211_S_RUN:
-   {
-   struct iwm_host_cmd cmd = {
-   .id = IWM_LQ_CMD,
-   .len = { sizeof(in->in_lq), },
-   .flags = IWM_CMD_SYNC,
-   };
-
in = IWM_NODE(vap->iv_bss);
/* Update the association state, now we have it all */
/* (eg associd comes in at this point */
@@ -4482,15 +4475,13 @@ iwm_newstate(struct ieee80211vap *vap, enum ieee80211_
iwm_mvm_update_quotas(sc, ivp);
iwm_setrates(sc, in);
 
-   cmd.data[0] = >in_lq;
-   if ((error = iwm_send_cmd(sc, )) != 0) {
+   if ((error = iwm_mvm_send_lq_cmd(sc, >in_lq, TRUE)) != 0) {
device_printf(sc->sc_dev,
-   "%s: IWM_LQ_CMD failed\n", __func__);
+   "%s: IWM_LQ_CMD failed: %d\n", __func__, error);
}
 
iwm_mvm_led_enable(sc);
break;
-   }
 
default:
break;

Modified: head/sys/dev/iwm/if_iwm_util.c
==
--- head/sys/dev/iwm/if_iwm_util.c  Wed Jul 26 05:40:52 2017
(r321509)
+++ head/sys/dev/iwm/if_iwm_util.c  Wed Jul 26 05:51:31 2017
(r321510)
@@ -489,6 +489,32 @@ iwm_dma_contig_free(struct iwm_dma_info *dma)
}
 }
 
+/**
+ * iwm_mvm_send_lq_cmd() - Send link quality command
+ * @init: This command is sent as part of station initialization right
+ *after station has been added.
+ *
+ * The link quality command is sent as the last step of station creation.
+ * This is the special case in which init is set and we call a callback in
+ * this case to clear the state indicating that station creation is in
+ * progress.
+ */
+int
+iwm_mvm_send_lq_cmd(struct iwm_softc *sc, struct iwm_lq_cmd *lq, boolean_t 
init)
+{
+   struct iwm_host_cmd cmd = {
+   .id = IWM_LQ_CMD,
+   .len = { sizeof(struct iwm_lq_cmd), },
+   .flags = init ? 0 : IWM_CMD_ASYNC,
+   .data = { lq, },
+   };
+
+   if (lq->sta_id == IWM_MVM_STATION_COUNT)
+   return EINVAL;
+
+   return iwm_send_cmd(sc, );
+}
+
 boolean_t
 iwm_mvm_rx_diversity_allowed(struct iwm_softc *sc)
 {

Modified: head/sys/dev/iwm/if_iwm_util.h
==
--- head/sys/dev/iwm/if_iwm_util.h  Wed Jul 26 05:40:52 2017
(r321509)
+++ head/sys/dev/iwm/if_iwm_util.h  Wed Jul 26 05:51:31 2017
(r321510)
@@ -120,6 +120,9 @@ extern  int iwm_dma_contig_alloc(bus_dma_tag_t tag, str
 bus_size_t size, bus_size_t alignment);
 extern void iwm_dma_contig_free(struct iwm_dma_info *);
 
+extern int iwm_mvm_send_lq_cmd(struct iwm_softc *sc, struct iwm_lq_cmd *lq,
+   boolean_t init);
+
 extern boolean_t iwm_mvm_rx_diversity_allowed(struct iwm_softc *sc);
 
 extern uint8_t iwm_ridx2rate(struct ieee80211_rateset *rs, int ridx);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321509 - head/sys/dev/iwm

2017-07-25 Thread Adrian Chadd
Author: adrian
Date: Wed Jul 26 05:40:52 2017
New Revision: 321509
URL: https://svnweb.freebsd.org/changeset/base/321509

Log:
  [iwm] Sync statistics API definitions with Linux iwlwifi.
  
  Obtained from:dragonflybsd.git 
75895a53a9c1ba60d75be9b4bf6e49a37f91a7cf

Modified:
  head/sys/dev/iwm/if_iwm.c
  head/sys/dev/iwm/if_iwmreg.h
  head/sys/dev/iwm/if_iwmvar.h

Modified: head/sys/dev/iwm/if_iwm.c
==
--- head/sys/dev/iwm/if_iwm.c   Wed Jul 26 05:29:08 2017(r321508)
+++ head/sys/dev/iwm/if_iwm.c   Wed Jul 26 05:40:52 2017(r321509)
@@ -325,8 +325,10 @@ static int iwm_mvm_get_signal_strength(struct iwm_soft
struct iwm_rx_phy_info *);
 static voidiwm_mvm_rx_rx_phy_cmd(struct iwm_softc *,
   struct iwm_rx_packet *);
-static int iwm_get_noise(struct iwm_softc *sc,
+static int iwm_get_noise(struct iwm_softc *,
const struct iwm_mvm_statistics_rx_non_phy *);
+static voidiwm_mvm_handle_rx_statistics(struct iwm_softc *,
+   struct iwm_rx_packet *);
 static boolean_t iwm_mvm_rx_rx_mpdu(struct iwm_softc *, struct mbuf *,
uint32_t, boolean_t);
 static int iwm_mvm_rx_tx_cmd_single(struct iwm_softc *,
@@ -3159,6 +3161,15 @@ iwm_get_noise(struct iwm_softc *sc,
 #endif
 }
 
+static void
+iwm_mvm_handle_rx_statistics(struct iwm_softc *sc, struct iwm_rx_packet *pkt)
+{
+   struct iwm_notif_statistics_v10 *stats = (void *)>data;
+
+   memcpy(>sc_stats, stats, sizeof(sc->sc_stats));
+   sc->sc_noise = iwm_get_noise(sc, >rx.general);
+}
+
 /*
  * iwm_mvm_rx_rx_mpdu - IWM_REPLY_RX_MPDU_CMD handler
  *
@@ -5292,13 +5303,9 @@ iwm_handle_rxb(struct iwm_softc *sc, struct mbuf *m)
case IWM_CALIB_RES_NOTIF_PHY_DB:
break;
 
-   case IWM_STATISTICS_NOTIFICATION: {
-   struct iwm_notif_statistics *stats;
-   stats = (void *)pkt->data;
-   memcpy(>sc_stats, stats, sizeof(sc->sc_stats));
-   sc->sc_noise = iwm_get_noise(sc, >rx.general);
+   case IWM_STATISTICS_NOTIFICATION:
+   iwm_mvm_handle_rx_statistics(sc, pkt);
break;
-   }
 
case IWM_NVM_ACCESS_CMD:
case IWM_MCC_UPDATE_CMD:

Modified: head/sys/dev/iwm/if_iwmreg.h
==
--- head/sys/dev/iwm/if_iwmreg.hWed Jul 26 05:29:08 2017
(r321508)
+++ head/sys/dev/iwm/if_iwmreg.hWed Jul 26 05:40:52 2017
(r321509)
@@ -2898,6 +2898,18 @@ struct iwm_mcast_filter_cmd {
uint8_t addr_list[0];
 } __packed; /* IWM_MCAST_FILTERING_CMD_API_S_VER_1 */
 
+/*
+ * The first MAC indices (starting from 0)
+ * are available to the driver, AUX follows
+ */
+#define IWM_MAC_INDEX_AUX  4
+#define IWM_MAC_INDEX_MIN_DRIVER   0
+#define IWM_NUM_MAC_INDEX_DRIVER   IWM_MAC_INDEX_AUX
+#define IWM_NUM_MAC_INDEX  (IWM_MAC_INDEX_AUX + 1)
+
+/***
+ * Statistics API
+ ***/
 struct iwm_mvm_statistics_dbg {
uint32_t burst_check;
uint32_t burst_count;
@@ -2914,24 +2926,6 @@ struct iwm_mvm_statistics_div {
uint32_t reserved2;
 } __packed; /* IWM_STATISTICS_SLOW_DIV_API_S_VER_2 */
 
-struct iwm_mvm_statistics_general_common {
-   uint32_t temperature;   /* radio temperature */
-   uint32_t temperature_m; /* radio voltage */
-   struct iwm_mvm_statistics_dbg dbg;
-   uint32_t sleep_time;
-   uint32_t slots_out;
-   uint32_t slots_idle;
-   uint32_t ttl_timestamp;
-   struct iwm_mvm_statistics_div div;
-   uint32_t rx_enable_counter;
-   /*
-* num_of_sos_states:
-*  count the number of times we have to re-tune
-*  in order to get out of bad PHY status
-*/
-   uint32_t num_of_sos_states;
-} __packed; /* IWM_STATISTICS_GENERAL_API_S_VER_5 */
-
 struct iwm_mvm_statistics_rx_non_phy {
uint32_t bogus_cts; /* CTS received when not expecting CTS */
uint32_t bogus_ack; /* ACK received when not expecting ACK */
@@ -3002,6 +2996,23 @@ struct iwm_mvm_statistics_rx_ht_phy {
uint32_t unsupport_mcs;
 } __packed;  /* IWM_STATISTICS_HT_RX_PHY_API_S_VER_1 */
 
+struct iwm_mvm_statistics_tx_non_phy {
+   uint32_t preamble_cnt;
+   uint32_t rx_detected_cnt;
+   uint32_t bt_prio_defer_cnt;
+   uint32_t bt_prio_kill_cnt;
+   uint32_t few_bytes_cnt;
+   uint32_t cts_timeout;
+   uint32_t ack_timeout;
+   uint32_t expected_ack_cnt;
+   uint32_t actual_ack_cnt;
+   uint32_t dump_msdu_cnt;
+   uint32_t burst_abort_next_frame_mismatch_cnt;
+   uint32_t 

svn commit: r321508 - head/sys/dev/iwm

2017-07-25 Thread Adrian Chadd
Author: adrian
Date: Wed Jul 26 05:29:08 2017
New Revision: 321508
URL: https://svnweb.freebsd.org/changeset/base/321508

Log:
  [iwm] Cleanup mbufq draining. Add iwm_xmit_queue_drain() like in iwn(4).
  
  * iwm_xmit_queue_drain() calls ieee80211_free_node(), removing a possible
memory leak, compared to using just mbufq_drain().
  
  * Remove duplicate mbufq_drain() from iwm_mvm_rm_sta(), this should be
handled in the caller.
  
  Obtained from:dragonflybsd.git 
339d45fda40072e0aca5ece639173204716f11fe

Modified:
  head/sys/dev/iwm/if_iwm.c
  head/sys/dev/iwm/if_iwm_sta.c

Modified: head/sys/dev/iwm/if_iwm.c
==
--- head/sys/dev/iwm/if_iwm.c   Wed Jul 26 05:26:01 2017(r321507)
+++ head/sys/dev/iwm/if_iwm.c   Wed Jul 26 05:29:08 2017(r321508)
@@ -388,6 +388,7 @@ static struct ieee80211vap *
   const uint8_t [IEEE80211_ADDR_LEN],
   const uint8_t [IEEE80211_ADDR_LEN]);
 static voidiwm_vap_delete(struct ieee80211vap *);
+static voidiwm_xmit_queue_drain(struct iwm_softc *);
 static voidiwm_scan_start(struct ieee80211com *);
 static voidiwm_scan_end(struct ieee80211com *);
 static voidiwm_update_mcast(struct ieee80211com *);
@@ -4103,7 +4104,7 @@ iwm_release(struct iwm_softc *sc, struct iwm_node *in)
 * get here from RUN state.
 */
tfd_msk = 0xf;
-   mbufq_drain(>sc_snd);
+   iwm_xmit_queue_drain(sc);
iwm_mvm_flush_tx_path(sc, tfd_msk, IWM_CMD_SYNC);
/*
 * We seem to get away with just synchronously sending the
@@ -6214,6 +6215,19 @@ iwm_vap_delete(struct ieee80211vap *vap)
 }
 
 static void
+iwm_xmit_queue_drain(struct iwm_softc *sc)
+{
+   struct mbuf *m;
+   struct ieee80211_node *ni;
+
+   while ((m = mbufq_dequeue(>sc_snd)) != NULL) {
+   ni = (struct ieee80211_node *)m->m_pkthdr.rcvif;
+   ieee80211_free_node(ni);
+   m_freem(m);
+   }
+}
+
+static void
 iwm_scan_start(struct ieee80211com *ic)
 {
struct ieee80211vap *vap = TAILQ_FIRST(>ic_vaps);
@@ -6372,6 +6386,9 @@ iwm_detach_local(struct iwm_softc *sc, int do_net80211
callout_drain(>sc_watchdog_to);
iwm_stop_device(sc);
if (do_net80211) {
+   IWM_LOCK(sc);
+   iwm_xmit_queue_drain(sc);
+   IWM_UNLOCK(sc);
ieee80211_ifdetach(>sc_ic);
}
 
@@ -6405,7 +6422,6 @@ iwm_detach_local(struct iwm_softc *sc, int do_net80211
sc->sc_notif_wait = NULL;
}
 
-   mbufq_drain(>sc_snd);
IWM_LOCK_DESTROY(sc);
 
return (0);

Modified: head/sys/dev/iwm/if_iwm_sta.c
==
--- head/sys/dev/iwm/if_iwm_sta.c   Wed Jul 26 05:26:01 2017
(r321507)
+++ head/sys/dev/iwm/if_iwm_sta.c   Wed Jul 26 05:29:08 2017
(r321508)
@@ -283,7 +283,6 @@ iwm_mvm_rm_sta(struct iwm_softc *sc, struct ieee80211v
ret = iwm_mvm_drain_sta(sc, IWM_VAP(vap), TRUE);
if (ret)
return ret;
-   mbufq_drain(>sc_snd); /* XXX needed ? */
for (ac = 0; ac < WME_NUM_AC; ac++) {
tfd_queue_msk |= htole32(1 << iwm_mvm_ac_to_tx_fifo[ac]);
}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321507 - head/sys/dev/iwm

2017-07-25 Thread Adrian Chadd
Author: adrian
Date: Wed Jul 26 05:26:01 2017
New Revision: 321507
URL: https://svnweb.freebsd.org/changeset/base/321507

Log:
  [iwm] if_iwm - Use chan list from ieee80211_scan_state for scan, not 
ic_channels.
  
  * Limiting the channel list with "ifconfig wlan0 chanlist ..." now will
actually set the list of channels scanned by iwm.
  
  Tested:
  
  * Intel 7260, STA mode, setting chanlist to 1-14 and 36-254, and indeed it 
does what
it should!

Modified:
  head/sys/dev/iwm/if_iwm_scan.c

Modified: head/sys/dev/iwm/if_iwm_scan.c
==
--- head/sys/dev/iwm/if_iwm_scan.c  Wed Jul 26 05:01:46 2017
(r321506)
+++ head/sys/dev/iwm/if_iwm_scan.c  Wed Jul 26 05:26:01 2017
(r321507)
@@ -307,15 +307,13 @@ iwm_mvm_lmac_scan_fill_channels(struct iwm_softc *sc,
int j;
 
for (nchan = j = 0;
-   j < ic->ic_nchans && nchan < sc->ucode_capa.n_scan_channels; j++) {
-   c = >ic_channels[j];
-   /* For 2GHz, only populate 11b channels */
-   /* For 5GHz, only populate 11a channels */
+   j < ss->ss_last && nchan < sc->ucode_capa.n_scan_channels; j++) {
+   c = ss->ss_chans[j];
/*
 * Catch other channels, in case we have 900MHz channels or
 * something in the chanlist.
 */
-   if (iwm_mvm_scan_skip_channel(c)) {
+   if (!IEEE80211_IS_CHAN_2GHZ(c) && !IEEE80211_IS_CHAN_5GHZ(c)) {
IWM_DPRINTF(sc, IWM_DEBUG_RESET | IWM_DEBUG_EEPROM,
"%s: skipping channel (freq=%d, ieee=%d, 
flags=0x%08x)\n",
__func__, c->ic_freq, c->ic_ieee, c->ic_flags);
@@ -346,20 +344,19 @@ iwm_mvm_umac_scan_fill_channels(struct iwm_softc *sc,
 struct iwm_scan_channel_cfg_umac *chan, int n_ssids)
 {
struct ieee80211com *ic = >sc_ic;
+   struct ieee80211_scan_state *ss = ic->ic_scan;
struct ieee80211_channel *c;
uint8_t nchan;
int j;
 
for (nchan = j = 0;
-   j < ic->ic_nchans && nchan < sc->ucode_capa.n_scan_channels; j++) {
-   c = >ic_channels[j];
-   /* For 2GHz, only populate 11b channels */
-   /* For 5GHz, only populate 11a channels */
+   j < ss->ss_last && nchan < sc->ucode_capa.n_scan_channels; j++) {
+   c = ss->ss_chans[j];
/*
 * Catch other channels, in case we have 900MHz channels or
 * something in the chanlist.
 */
-   if (iwm_mvm_scan_skip_channel(c)) {
+   if (!IEEE80211_IS_CHAN_2GHZ(c) && !IEEE80211_IS_CHAN_5GHZ(c)) {
IWM_DPRINTF(sc, IWM_DEBUG_RESET | IWM_DEBUG_EEPROM,
"%s: skipping channel (freq=%d, ieee=%d, 
flags=0x%08x)\n",
__func__, c->ic_freq, c->ic_ieee, c->ic_flags);
@@ -726,7 +723,7 @@ iwm_mvm_lmac_scan(struct iwm_softc *sc)
if (iwm_mvm_rrm_scan_needed(sc))
req->scan_flags |= htole32(IWM_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED);
 
-   req->flags = iwm_mvm_scan_rxon_flags(>sc_ic.ic_channels[0]);
+   req->flags = iwm_mvm_scan_rxon_flags(sc->sc_ic.ic_scan->ss_chans[0]);
 
req->filter_flags =
htole32(IWM_MAC_FILTER_ACCEPT_GRP | IWM_MAC_FILTER_IN_BEACON);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321504 - head/kerberos5/lib/libkafs5

2017-07-25 Thread Cy Schubert
Author: cy
Date: Wed Jul 26 02:05:09 2017
New Revision: 321504
URL: https://svnweb.freebsd.org/changeset/base/321504

Log:
  Remove trailing slash (/) for consistency.

Modified:
  head/kerberos5/lib/libkafs5/Makefile

Modified: head/kerberos5/lib/libkafs5/Makefile
==
--- head/kerberos5/lib/libkafs5/MakefileWed Jul 26 01:48:57 2017
(r321503)
+++ head/kerberos5/lib/libkafs5/MakefileWed Jul 26 02:05:09 2017
(r321504)
@@ -26,7 +26,7 @@ SRCS= afssys.c afskrb5.c common.c krb5_err.h
 
 CFLAGS+=   -I${KRB5DIR}/lib/kafs \
-I${KRB5DIR}/lib/krb5 \
-   -I${.OBJDIR:H}/libkrb5/ \
+   -I${.OBJDIR:H}/libkrb5 \
-I${KRB5DIR}/lib/roken
 
 CLEANFILES= kafs5.3
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321502 - head/sys/dev/mpr

2017-07-25 Thread Scott Long
Author: scottl
Date: Wed Jul 26 01:48:13 2017
New Revision: 321502
URL: https://svnweb.freebsd.org/changeset/base/321502

Log:
  Quiet a message that sounds far more dire than it really is.

Modified:
  head/sys/dev/mpr/mpr_sas.c

Modified: head/sys/dev/mpr/mpr_sas.c
==
--- head/sys/dev/mpr/mpr_sas.c  Wed Jul 26 01:46:25 2017(r321501)
+++ head/sys/dev/mpr/mpr_sas.c  Wed Jul 26 01:48:13 2017(r321502)
@@ -2677,7 +2677,7 @@ mprsas_scsiio_complete(struct mpr_softc *sc, struct mp
if ((sassc->flags & MPRSAS_QUEUE_FROZEN) == 0) {
xpt_freeze_simq(sassc->sim, 1);
sassc->flags |= MPRSAS_QUEUE_FROZEN;
-   mpr_dprint(sc, MPR_INFO, "Error sending command, "
+   mpr_dprint(sc, MPR_XINFO, "Error sending command, "
"freezing SIM queue\n");
}
}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321493 - head

2017-07-25 Thread Bryan Drewery
Author: bdrewery
Date: Tue Jul 25 20:51:06 2017
New Revision: 321493
URL: https://svnweb.freebsd.org/changeset/base/321493

Log:
  NO_CLEAN: Hide delete-old output.
  
  It is full of distracting noise about UPDATING and may confuse
  the user about what is actually being deleted.  It is also
  possible to have directories removed on every run with
  use of WITHOUT_ knobs that the mtree files do not
  account for and for which the directories are incorrectly
  in OLD_DIRS currently.
  
  X-MFC-With:   r321443
  MFC after:1 month
  Sponsored by: Dell EMC Isilon

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Tue Jul 25 20:43:37 2017(r321492)
+++ head/Makefile.inc1  Tue Jul 25 20:51:06 2017(r321493)
@@ -761,12 +761,13 @@ _worldtmp: .PHONY
rm -rf ${LIBCOMPATTMP}
 .endif
 .else
+   @echo ">>> Deleting stale files in build tree..."
${_+_}cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \
-   delete-old delete-old-libs
+   delete-old delete-old-libs >/dev/null
 .if defined(LIBCOMPAT)
${_+_}cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \
DESTDIR=${LIBCOMPATTMP} \
-   delete-old delete-old-libs
+   delete-old delete-old-libs >/dev/null
 .endif
rm -rf ${WORLDTMP}/legacy/usr/include
 .if ${USING_SYSTEM_COMPILER} == "yes"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321492 - head

2017-07-25 Thread Bryan Drewery
Author: bdrewery
Date: Tue Jul 25 20:43:37 2017
New Revision: 321492
URL: https://svnweb.freebsd.org/changeset/base/321492

Log:
  Only build libzfs_core in 'make libraries' if needed.
  
  MFC after:2 weeks
  Sponsored by: Dell EMC Isilon

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Tue Jul 25 20:43:26 2017(r321491)
+++ head/Makefile.inc1  Tue Jul 25 20:43:37 2017(r321492)
@@ -2336,10 +2336,12 @@ _cddl_lib_libumem= cddl/lib/libumem
 _cddl_lib_libnvpair= cddl/lib/libnvpair
 _cddl_lib_libavl= cddl/lib/libavl
 _cddl_lib_libuutil= cddl/lib/libuutil
+.if ${MK_ZFS} != "no"
 _cddl_lib_libzfs_core= cddl/lib/libzfs_core
+cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L
+.endif
 _cddl_lib_libctf= cddl/lib/libctf
 _cddl_lib= cddl/lib
-cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L
 cddl/lib/libctf__L: lib/libz__L
 .endif
 # cddl/lib/libdtrace requires lib/libproc and lib/librtld_db; it's only built
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321491 - head

2017-07-25 Thread Bryan Drewery
Author: bdrewery
Date: Tue Jul 25 20:43:26 2017
New Revision: 321491
URL: https://svnweb.freebsd.org/changeset/base/321491

Log:
  Remove unneeded dependency for libzfs.
  
  This dependency does nothing since cddl/lib/libzfs is never
  added into the 'make libraries' dependency chain
  directly.
  
  MFC after:2 weeks
  Sponsored by: Dell EMC Isilon

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Tue Jul 25 20:36:44 2017(r321490)
+++ head/Makefile.inc1  Tue Jul 25 20:43:26 2017(r321491)
@@ -2340,7 +2340,6 @@ _cddl_lib_libzfs_core= cddl/lib/libzfs_core
 _cddl_lib_libctf= cddl/lib/libctf
 _cddl_lib= cddl/lib
 cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L
-cddl/lib/libzfs__L: lib/libgeom__L
 cddl/lib/libctf__L: lib/libz__L
 .endif
 # cddl/lib/libdtrace requires lib/libproc and lib/librtld_db; it's only built
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321490 - head/sys/dev/mmc

2017-07-25 Thread Marius Strobl
Author: marius
Date: Tue Jul 25 20:36:44 2017
New Revision: 321490
URL: https://svnweb.freebsd.org/changeset/base/321490

Log:
  Improve the clarity of a comment added in r321385 by not referring to
  volatile SDHCI specification lingo.

Modified:
  head/sys/dev/mmc/mmcsd.c

Modified: head/sys/dev/mmc/mmcsd.c
==
--- head/sys/dev/mmc/mmcsd.cTue Jul 25 17:39:06 2017(r321489)
+++ head/sys/dev/mmc/mmcsd.cTue Jul 25 20:36:44 2017(r321490)
@@ -235,7 +235,7 @@ mmcsd_attach(device_t dev)
 * insertion that results in switches to/from a transfer mode involving
 * re-tuning, iff there are multiple devices on a given bus.  Until now
 * mmc(4) lacks support for rescanning already attached buses, however,
-* and sdhci(4) has no support for embedded/shared buses in the first
+* and sdhci(4) to date has no support for shared buses in the first
 * place either.
 */
sc->max_data = mmc_get_max_data(dev);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r321422 - head/usr.bin/ktrace

2017-07-25 Thread Edward Tomasz Napierala
On 0725T1002, John Baldwin wrote:
> On Monday, July 24, 2017 04:58:54 PM Edward Tomasz Napierala wrote:
> > Author: trasz
> > Date: Mon Jul 24 16:58:54 2017
> > New Revision: 321422
> > URL: https://svnweb.freebsd.org/changeset/base/321422
> > 
> > Log:
> >   Improve the ktrace(1) man page to make it slightly more obvious that there
> >   are _two_ options that control its behaviour wrt child processes; slightly
> >   improve the example[1], and add Xrefs.
> >   
> >   Discussed with:   wblock [1]
> >   MFC after:2 weeks
> >   Sponsored by: DARPA, AFRL
> > 
> > Modified:
> >   head/usr.bin/ktrace/ktrace.1
> > 
> > Modified: head/usr.bin/ktrace/ktrace.1
> > ==
> > --- head/usr.bin/ktrace/ktrace.1Mon Jul 24 16:45:38 2017
> > (r321421)
> > +++ head/usr.bin/ktrace/ktrace.1Mon Jul 24 16:58:54 2017
> > (r321422)
> > @@ -166,16 +175,15 @@ Enable tracing of
> >  on process 67:
> >  .Dl $ ktrace -ti -p 67
> >  .Pp
> > -Run the command "w", tracing only system calls:
> > -.Dl $ ktrace -tc w
> > -.Pp
> 
> Did you mean to remove this example?

I've replaced it with a new one, at the top, showing something more
commonly used.

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321489 - head/sys/arm/include

2017-07-25 Thread Ian Lepore
Author: ian
Date: Tue Jul 25 17:39:06 2017
New Revision: 321489
URL: https://svnweb.freebsd.org/changeset/base/321489

Log:
  Use the MD __size_t to avoid a dependency on/include of non-MD header files.
  
  This should fix the compilation of the lua 5.3.4 port, among others.
  
  Reported by:  Russell Haley 

Modified:
  head/sys/arm/include/ucontext.h

Modified: head/sys/arm/include/ucontext.h
==
--- head/sys/arm/include/ucontext.h Tue Jul 25 17:24:50 2017
(r321488)
+++ head/sys/arm/include/ucontext.h Tue Jul 25 17:39:06 2017
(r321489)
@@ -78,7 +78,7 @@ typedef struct {
 * Originally, rest of this structure was named __fpu, 35 * 4 bytes
 * long, never accessed from kernel. 
 */
-   size_t  mc_vfp_size;
+   __size_tmc_vfp_size;
void*mc_vfp_ptr;
unsigned intmc_spare[33];
 } mcontext_t;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r321370 - head/lib/libsysdecode

2017-07-25 Thread John Baldwin
On Sunday, July 23, 2017 06:03:48 PM Kristof Provost wrote:
> On 22 Jul 2017, at 17:42, Ngie Cooper (yaneurabeya) wrote:
> > > On Jul 22, 2017, at 5:51 AM, Kristof Provost  wrote:
> >>
> >> Author: kp
> >> Date: Sat Jul 22 12:51:19 2017
> >> New Revision: 321370
> >> URL: https://svnweb.freebsd.org/changeset/base/321370
> >>
> >> Log:
> >>  Handle WITH/WITHOUT_PF in libsysdecode
> >>
> >>  Only filter out the PF ioctls if we're building without pf support.
> >>  Until now those were always filtered out, so truss did not show 
> >> symbolic
> >>  names for pf ioctls.
> >
> >
> > Hi Kristof!
> > 'MFC after: 1 week” should have probably be added to this commit.
> > This change should be MFCed to ^/stable/11 and probably ^/stable/10 
> > (in usr.sbin/kdump on 10: 
> > https://svnweb.freebsd.org/base/stable/10/usr.bin/kdump/mkioctls?revision=291815=markup#l25
> >  
> > ).
> 
> To be honest I wasn’t planning on MFCing this, because it’s not a 
> terribly important issue.
> That said, if it’d be useful to you (or anyone else) I’m certainly 
> willing to do so.
> 
> I’m not sure how much the code changed between 10 and 11, but MFC to 
> 11 should be easy, and if the changes are not too extensive I can do the 
> merge to 10 as well.

libsysdecode is not present in 10.  In 10 you'd have to patch the kdump
mkioctls script and the truss and kdump Makefile's.  I think it's probably
not worth the trouble to MFC to 10.  11 should probably merge fine, though
you'll have to tweak it since the previous change to remove the disk hack
can't be MFC'.d :(  Your original version of the patch would be fine for
11 though.

-- 
John Baldwin
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Re: svn commit: r321422 - head/usr.bin/ktrace

2017-07-25 Thread John Baldwin
On Monday, July 24, 2017 04:58:54 PM Edward Tomasz Napierala wrote:
> Author: trasz
> Date: Mon Jul 24 16:58:54 2017
> New Revision: 321422
> URL: https://svnweb.freebsd.org/changeset/base/321422
> 
> Log:
>   Improve the ktrace(1) man page to make it slightly more obvious that there
>   are _two_ options that control its behaviour wrt child processes; slightly
>   improve the example[1], and add Xrefs.
>   
>   Discussed with: wblock [1]
>   MFC after:  2 weeks
>   Sponsored by:   DARPA, AFRL
> 
> Modified:
>   head/usr.bin/ktrace/ktrace.1
> 
> Modified: head/usr.bin/ktrace/ktrace.1
> ==
> --- head/usr.bin/ktrace/ktrace.1  Mon Jul 24 16:45:38 2017
> (r321421)
> +++ head/usr.bin/ktrace/ktrace.1  Mon Jul 24 16:58:54 2017
> (r321422)
> @@ -166,16 +175,15 @@ Enable tracing of
>  on process 67:
>  .Dl $ ktrace -ti -p 67
>  .Pp
> -Run the command "w", tracing only system calls:
> -.Dl $ ktrace -tc w
> -.Pp

Did you mean to remove this example?

-- 
John Baldwin
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321487 - head/usr.bin/indent

2017-07-25 Thread Piotr Pawel Stefaniak
Author: pstef
Date: Tue Jul 25 17:04:35 2017
New Revision: 321487
URL: https://svnweb.freebsd.org/changeset/base/321487

Log:
  indent(1): add option -tsn for setting tab size.

Modified:
  head/usr.bin/indent/args.c
  head/usr.bin/indent/indent.1
  head/usr.bin/indent/indent.c
  head/usr.bin/indent/indent_globs.h
  head/usr.bin/indent/io.c
  head/usr.bin/indent/pr_comment.c

Modified: head/usr.bin/indent/args.c
==
--- head/usr.bin/indent/args.c  Tue Jul 25 16:57:25 2017(r321486)
+++ head/usr.bin/indent/args.c  Tue Jul 25 17:04:35 2017(r321487)
@@ -166,6 +166,7 @@ struct pro {
 {"sob", PRO_BOOL, false, ON, _optional_blanklines},
 {"st", PRO_SPECIAL, 0, STDIN, 0},
 {"ta", PRO_BOOL, false, ON, _typedefs},
+{"ts", PRO_INT, 8, 0, },
 {"troff", PRO_BOOL, false, ON, },
 {"ut", PRO_BOOL, true, ON, _tabs},
 {"v", PRO_BOOL, false, ON, },

Modified: head/usr.bin/indent/indent.1
==
--- head/usr.bin/indent/indent.1Tue Jul 25 16:57:25 2017
(r321486)
+++ head/usr.bin/indent/indent.1Tue Jul 25 17:04:35 2017
(r321487)
@@ -30,7 +30,7 @@
 .\"@(#)indent.18.1 (Berkeley) 7/1/93
 .\" $FreeBSD$
 .\"
-.Dd January 2, 2017
+.Dd July 25, 2017
 .Dt INDENT 1
 .Os
 .Sh NAME
@@ -85,6 +85,7 @@
 .Op Fl \
 .Op Fl \
 .Op Fl troff
+.Op Fl ts Ns Ar n
 .Op Fl U Ns Ar file
 .Op Fl ut | Fl nut
 .Op Fl v | Fl \
@@ -459,13 +460,15 @@ listing in much the same spirit as
 .Xr vgrind 1 .
 If the output file is not specified, the default is standard output,
 rather than formatting in place.
+.It Fl ts Ns Ar n
+Assumed distance between tab stops.
+The default is 8.
 .It Fl U Ns Ar file
 Adds type names from
 .Ar file
 to the list of type keywords.
 .It Fl ut , nut
 Enables (disables) the use of tab characters in the output.
-Tabs are assumed to be aligned on columns divisible by 8.
 The default is
 .Fl ut .
 .It Fl v , \

Modified: head/usr.bin/indent/indent.c
==
--- head/usr.bin/indent/indent.cTue Jul 25 16:57:25 2017
(r321486)
+++ head/usr.bin/indent/indent.cTue Jul 25 17:04:35 2017
(r321487)
@@ -292,7 +292,7 @@ main(int argc, char **argv)
if (*p == ' ')
col++;
else if (*p == '\t')
-   col = ((col - 1) & ~7) + 9;
+   col = tabsize * (1 + (col - 1) / tabsize) + 1;
else
break;
p++;
@@ -1050,7 +1050,7 @@ check_type:
if (ps.p_l_follow == 0) {
if (ps.block_init_level <= 0)
ps.block_init = 0;
-   if (break_comma && (!ps.leave_comma || compute_code_target() + 
(e_code - s_code) > max_col - 8))
+   if (break_comma && (!ps.leave_comma || compute_code_target() + 
(e_code - s_code) > max_col - tabsize))
force_nl = true;
}
break;
@@ -1267,18 +1267,21 @@ indent_declaration(int cur_dec_ind, int tabs_to_var)
 char *startpos = e_code;
 
 /*
- * get the tab math right for indentations that are not multiples of 8
+ * get the tab math right for indentations that are not multiples of 
tabsize
  */
-if ((ps.ind_level * ps.ind_size) % 8 != 0) {
-   pos += (ps.ind_level * ps.ind_size) % 8;
-   cur_dec_ind += (ps.ind_level * ps.ind_size) % 8;
+if ((ps.ind_level * ps.ind_size) % tabsize != 0) {
+   pos += (ps.ind_level * ps.ind_size) % tabsize;
+   cur_dec_ind += (ps.ind_level * ps.ind_size) % tabsize;
 }
-if (tabs_to_var)
-   while ((pos & ~7) + 8 <= cur_dec_ind) {
+if (tabs_to_var) {
+   int tpos;
+
+   while ((tpos = tabsize * (1 + pos / tabsize)) <= cur_dec_ind) {
CHECK_SIZE_CODE;
*e_code++ = '\t';
-   pos = (pos & ~7) + 8;
+   pos = tpos;
}
+}
 while (pos < cur_dec_ind) {
CHECK_SIZE_CODE;
*e_code++ = ' ';

Modified: head/usr.bin/indent/indent_globs.h
==
--- head/usr.bin/indent/indent_globs.h  Tue Jul 25 16:57:25 2017
(r321486)
+++ head/usr.bin/indent/indent_globs.h  Tue Jul 25 17:04:35 2017
(r321487)
@@ -42,11 +42,7 @@
 #define label_offset 2 /* number of levels a label is placed to left
 * of code */
 
-#define tabsize 8  /* the size of a tab */
-#define tabmask 010/* mask used when figuring length of 
lines
-* with tabs */
 
-
 #define false 0
 #define true  1
 
@@ -213,6 +209,7 @@ int use_tabs;   /* set true to use tabs 
for spacin
 intauto_typedefs;  /* set true to recognize identifiers
 * ending in "_t" 

svn commit: r321486 - head/lib/msun/tests

2017-07-25 Thread Ngie Cooper
Author: ngie
Date: Tue Jul 25 16:57:25 2017
New Revision: 321486
URL: https://svnweb.freebsd.org/changeset/base/321486

Log:
  Re-add #endif accidentally deleted in r321484
  
  MFC after:1 month
  MFC with: r321455, r321484

Modified:
  head/lib/msun/tests/trig_test.c

Modified: head/lib/msun/tests/trig_test.c
==
--- head/lib/msun/tests/trig_test.c Tue Jul 25 16:46:12 2017
(r321485)
+++ head/lib/msun/tests/trig_test.c Tue Jul 25 16:57:25 2017
(r321486)
@@ -156,6 +156,7 @@ ATF_TC_BODY(reduction, tc)
9.8477555741888350649e+4314L,
1.6061597222105160737e+4326L,
};
+#endif
 
 #if defined(__clang__) && \
((__clang_major__ >= 5))
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321485 - in head: share/mk sys/conf

2017-07-25 Thread Bryan Drewery
Author: bdrewery
Date: Tue Jul 25 16:46:12 2017
New Revision: 321485
URL: https://svnweb.freebsd.org/changeset/base/321485

Log:
  Allow -DNO_SKIP_DEPEND to override the _SKIP_DEPEND logic.
  
  MFC after:2 weeks
  Sponsored by: Dell EMC Isilon

Modified:
  head/share/mk/bsd.dep.mk
  head/sys/conf/kern.post.mk

Modified: head/share/mk/bsd.dep.mk
==
--- head/share/mk/bsd.dep.mkTue Jul 25 16:21:22 2017(r321484)
+++ head/share/mk/bsd.dep.mkTue Jul 25 16:46:12 2017(r321485)
@@ -88,7 +88,7 @@ _meta_filemon=1
 # Also skip generating or including .depend.* files if in meta+filemon mode
 # since it will track dependencies itself.  OBJS_DEPEND_GUESS is still used
 # for _meta_filemon but not for _SKIP_DEPEND.
-.if defined(_SKIP_BUILD)
+.if !defined(NO_SKIP_DEPEND) && defined(_SKIP_BUILD)
 _SKIP_DEPEND=  1
 .endif
 .if ${MK_DIRDEPS_BUILD} == "no"

Modified: head/sys/conf/kern.post.mk
==
--- head/sys/conf/kern.post.mk  Tue Jul 25 16:21:22 2017(r321484)
+++ head/sys/conf/kern.post.mk  Tue Jul 25 16:46:12 2017(r321485)
@@ -201,9 +201,9 @@ _meta_filemon=  1
 # Also skip generating or including .depend.* files if in meta+filemon mode
 # since it will track dependencies itself.  OBJS_DEPEND_GUESS is still used
 # for _meta_filemon but not for _SKIP_DEPEND.
-.if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(*obj) || \
+.if !defined(NO_SKIP_DEPEND) && (make(*obj) || \
 ${.TARGETS:M*clean*} == ${.TARGETS} || \
-${.TARGETS:M*install*} == ${.TARGETS}
+${.TARGETS:M*install*} == ${.TARGETS})
 _SKIP_DEPEND=  1
 .endif
 .if defined(_SKIP_DEPEND) || defined(_meta_filemon)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321484 - head/lib/msun/tests

2017-07-25 Thread Ngie Cooper
Author: ngie
Date: Tue Jul 25 16:21:22 2017
New Revision: 321484
URL: https://svnweb.freebsd.org/changeset/base/321484

Log:
  Only test ld_pi_odd with LDBL_MANT_DIG == 64 to fix the build
  
  The empty (unimplemented) test inputs for sparc64 trigger a -Wtype-limits 
build
  failure because nitems of an empty array is always false, i.e., deadcode.
  
  MFC after:1 month
  MFC with: r321455
  Reported by:  Jenkins (sparc64 job)

Modified:
  head/lib/msun/tests/trig_test.c

Modified: head/lib/msun/tests/trig_test.c
==
--- head/lib/msun/tests/trig_test.c Tue Jul 25 16:11:36 2017
(r321483)
+++ head/lib/msun/tests/trig_test.c Tue Jul 25 16:21:22 2017
(r321484)
@@ -156,11 +156,6 @@ ATF_TC_BODY(reduction, tc)
9.8477555741888350649e+4314L,
1.6061597222105160737e+4326L,
};
-#elif LDBL_MANT_DIG == 113
-   static const long double ld_pi_odd[] = {
-   /* XXX */
-   };
-#endif
 
 #if defined(__clang__) && \
((__clang_major__ >= 5))
@@ -205,7 +200,7 @@ ATF_TC_BODY(reduction, tc)
ATF_CHECK(fabs(tan(-d_pi_odd[i] * 2)) < 2 * DBL_EPSILON);
}
 
-#if LDBL_MANT_DIG > 53
+#if LDBL_MANT_DIG == 64 /* XXX: || LDBL_MANT_DIG == 113 */
for (i = 0; i < nitems(ld_pi_odd); i++) {
ATF_CHECK(fabsl(sinl(ld_pi_odd[i])) < LDBL_EPSILON);
ATF_CHECK(cosl(ld_pi_odd[i]) == -1.0);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321483 - head/lib/msun/tests

2017-07-25 Thread Ngie Cooper
Author: ngie
Date: Tue Jul 25 16:11:36 2017
New Revision: 321483
URL: https://svnweb.freebsd.org/changeset/base/321483

Log:
  Mask issues with duplicate definitions for __fnstcw, __fldenv, and __fldcw on
  i386 by ignoring -Wmacro-redefined.
  
  This is a bandaid until the code is fixed and will be reverted before MFC.

Modified:
  head/lib/msun/tests/Makefile

Modified: head/lib/msun/tests/Makefile
==
--- head/lib/msun/tests/MakefileTue Jul 25 15:58:44 2017
(r321482)
+++ head/lib/msun/tests/MakefileTue Jul 25 16:11:36 2017
(r321483)
@@ -84,6 +84,10 @@ SRCS.ilogb2_test=ilogb_test.c
 
 LIBADD+=   m
 
+.if ${MACHINE_CPUARCH} == "i386"
+# XXX: __fldcw macro mismatch between fenv.h and ieeefp.h .
+CWARNFLAGS.clang+= -Wno-error=macro-redefined
+.endif
 WARNS?=1
 
 # Copied from lib/msun/Makefile
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321481 - head/sys/dev/bnxt

2017-07-25 Thread Sean Bruno
Author: sbruno
Date: Tue Jul 25 15:33:34 2017
New Revision: 321481
URL: https://svnweb.freebsd.org/changeset/base/321481

Log:
  bnxt: Implement interrupt coalescing options using sysctl.
  
  Submitted by:  bhargava.marre...@broadcom.com
  Differential Revision:https://reviews.freebsd.org/D11702

Modified:
  head/sys/dev/bnxt/bnxt.h
  head/sys/dev/bnxt/bnxt_hwrm.c
  head/sys/dev/bnxt/bnxt_hwrm.h
  head/sys/dev/bnxt/bnxt_sysctl.c
  head/sys/dev/bnxt/if_bnxt.c

Modified: head/sys/dev/bnxt/bnxt.h
==
--- head/sys/dev/bnxt/bnxt.hTue Jul 25 15:08:52 2017(r321480)
+++ head/sys/dev/bnxt/bnxt.hTue Jul 25 15:33:34 2017(r321481)
@@ -214,6 +214,18 @@ __FBSDID("$FreeBSD$");
 /* Chip info */
 #define BNXT_TSO_SIZE  UINT16_MAX
 
+#define min_t(type, x, y) ({\
+type __min1 = (x);  \
+type __min2 = (y);  \
+__min1 < __min2 ? __min1 : __min2; })
+
+#define max_t(type, x, y) ({\
+type __max1 = (x);  \
+type __max2 = (y);  \
+__max1 > __max2 ? __max1 : __max2; })
+
+#define clamp_t(type, _x, min, max) min_t(type, max_t(type, _x, min), max)
+
 /* NVRAM access */
 enum bnxt_nvm_directory_type {
BNX_DIR_TYPE_UNUSED = 0,
@@ -569,6 +581,20 @@ struct bnxt_softc {
struct bnxt_nvram_info  *nvm_info;
bool wol;
uint8_t wol_filter_id;
+   uint16_trx_coal_usecs;
+   uint16_trx_coal_usecs_irq;
+   uint16_trx_coal_frames;
+   uint16_trx_coal_frames_irq;
+   uint16_ttx_coal_usecs;
+   uint16_ttx_coal_usecs_irq;
+   uint16_ttx_coal_frames;
+   uint16_ttx_coal_frames_irq;
+
+#define BNXT_USEC_TO_COAL_TIMER(x)  ((x) * 25 / 2)
+#define BNXT_DEF_STATS_COAL_TICKS100
+#define BNXT_MIN_STATS_COAL_TICKS 25
+#define BNXT_MAX_STATS_COAL_TICKS100
+
 };
 
 struct bnxt_filter_info {

Modified: head/sys/dev/bnxt/bnxt_hwrm.c
==
--- head/sys/dev/bnxt/bnxt_hwrm.c   Tue Jul 25 15:08:52 2017
(r321480)
+++ head/sys/dev/bnxt/bnxt_hwrm.c   Tue Jul 25 15:33:34 2017
(r321481)
@@ -30,6 +30,7 @@
 __FBSDID("$FreeBSD$");
 
 #include 
+#include 
 
 #include "bnxt.h"
 #include "bnxt_hwrm.h"
@@ -1547,3 +1548,131 @@ bnxt_hwrm_free_wol_fltr(struct bnxt_softc *softc)
req.wol_filter_id = softc->wol_filter_id;
return hwrm_send_message(softc, , sizeof(req));
 }
+
+static void bnxt_hwrm_set_coal_params(struct bnxt_softc *softc, uint32_t 
max_frames,
+uint32_t buf_tmrs, uint16_t flags,
+struct hwrm_ring_cmpl_ring_cfg_aggint_params_input *req)
+{
+req->flags = htole16(flags);
+req->num_cmpl_dma_aggr = htole16((uint16_t)max_frames);
+req->num_cmpl_dma_aggr_during_int = htole16(max_frames >> 16);
+req->cmpl_aggr_dma_tmr = htole16((uint16_t)buf_tmrs);
+req->cmpl_aggr_dma_tmr_during_int = htole16(buf_tmrs >> 16);
+/* Minimum time between 2 interrupts set to buf_tmr x 2 */
+req->int_lat_tmr_min = htole16((uint16_t)buf_tmrs * 2);
+req->int_lat_tmr_max = htole16((uint16_t)buf_tmrs * 4);
+req->num_cmpl_aggr_int = htole16((uint16_t)max_frames * 4);
+}
+
+
+int bnxt_hwrm_set_coal(struct bnxt_softc *softc)
+{
+int i, rc = 0;
+struct hwrm_ring_cmpl_ring_cfg_aggint_params_input req_rx = {0},
+   req_tx = {0}, *req;
+uint16_t max_buf, max_buf_irq;
+uint16_t buf_tmr, buf_tmr_irq;
+uint32_t flags;
+
+bnxt_hwrm_cmd_hdr_init(softc, _rx,
+   HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS);
+bnxt_hwrm_cmd_hdr_init(softc, _tx,
+   HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS);
+
+/* Each rx completion (2 records) should be DMAed immediately.
+ * DMA 1/4 of the completion buffers at a time.
+ */
+max_buf = min_t(uint16_t, softc->rx_coal_frames / 4, 2);
+/* max_buf must not be zero */
+max_buf = clamp_t(uint16_t, max_buf, 1, 63);
+max_buf_irq = clamp_t(uint16_t, softc->rx_coal_frames_irq, 1, 63);
+buf_tmr = BNXT_USEC_TO_COAL_TIMER(softc->rx_coal_usecs);
+/* buf timer set to 1/4 of interrupt timer */
+buf_tmr = max_t(uint16_t, buf_tmr / 4, 1);
+buf_tmr_irq = BNXT_USEC_TO_COAL_TIMER(softc->rx_coal_usecs_irq);
+buf_tmr_irq = max_t(uint16_t, buf_tmr_irq, 1);
+
+flags = HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS_INPUT_FLAGS_TIMER_RESET;
+
+/* RING_IDLE generates more IRQs for lower latency.  Enable it only
+ * if coal_usecs is less than 25 

svn commit: r321480 - in head/sys/netinet: . cc tcp_stacks

2017-07-25 Thread Sean Bruno
Author: sbruno
Date: Tue Jul 25 15:08:52 2017
New Revision: 321480
URL: https://svnweb.freebsd.org/changeset/base/321480

Log:
  Revert r307901 - Inform CC modules about loss events.
  
  This was discussed between various transport@ members and it was
  requested to be reverted and discussed.
  
  Submitted by: Kevin Bowling 
  Reported by:  lawrence
  Reviewed by:  hiren
  Sponsored by: Limelight Networks

Modified:
  head/sys/netinet/cc/cc_cdg.c
  head/sys/netinet/cc/cc_chd.c
  head/sys/netinet/cc/cc_cubic.c
  head/sys/netinet/cc/cc_dctcp.c
  head/sys/netinet/cc/cc_htcp.c
  head/sys/netinet/cc/cc_newreno.c
  head/sys/netinet/tcp_input.c
  head/sys/netinet/tcp_stacks/fastpath.c

Modified: head/sys/netinet/cc/cc_cdg.c
==
--- head/sys/netinet/cc/cc_cdg.cTue Jul 25 15:03:05 2017
(r321479)
+++ head/sys/netinet/cc/cc_cdg.cTue Jul 25 15:08:52 2017
(r321480)
@@ -431,12 +431,7 @@ static void
 cdg_cong_signal(struct cc_var *ccv, uint32_t signal_type)
 {
struct cdg *cdg_data = ccv->cc_data;
-   uint32_t cwin;
-   u_int mss;
 
-   cwin = CCV(ccv, snd_cwnd);
-   mss = CCV(ccv, t_maxseg);
-
switch(signal_type) {
case CC_CDG_DELAY:
CCV(ccv, snd_ssthresh) = cdg_window_decrease(ccv,
@@ -453,7 +448,7 @@ cdg_cong_signal(struct cc_var *ccv, uint32_t signal_ty
 */
if (IN_CONGRECOVERY(CCV(ccv, t_flags)) ||
cdg_data->queue_state < CDG_Q_FULL) {
-   CCV(ccv, snd_ssthresh) = cwin;
+   CCV(ccv, snd_ssthresh) = CCV(ccv, snd_cwnd);
CCV(ccv, snd_recover) = CCV(ccv, snd_max);
} else {
/*
@@ -466,16 +461,12 @@ cdg_cong_signal(struct cc_var *ccv, uint32_t signal_ty
cdg_data->shadow_w, RENO_BETA);
 
CCV(ccv, snd_ssthresh) = max(cdg_data->shadow_w,
-   cdg_window_decrease(ccv, cwin, V_cdg_beta_loss));
-   CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh);
+   cdg_window_decrease(ccv, CCV(ccv, snd_cwnd),
+   V_cdg_beta_loss));
 
cdg_data->window_incr = cdg_data->rtt_count = 0;
}
ENTER_RECOVERY(CCV(ccv, t_flags));
-   break;
-   case CC_RTO:
-   CCV(ccv, snd_ssthresh) = max(2*mss, cwin/2);
-   CCV(ccv, snd_cwnd) = mss;
break;
default:
newreno_cc_algo.cong_signal(ccv, signal_type);

Modified: head/sys/netinet/cc/cc_chd.c
==
--- head/sys/netinet/cc/cc_chd.cTue Jul 25 15:03:05 2017
(r321479)
+++ head/sys/netinet/cc/cc_chd.cTue Jul 25 15:08:52 2017
(r321480)
@@ -330,14 +330,10 @@ chd_cong_signal(struct cc_var *ccv, uint32_t signal_ty
struct ertt *e_t;
struct chd *chd_data;
int qdly;
-   uint32_t cwin;
-   u_int mss;
 
e_t = khelp_get_osd(CCV(ccv, osd), ertt_id);
chd_data = ccv->cc_data;
qdly = imax(e_t->rtt, chd_data->maxrtt_in_rtt) - e_t->minrtt;
-   cwin = CCV(ccv, snd_cwnd);
-   mss = CCV(ccv, t_maxseg);
 
switch(signal_type) {
case CC_CHD_DELAY:
@@ -376,10 +372,6 @@ chd_cong_signal(struct cc_var *ccv, uint32_t signal_ty
CCV(ccv, t_maxseg) / 2, 2) * CCV(ccv, t_maxseg);
}
ENTER_FASTRECOVERY(CCV(ccv, t_flags));
-   break;
-   case CC_RTO:
-   CCV(ccv, snd_ssthresh) = max(2*mss, cwin/2);
-   CCV(ccv, snd_cwnd) = mss;
break;
 
default:

Modified: head/sys/netinet/cc/cc_cubic.c
==
--- head/sys/netinet/cc/cc_cubic.c  Tue Jul 25 15:03:05 2017
(r321479)
+++ head/sys/netinet/cc/cc_cubic.c  Tue Jul 25 15:08:52 2017
(r321480)
@@ -225,12 +225,8 @@ static void
 cubic_cong_signal(struct cc_var *ccv, uint32_t type)
 {
struct cubic *cubic_data;
-   uint32_t cwin;
-   u_int mss;
 
cubic_data = ccv->cc_data;
-   cwin = CCV(ccv, snd_cwnd);
-   mss = CCV(ccv, t_maxseg);
 
switch (type) {
case CC_NDUPACK:
@@ -239,8 +235,7 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type)
cubic_ssthresh_update(ccv);
cubic_data->num_cong_events++;
cubic_data->prev_max_cwnd = 
cubic_data->max_cwnd;
-   cubic_data->max_cwnd = cwin;
-   CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh);
+   cubic_data->max_cwnd = CCV(ccv, snd_cwnd);
 

svn commit: r321479 - in head/sys/netinet: . cc

2017-07-25 Thread Sean Bruno
Author: sbruno
Date: Tue Jul 25 15:03:05 2017
New Revision: 321479
URL: https://svnweb.freebsd.org/changeset/base/321479

Log:
  Revert r308180 - Set slow start threshold more accurrately on loss ...
  
  This was discussed between various transport@ members and it was
  requested to be reverted and discussed.
  
  Submitted by: kevin
  Reported by:  lawerence
  Reviewed by:  hiren

Modified:
  head/sys/netinet/cc/cc_cdg.c
  head/sys/netinet/cc/cc_chd.c
  head/sys/netinet/cc/cc_dctcp.c
  head/sys/netinet/cc/cc_htcp.c
  head/sys/netinet/cc/cc_newreno.c
  head/sys/netinet/tcp_input.c

Modified: head/sys/netinet/cc/cc_cdg.c
==
--- head/sys/netinet/cc/cc_cdg.cTue Jul 25 14:46:13 2017
(r321478)
+++ head/sys/netinet/cc/cc_cdg.cTue Jul 25 15:03:05 2017
(r321479)
@@ -474,9 +474,7 @@ cdg_cong_signal(struct cc_var *ccv, uint32_t signal_ty
ENTER_RECOVERY(CCV(ccv, t_flags));
break;
case CC_RTO:
-   CCV(ccv, snd_ssthresh) =
-   max((CCV(ccv, snd_max) - CCV(ccv, snd_una)) / 2 / mss, 2)
-   * mss;
+   CCV(ccv, snd_ssthresh) = max(2*mss, cwin/2);
CCV(ccv, snd_cwnd) = mss;
break;
default:

Modified: head/sys/netinet/cc/cc_chd.c
==
--- head/sys/netinet/cc/cc_chd.cTue Jul 25 14:46:13 2017
(r321478)
+++ head/sys/netinet/cc/cc_chd.cTue Jul 25 15:03:05 2017
(r321479)
@@ -330,11 +330,13 @@ chd_cong_signal(struct cc_var *ccv, uint32_t signal_ty
struct ertt *e_t;
struct chd *chd_data;
int qdly;
+   uint32_t cwin;
u_int mss;
 
e_t = khelp_get_osd(CCV(ccv, osd), ertt_id);
chd_data = ccv->cc_data;
qdly = imax(e_t->rtt, chd_data->maxrtt_in_rtt) - e_t->minrtt;
+   cwin = CCV(ccv, snd_cwnd);
mss = CCV(ccv, t_maxseg);
 
switch(signal_type) {
@@ -376,9 +378,7 @@ chd_cong_signal(struct cc_var *ccv, uint32_t signal_ty
ENTER_FASTRECOVERY(CCV(ccv, t_flags));
break;
case CC_RTO:
-   CCV(ccv, snd_ssthresh) =
-   max((CCV(ccv, snd_max) - CCV(ccv, snd_una)) / 2 / mss, 2)
-   * mss;
+   CCV(ccv, snd_ssthresh) = max(2*mss, cwin/2);
CCV(ccv, snd_cwnd) = mss;
break;
 

Modified: head/sys/netinet/cc/cc_dctcp.c
==
--- head/sys/netinet/cc/cc_dctcp.c  Tue Jul 25 14:46:13 2017
(r321478)
+++ head/sys/netinet/cc/cc_dctcp.c  Tue Jul 25 15:03:05 2017
(r321479)
@@ -230,21 +230,19 @@ static void
 dctcp_cong_signal(struct cc_var *ccv, uint32_t type)
 {
struct dctcp *dctcp_data;
-   uint32_t cwin, ssthresh_on_loss;
+   uint32_t cwin;
u_int mss;
 
dctcp_data = ccv->cc_data;
cwin = CCV(ccv, snd_cwnd);
mss = CCV(ccv, t_maxseg);
-   ssthresh_on_loss =
-   max((CCV(ccv, snd_max) - CCV(ccv, snd_una)) / 2 / mss, 2)
-   * mss;
 
switch (type) {
case CC_NDUPACK:
if (!IN_FASTRECOVERY(CCV(ccv, t_flags))) {
if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) {
-   CCV(ccv, snd_ssthresh) = ssthresh_on_loss;
+   CCV(ccv, snd_ssthresh) = mss *
+   max(cwin / 2 / mss, 2);
dctcp_data->num_cong_events++;
} else {
/* cwnd has already updated as congestion
@@ -252,7 +250,8 @@ dctcp_cong_signal(struct cc_var *ccv, uint32_t type)
 * snd_cwnd_prev and recalculate snd_ssthresh
 */
cwin = CCV(ccv, snd_cwnd_prev);
-   CCV(ccv, snd_ssthresh) = ssthresh_on_loss;
+   CCV(ccv, snd_ssthresh) =
+   max(cwin / 2 / mss, 2) * mss;
}
ENTER_RECOVERY(CCV(ccv, t_flags));
}
@@ -266,7 +265,8 @@ dctcp_cong_signal(struct cc_var *ccv, uint32_t type)
if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) {
if (V_dctcp_slowstart &&
dctcp_data->num_cong_events++ == 0) {
-   CCV(ccv, snd_ssthresh) = ssthresh_on_loss;
+   CCV(ccv, snd_ssthresh) =
+   mss * max(cwin / 2 / mss, 2);
dctcp_data->alpha = MAX_ALPHA_VALUE;
dctcp_data->bytes_ecn = 0;
dctcp_data->bytes_total = 0;
@@ -285,7 +285,7 @@ 

svn commit: r321477 - head/sys/net

2017-07-25 Thread Sean Bruno
Author: sbruno
Date: Tue Jul 25 14:41:50 2017
New Revision: 321477
URL: https://svnweb.freebsd.org/changeset/base/321477

Log:
  Don't hold the RM lock during lagg_proto_addport() to avoid an LOR.
  
  Submitted by: Kevin Bowling 
  Reviewed by:  mav
  MFC after:1 week
  Sponsored by: Limelight Networks
  Differential Revision:https://reviews.freebsd.org/D11711

Modified:
  head/sys/net/if_lagg.c

Modified: head/sys/net/if_lagg.c
==
--- head/sys/net/if_lagg.c  Tue Jul 25 14:38:30 2017(r321476)
+++ head/sys/net/if_lagg.c  Tue Jul 25 14:41:50 2017(r321477)
@@ -738,14 +738,15 @@ lagg_port_create(struct lagg_softc *sc, struct ifnet *
 
lagg_setmulti(lp);
 
+   LAGG_WUNLOCK(sc);
+
if ((error = lagg_proto_addport(sc, lp)) != 0) {
/* Remove the port, without calling pr_delport. */
+   LAGG_WLOCK(sc);
lagg_port_destroy(lp, 0);
LAGG_UNLOCK_ASSERT(sc);
return (error);
}
-
-   LAGG_WUNLOCK(sc);
 
/* Update lagg capabilities */
lagg_capabilities(sc);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321476 - head/sys/dev/ixgbe

2017-07-25 Thread Sean Bruno
Author: sbruno
Date: Tue Jul 25 14:38:30 2017
New Revision: 321476
URL: https://svnweb.freebsd.org/changeset/base/321476

Log:
  Drop ixgbe RX lock during TCP_LRO processing.  This eliminates a "storm"
  of LOR detection and a bit of lock release/acquire collision when using LRO.
  
  Submitted by:   Kevin Bowling 
  MFC after:  2 days
  Differential Revision:  https://reviews.freebsd.org/D11712

Modified:
  head/sys/dev/ixgbe/ix_txrx.c

Modified: head/sys/dev/ixgbe/ix_txrx.c
==
--- head/sys/dev/ixgbe/ix_txrx.cTue Jul 25 14:35:44 2017
(r321475)
+++ head/sys/dev/ixgbe/ix_txrx.cTue Jul 25 14:38:30 2017
(r321476)
@@ -1593,9 +1593,7 @@ ixgbe_rx_input(struct rx_ring *rxr, struct ifnet *ifp,
if (tcp_lro_rx(>lro, m, 0) == 0)
return;
}
-   IXGBE_RX_UNLOCK(rxr);
(*ifp->if_input)(ifp, m);
-   IXGBE_RX_LOCK(rxr);
 } /* ixgbe_rx_input */
 
 /
@@ -1880,7 +1878,9 @@ next_desc:
/* Now send to the stack or do LRO */
if (sendmp != NULL) {
rxr->next_to_check = i;
+   IXGBE_RX_UNLOCK(rxr);
ixgbe_rx_input(rxr, ifp, sendmp, ptype);
+   IXGBE_RX_LOCK(rxr);
i = rxr->next_to_check;
}
 
@@ -1897,12 +1897,12 @@ next_desc:
 
rxr->next_to_check = i;
 
+   IXGBE_RX_UNLOCK(rxr);
+
/*
 * Flush any outstanding LRO work
 */
tcp_lro_flush_all(lro);
-
-   IXGBE_RX_UNLOCK(rxr);
 
/*
 * Still have cleaning to do?
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321472 - head/cddl/usr.sbin/dtrace/tests/tools

2017-07-25 Thread Li-Wen Hsu
Author: lwhsu (ports committer)
Date: Tue Jul 25 13:18:28 2017
New Revision: 321472
URL: https://svnweb.freebsd.org/changeset/base/321472

Log:
  The test case common.funcs.t_dtrace_contrib.tst_basename_d generates a
  verifying script which needs being run to complete the test.
  
  While here, add missing shebang.
  
  Reviewed by:  gnn, markj, ngie
  Differential Revision:https://reviews.freebsd.org/D11716

Modified:
  head/cddl/usr.sbin/dtrace/tests/tools/dtest.sh

Modified: head/cddl/usr.sbin/dtrace/tests/tools/dtest.sh
==
--- head/cddl/usr.sbin/dtrace/tests/tools/dtest.sh  Tue Jul 25 13:17:06 
2017(r321471)
+++ head/cddl/usr.sbin/dtrace/tests/tools/dtest.sh  Tue Jul 25 13:18:28 
2017(r321472)
@@ -1,3 +1,5 @@
+#!/bin/sh
+
 # $FreeBSD$
 
 usage()
@@ -83,6 +85,12 @@ runtest()
 retval=1
 ;;
 esac
+
+if [ $retval -eq 0 ] && \
+head -n 1 $STDOUT | grep -q -E '^#!/.*ksh$'; then
+ksh $STDOUT
+retval=$?
+fi
 
 return $retval
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321471 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2017-07-25 Thread Andriy Gapon
Author: avg
Date: Tue Jul 25 13:17:06 2017
New Revision: 321471
URL: https://svnweb.freebsd.org/changeset/base/321471

Log:
  spa_import_rootpool should be able to handle an imported root pool
  
  That is required to support reboot -r with a new root filesystem being
  on an already imported pool.
  
  PR:   210721
  Reported by:  Jan Bramkamp 
  MFC after:2 weeks

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Tue Jul 25 
13:14:02 2017(r321470)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Tue Jul 25 
13:17:06 2017(r321471)
@@ -4270,6 +4270,16 @@ spa_import_rootpool(const char *name)
 
if ((spa = spa_lookup(pname)) != NULL) {
/*
+* The pool could already be imported,
+* e.g., after reboot -r.
+*/
+   if (spa->spa_state == POOL_STATE_ACTIVE) {
+   mutex_exit(_namespace_lock);
+   nvlist_free(config);
+   return (0);
+   }
+
+   /*
 * Remove the existing root pool from the namespace so
 * that we can replace it with the correct config
 * we just read in.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321470 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc

2017-07-25 Thread Li-Wen Hsu
Author: lwhsu (ports committer)
Date: Tue Jul 25 13:14:02 2017
New Revision: 321470
URL: https://svnweb.freebsd.org/changeset/base/321470

Log:
  Modify glob patterns and expected output to match FreeBSD's implementation.
  
  Reviewed by:  gnn, markj, ngie
  Differential Revision:https://reviews.freebsd.org/D11713

Modified:
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh
==
--- 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh 
Tue Jul 25 13:11:20 2017(r321469)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh 
Tue Jul 25 13:14:02 2017(r321470)
@@ -31,11 +31,12 @@ fi
 
 dtrace=$1
 
-$dtrace -ln 'syscall::*$1:entry' read | awk '{print $(NF-1),$NF}' | sort
-$dtrace -ln 'syscall::$1*:entry' read | awk '{print $(NF-1),$NF}' | sort
-$dtrace -ln 'syscall::re$1*:entry' ad | awk '{print $(NF-1),$NF}' | sort
-$dtrace -ln 'syscall::$1l*:entry' read | awk '{print $(NF-1),$NF}' | sort
-$dtrace -ln 'syscall::p$1[0-9][0-9]:entry' read | awk '{print $(NF-1),$NF}' | \
- sort
+$dtrace -ln 'syscall:freebsd:*$1:entry' read | \
+   awk '{print $(NF-1),$NF}' | grep -v -E 'compat.\.' | sort
+$dtrace -ln 'syscall:freebsd:$1*:entry' read | awk '{print $(NF-1),$NF}' | sort
+$dtrace -ln 'syscall:freebsd:re$1*:entry' ad | awk '{print $(NF-1),$NF}' | sort
+$dtrace -ln 'syscall:freebsd:$1l*:entry' read | awk '{print $(NF-1),$NF}' | 
sort
+$dtrace -ln 'syscall:freebsd:w$1[0-9]:entry' ait | \
+   awk '{print $(NF-1),$NF}' | sort
 
 exit $status

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out
==
--- 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out
 Tue Jul 25 13:11:20 2017(r321469)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out
 Tue Jul 25 13:14:02 2017(r321470)
@@ -1,15 +1,22 @@
 FUNCTION NAME
+aio_read entry
+obs_vread entry
 pread entry
 read entry
+rtprio_thread entry
 FUNCTION NAME
 read entry
 readlink entry
+readlinkat entry
 readv entry
 FUNCTION NAME
 read entry
 readlink entry
+readlinkat entry
 readv entry
 FUNCTION NAME
 readlink entry
+readlinkat entry
 FUNCTION NAME
-pread64 entry
+wait4 entry
+wait6 entry
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321469 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs

2017-07-25 Thread Li-Wen Hsu
Author: lwhsu (ports committer)
Date: Tue Jul 25 13:11:20 2017
New Revision: 321469
URL: https://svnweb.freebsd.org/changeset/base/321469

Log:
  Make this test case accepts basename() in D script returns "" or "."
  
  In Solaris, basename(1) and basename(3) both return "." while being given an
  empty string (""), while in BSD (and Linux) basename(1) returns "" and
  basename(3) returns "."
  
  While here, also change #!/usr/bin/ksh to #!/usr/bin/env ksh to find ksh in
  $PATH
  
  Reviewed by:  gnn, markj (earlier version), ngie (earlier version)
  Differential Revision:https://reviews.freebsd.org/D11707

Modified:
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d.out

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d
==
--- 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d   
Tue Jul 25 13:07:06 2017(r321468)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d   
Tue Jul 25 13:11:20 2017(r321469)
@@ -55,12 +55,16 @@ BEGIN
dir[i++] = "f";
dir[i++] = "f/";
dir[i++] = "/";
+   /*
+* basename(3) and basename(1) return different results for the empty
+* string on FreeBSD, so we need special handling.
dir[i++] = "";
+   */
 
end = i;
i = 0;
 
-   printf("#!/usr/bin/ksh\n\n");
+   printf("#!/usr/bin/env ksh\n\n");
 }
 
 tick-1ms
@@ -84,5 +88,19 @@ tick-1ms
 tick-1ms
 /i == end/
 {
+   dir[i] = "";
+   printf("if [ \"`basename \"%s\"`\" != \"%s\" -a \".\" != \"%s\" ]; 
then\n",
+   dir[i], basename(dir[i]), basename(dir[i]));
+   printf("echo \"basename(\\\"%s\\\") is \\\"%s\\\"; ",
+   dir[i], basename(dir[i]));
+   printf("expected \\\"`basename \"%s\"`\\\" or \\\".\\\"\"\n", dir[i]);
+   printf("fi\n\n");
+   printf("if [ `dirname \"%s\"` != \"%s\" ]; then\n",
+   dir[i], dirname(dir[i]));
+   printf("echo \"dirname(\\\"%s\\\") is \\\"%s\\\"; ",
+   dir[i], dirname(dir[i]));
+   printf("expected \\\"`dirname \"%s\"`\"\\\"\n", dir[i]);
+   printf("fi\n\n");
+
exit(0);
 }

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d.out
==
--- 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d.out
   Tue Jul 25 13:07:06 2017(r321468)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d.out
   Tue Jul 25 13:11:20 2017(r321469)
@@ -1,4 +1,4 @@
-#!/usr/bin/ksh
+#!/usr/bin/env ksh
 
 if [ `basename "/foo/bar/baz"` != "baz" ]; then
echo "basename(\"/foo/bar/baz\") is \"baz\"; expected \"`basename 
"/foo/bar/baz"`"\"
@@ -152,8 +152,8 @@ if [ `dirname "/"` != "/" ]; then
echo "dirname(\"/\") is \"/\"; expected \"`dirname "/"`"\"
 fi
 
-if [ `basename ""` != "." ]; then
-   echo "basename(\"\") is \".\"; expected \"`basename ""`"\"
+if [ "`basename ""`" != "." -a "." != "." ]; then
+   echo "basename(\"\") is \".\"; expected \"`basename ""`\" or \".\""
 fi
 
 if [ `dirname ""` != "." ]; then
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321468 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs

2017-07-25 Thread Li-Wen Hsu
Author: lwhsu (ports committer)
Date: Tue Jul 25 13:07:06 2017
New Revision: 321468
URL: https://svnweb.freebsd.org/changeset/base/321468

Log:
  Explicitly set dynamic variable buffer size.
  
  We added too many variable assignments in BEGIN block, which will run out of
  default auto-configured variable buffer space.  The test VM has 4G RAM which
  should be enough for most cases so it's reasonable to increase limitation to
  these case.
  
  Reviewed by:  gnn
  Differential Revision:https://reviews.freebsd.org/D11676

Modified:
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d
==
--- 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d   
Tue Jul 25 13:04:24 2017(r321467)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d   
Tue Jul 25 13:07:06 2017(r321468)
@@ -27,6 +27,7 @@
 #pragma ident  "%Z%%M% %I% %E% SMI"
 
 #pragma D option quiet
+#pragma D option dynvarsize=2m
 
 /*
  * This test verifies that the basename() and dirname() functions are working
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321467 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs

2017-07-25 Thread Li-Wen Hsu
Author: lwhsu (ports committer)
Date: Tue Jul 25 13:04:24 2017
New Revision: 321467
URL: https://svnweb.freebsd.org/changeset/base/321467

Log:
  Explicitly set dynamic variable buffer size.
  
  We added too many variable assignments in BEGIN block, which will run out of
  default auto-configured variable buffer space.  The test VM has 4G RAM which
  should be enough for most cases so it's reasonable to increase limitation to
  these case.
  
  Reviewed by:  gnn, markj, ngie
  Differential Revision:https://reviews.freebsd.org/D11674

Modified:
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.cleanpath.d

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.cleanpath.d
==
--- 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.cleanpath.d  
Tue Jul 25 13:01:10 2017(r321466)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.cleanpath.d  
Tue Jul 25 13:04:24 2017(r321467)
@@ -27,6 +27,7 @@
 #pragma ident  "%Z%%M% %I% %E% SMI"
 
 #pragma D option quiet
+#pragma D option dynvarsize=2m
 
 BEGIN
 {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321466 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil

2017-07-25 Thread Li-Wen Hsu
Author: lwhsu (ports committer)
Date: Tue Jul 25 13:01:10 2017
New Revision: 321466
URL: https://svnweb.freebsd.org/changeset/base/321466

Log:
  Add an auxiliary subroutine to generate read(2) event while testing.
  
  Reviewed by:  gnn, ngie
  Differential Revision:https://reviews.freebsd.org/D11673

Modified:
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh
==
--- 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh
  Tue Jul 25 12:58:03 2017(r321465)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh
  Tue Jul 25 13:01:10 2017(r321466)
@@ -38,6 +38,14 @@
 ##
 
 
+reader()
+{
+   while true
+   do
+   sleep 0.1
+   cat /etc/motd > /dev/null
+   done
+}
 
 if [ $# != 1 ]; then
echo expected one argument: '<'dtrace-path'>'
@@ -46,11 +54,16 @@ fi
 
 dtrace=$1
 
+reader &
+child=$!
+
 $dtrace -qwf read'{chill(15); printf("Done chilling"); exit(0);}'
 status=$?
 
 if [ "$status" -ne 0 ]; then
echo $tst: dtrace failed
 fi
+
+kill $child
 
 exit $status
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321465 - in head/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/speculation usr.sbin/dtrace/tests/common/speculation

2017-07-25 Thread Li-Wen Hsu
Author: lwhsu (ports committer)
Date: Tue Jul 25 12:58:03 2017
New Revision: 321465
URL: https://svnweb.freebsd.org/changeset/base/321465

Log:
  Add a simple script which calls open(2) and others to generate events for
  testing.
  
  This test times-out on a quiet system because there is nobody triggers
  syscall::open:entry or syscall::: probe while test execution.
  
  Reviewed by:  gnn, markj (earlier version)
  Differential Revision:https://reviews.freebsd.org/D11671

Added:
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe
   (contents, props changed)
Modified:
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.d
  head/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.d
==
--- 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.d
 Tue Jul 25 12:52:32 2017(r321464)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.d
 Tue Jul 25 12:58:03 2017(r321465)
@@ -39,6 +39,7 @@
 BEGIN
 {
i = 0;
+   notused = $1;
 }
 
 syscall::open:entry

Added: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe
   Tue Jul 25 12:58:03 2017(r321465)
@@ -0,0 +1,30 @@
+#!/usr/bin/env ksh
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2017 Li-Wen Hsu 
+
+while true
+do
+   sleep 0.1
+   cat /etc/motd > /dev/null
+done

Modified: head/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile
==
--- head/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile Tue Jul 25 
12:52:32 2017(r321464)
+++ head/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile Tue Jul 25 
12:58:03 2017(r321465)
@@ -68,6 +68,7 @@ ${PACKAGE}FILES= \
  tst.zerosize.d  \
 
 TESTEXES= \
+ tst.NoSpecBuffer.exe  \
 
 
 CFILES= \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321464 - in head/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/probes usr.sbin/dtrace/tests/common/probes

2017-07-25 Thread Li-Wen Hsu
Author: lwhsu (ports committer)
Date: Tue Jul 25 12:52:32 2017
New Revision: 321464
URL: https://svnweb.freebsd.org/changeset/base/321464

Log:
  Add a simple program which calls sigtimedwait(2) to generate events for 
testing
  
  This test timeout on a quiet system because there is nobody triggers
  'syscall::*wait*:entry' probe while test execution.
  
  Reviewed by:  gnn, markj, ngie
  Differential Revision:https://reviews.freebsd.org/D11668

Added:
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.c 
  (contents, props changed)
Modified:
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.d
  head/cddl/usr.sbin/dtrace/tests/common/probes/Makefile

Added: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.c 
Tue Jul 25 12:52:32 2017(r321464)
@@ -0,0 +1,47 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2017 Li-Wen Hsu 
+ */
+
+#include 
+#include 
+#include 
+
+int
+main(void)
+{
+
+sigset_t set;
+siginfo_t info;
+struct timespec timeout;
+
+(void)sigemptyset();
+(void)sigaddset(, SIGHUP);
+timeout.tv_sec = 1;
+timeout.tv_nsec = 0;
+
+for (;;)
+(void)sigtimedwait(, , );
+
+return (0);
+}

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.d
==
--- 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.d 
Tue Jul 25 11:05:53 2017(r321463)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.d 
Tue Jul 25 12:52:32 2017(r321464)
@@ -45,6 +45,7 @@ BEGIN
 }
 
 syscall::*wait*:entry
+/pid == $1/
 {
exit(0);
 }

Modified: head/cddl/usr.sbin/dtrace/tests/common/probes/Makefile
==
--- head/cddl/usr.sbin/dtrace/tests/common/probes/Makefile  Tue Jul 25 
11:05:53 2017(r321463)
+++ head/cddl/usr.sbin/dtrace/tests/common/probes/Makefile  Tue Jul 25 
12:52:32 2017(r321464)
@@ -32,6 +32,7 @@ TESTEXES= \
 
 
 CFILES= \
+ tst.probestar.c  \
 
 
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321463 - head/sys/netinet

2017-07-25 Thread Michael Tuexen
Author: tuexen
Date: Tue Jul 25 11:05:53 2017
New Revision: 321463
URL: https://svnweb.freebsd.org/changeset/base/321463

Log:
  Remove duplicate statement.

Modified:
  head/sys/netinet/sctp_indata.c

Modified: head/sys/netinet/sctp_indata.c
==
--- head/sys/netinet/sctp_indata.c  Tue Jul 25 10:41:34 2017
(r321462)
+++ head/sys/netinet/sctp_indata.c  Tue Jul 25 11:05:53 2017
(r321463)
@@ -2074,7 +2074,6 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struc
struct mbuf *mm;
 
control->data = dmbuf;
-   mm = control->data;
for (mm = control->data; mm; mm = mm->m_next) {
control->length += SCTP_BUF_LEN(mm);
}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321462 - head/share/mk

2017-07-25 Thread Andrew Turner
Author: andrew
Date: Tue Jul 25 10:41:34 2017
New Revision: 321462
URL: https://svnweb.freebsd.org/changeset/base/321462

Log:
  Build the 32-bit ARM libstand and loader parts with -fPIC. Many of them are
  already built with this flag so libstand should also be build as such.
  This will be needed when moving to lld as it refuses to link due to
  incompatible relocations.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/share/mk/bsd.stand.mk

Modified: head/share/mk/bsd.stand.mk
==
--- head/share/mk/bsd.stand.mk  Tue Jul 25 09:48:33 2017(r321461)
+++ head/share/mk/bsd.stand.mk  Tue Jul 25 10:41:34 2017(r321462)
@@ -21,6 +21,9 @@ CFLAGS+=  -fPIC -mno-red-zone
 .if ${MACHINE_CPUARCH} == "aarch64"
 CFLAGS+=   -fPIC -mgeneral-regs-only
 .endif
+.if ${MACHINE_CPUARCH} == "arm"
+CFLAGS+=   -fPIC
+.endif
 .if ${MACHINE_CPUARCH} == "mips"
 CFLAGS+=   -G0 -fno-pic -mno-abicalls
 .endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321461 - head/lib/libc/x86/sys

2017-07-25 Thread Konstantin Belousov
Author: kib
Date: Tue Jul 25 09:48:33 2017
New Revision: 321461
URL: https://svnweb.freebsd.org/changeset/base/321461

Log:
  Fix indent.
  
  Sponsored by: The FreeBSD Foundation
  MFC after:3 days

Modified:
  head/lib/libc/x86/sys/__vdso_gettc.c

Modified: head/lib/libc/x86/sys/__vdso_gettc.c
==
--- head/lib/libc/x86/sys/__vdso_gettc.cTue Jul 25 06:59:35 2017
(r321460)
+++ head/lib/libc/x86/sys/__vdso_gettc.cTue Jul 25 09:48:33 2017
(r321461)
@@ -158,7 +158,7 @@ __vdso_init_hpet(uint32_t u)
if (atomic_cmpset_rel_ptr((volatile uintptr_t *)_dev_map[u],
(uintptr_t)old_map, (uintptr_t)new_map) == 0 &&
new_map != MAP_FAILED)
-   munmap((void *)new_map, PAGE_SIZE);
+   munmap((void *)new_map, PAGE_SIZE);
 
return;
 fail:
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321460 - head/sys/fs/fdescfs

2017-07-25 Thread Dmitry Chagin
Author: dchagin
Date: Tue Jul 25 06:59:35 2017
New Revision: 321460
URL: https://svnweb.freebsd.org/changeset/base/321460

Log:
  Replace unnecessary _KERNEL by double-include protection.
  
  MFC after:2 week

Modified:
  head/sys/fs/fdescfs/fdesc.h

Modified: head/sys/fs/fdescfs/fdesc.h
==
--- head/sys/fs/fdescfs/fdesc.h Tue Jul 25 04:13:43 2017(r321459)
+++ head/sys/fs/fdescfs/fdesc.h Tue Jul 25 06:59:35 2017(r321460)
@@ -34,7 +34,9 @@
  * $FreeBSD$
  */
 
-#ifdef _KERNEL
+#ifndef _FS_FDESC_H_
+#define _FS_FDESC_H_
+
 /* Private mount flags for fdescfs. */
 #define FMNT_UNMOUNTF 0x01
 struct fdescmount {
@@ -66,4 +68,4 @@ extern vfs_init_t fdesc_init;
 extern vfs_uninit_t fdesc_uninit;
 extern int fdesc_allocvp(fdntype, unsigned, int, struct mount *,
 struct vnode **);
-#endif /* _KERNEL */
+#endif /* !_FS_FDESC_H_ */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"