Commit 88102c10 authored by guruhegde's avatar guruhegde

Update fast_flows.c

* Add check for flow state NULL
parent 43210d6d
......@@ -79,7 +79,6 @@ void BatchMaker::createBatchedFormFnPrototype(vector<TASArgAttr> & BatchFuncArgL
void BatchMaker::replaceOldArgUsesWithBatchArgs(vector<TASArgAttr> & BatchFuncArgList,
AllocaInst * IdxPtr) {
auto EntryBB = &BatchFunc->front();
Builder.SetInsertPoint(&EntryBB->front());
SmallVector<Value *, 4> BatchArgs;
for_each(BatchFuncArgList.begin(), BatchFuncArgList.end(),
......@@ -87,6 +86,7 @@ void BatchMaker::replaceOldArgUsesWithBatchArgs(vector<TASArgAttr> & BatchFuncAr
if (Attr.IsBatch) BatchArgs.push_back(Attr.Val); });
for (auto & BatchArg : BatchArgs) {
Builder.SetInsertPoint(&EntryBB->front());
auto BatchArgAlloca = Builder.CreateAlloca(BatchArg->getType());
auto StoreI = findFirstUseInStoreInst(BatchArg);
......
......@@ -303,6 +303,9 @@ int fast_flows_packet(struct dataplane_context *ctx,
flow_id = fs - fp_state->flowst;
trigger_ack = 0, fin_bump = 0;
if (fs == NULL)
return -1;
tcp_extra_hlen = (TCPH_HDRLEN(&p->tcp) - 5) * 4;
payload_off = sizeof(*p) + tcp_extra_hlen;
payload_bytes =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment