]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow: spelling
authorVictor Julien <vjulien@oisf.net>
Sat, 6 May 2023 04:53:20 +0000 (06:53 +0200)
committerVictor Julien <vjulien@oisf.net>
Sat, 6 May 2023 12:50:43 +0000 (14:50 +0200)
src/flow-hash.c
src/flow-manager.c
src/flow-timeout.c
src/flow.c
src/flow.h

index 1bac58a3ee617905bb8d0bd72df3ae2793523640..387adf0d6c232481850647bca6469f4eefb59246 100644 (file)
@@ -680,7 +680,7 @@ static Flow *FlowGetNew(ThreadVars *tv, FlowLookupStruct *fls, Packet *p)
     } else {
         /* flow has been recycled before it went into the spare queue */
 
-        /* flow is initialized (recylced) but *unlocked* */
+        /* flow is initialized (recycled) but *unlocked* */
     }
 
     FLOWLOCK_WRLOCK(f);
@@ -787,7 +787,7 @@ static inline bool FlowIsTimedOut(const Flow *f, const uint32_t sec, const bool
  * flow pointer. Then compares the packet with the found flow to see if it is
  * the flow we need. If it isn't, walk the list until the right flow is found.
  *
- * If the flow is not found or the bucket was emtpy, a new flow is taken from
+ * If the flow is not found or the bucket was empty, a new flow is taken from
  * the spare pool. The pool will alloc new flows as long as we stay within our
  * memcap limit.
  *
index 0756becbc9ee2143369421866e85dfdb85c738c8..4edde6a229ab0e11d5941ba7f5b63924973cb63a 100644 (file)
@@ -80,7 +80,7 @@ extern int run_mode;
 /** queue to pass flows to cleanup/log thread(s) */
 FlowQueue flow_recycle_q;
 
-/* multi flow mananger support */
+/* multi flow manager support */
 static uint32_t flowmgr_number = 1;
 /* atomic counter for flow managers, to assign instance id */
 SC_ATOMIC_DECLARE(uint32_t, flowmgr_cnt);
index b6f41364638f912f3aa2f87d4ecff5d81ed4ada4..9196c22dbef0fa3ac9f6e78be2d58129d15a3651 100644 (file)
@@ -361,7 +361,7 @@ void FlowForceReassemblyForFlow(Flow *f)
  * done are:
  * - code consistency
  * - silence complaining profilers
- * - allow us to aggressively check using debug valdation assertions
+ * - allow us to aggressively check using debug validation assertions
  * - be robust in case of future changes
  * - locking overhead if neglectable when no other thread fights us
  *
index 9d02ee3c2d16eae687e4fee45c6ea3f552872f03..8bb8d4a9e5452c078cee4d7d6fc86fae42f72efe 100644 (file)
@@ -81,7 +81,7 @@ SC_ATOMIC_DECLARE(FlowProtoTimeoutPtr, flow_timeouts);
 /** atomic int that is used when freeing a flow from the hash. In this
  *  case we walk the hash to find a flow to free. This var records where
  *  we left off in the hash. Without this only the top rows of the hash
- *  are freed. This isn't just about fairness. Under severe presure, the
+ *  are freed. This isn't just about fairness. Under severe pressure, the
  *  hash rows on top would be all freed and the time to find a flow to
  *  free increased with every run. */
 SC_ATOMIC_DECLARE(unsigned int, flow_prune_idx);
@@ -527,7 +527,7 @@ void FlowHandlePacketUpdate(Flow *f, Packet *p, ThreadVars *tv, DecodeThreadVars
 void FlowHandlePacket(ThreadVars *tv, FlowLookupStruct *fls, Packet *p)
 {
     /* Get this packet's flow from the hash. FlowHandlePacket() will setup
-     * a new flow if nescesary. If we get NULL, we're out of flow memory.
+     * a new flow if necessary. If we get NULL, we're out of flow memory.
      * The returned flow is locked. */
     Flow *f = FlowGetFlowFromHash(tv, fls, p, &p->flow);
     if (f == NULL)
@@ -1144,7 +1144,7 @@ int FlowSetProtoFreeFunc (uint8_t proto, void (*Free)(void *))
 /**
  *  \brief get 'disruption' flags: GAP/DEPTH/PASS
  *  \param f locked flow
- *  \param flags existing flags to be ammended
+ *  \param flags existing flags to be amended
  *  \retval flags original flags + disrupt flags (if any)
  *  \TODO handle UDP
  */
@@ -1188,7 +1188,7 @@ void FlowUpdateState(Flow *f, const enum FlowState s)
 #ifdef UNITTESTS
     if (f->fb != NULL) {
 #endif
-        /* and reset the flow bucket's next_ts value so that the flow manager
+        /* and reset the flow bucket next_ts value so that the flow manager
          * has to revisit this row */
         SC_ATOMIC_SET(f->fb->next_ts, 0);
 #ifdef UNITTESTS
index c0a91e5f11a66e4707e35b2fcdfaa4b63463d29a..291edce3e3c8bba6ac6eac2f7036deed04ed0fac 100644 (file)
@@ -549,7 +549,7 @@ typedef struct FlowLookupStruct_ // TODO name
 } FlowLookupStruct;
 
 /** \brief prepare packet for a life with flow
- *  Set PKT_WANTS_FLOW flag to incidate workers should do a flow lookup
+ *  Set PKT_WANTS_FLOW flag to indicate workers should do a flow lookup
  *  and calc the hash value to be used in the lookup and autofp flow
  *  balancing. */
 void FlowSetupPacket(Packet *p);
@@ -668,7 +668,7 @@ static inline int64_t FlowGetId(const Flow *f)
 {
     int64_t id = (uint64_t)(SCTIME_SECS(f->startts) & 0x0000FFFF) << 48 |
                  (uint64_t)(SCTIME_USECS(f->startts) & 0x0000FFFF) << 32 | (int64_t)f->flow_hash;
-    /* reduce to 51 bits as Javascript and even JSON often seem to
+    /* reduce to 51 bits as JavaScript and even JSON often seem to
      * max out there. */
     id &= 0x7ffffffffffffLL;
     return id;