Commit 0033f284 authored by Cedric Roux's avatar Cedric Roux

nr pdcp benchmarking: add skeleton optimized source files

Functions inside are to be filled with optimized versions of
ciphering and integrity. The program bench_optimized can be used
to test. (Note: other measures of computation time are possible,
this is just an example.)
parent f4c939eb
...@@ -4,9 +4,17 @@ CFLAGS=-Wall -g -I. ...@@ -4,9 +4,17 @@ CFLAGS=-Wall -g -I.
OBJS=bench.o nr_pdcp_entity.o nr_pdcp_integrity_nia2.o nr_pdcp_security_nea2.o \ OBJS=bench.o nr_pdcp_entity.o nr_pdcp_integrity_nia2.o nr_pdcp_security_nea2.o \
nr_pdcp_sdu.o nr_pdcp_sdu.o
OBJS_optimized=bench.o nr_pdcp_entity.o nr_pdcp_integrity_nia2_optimized.o \
nr_pdcp_security_nea2_optimized.o nr_pdcp_sdu.o
all: bench bench_optimized
bench: $(OBJS) bench: $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS) -lcrypto -lnettle $(CC) $(CFLAGS) -o $@ $(OBJS) -lcrypto -lnettle
bench_optimized: $(OBJS_optimized)
$(CC) $(CFLAGS) -o $@ $(OBJS_optimized) -lcrypto -lnettle
%.o: ../%.c %.o: ../%.c
$(CC) $(CFLAGS) -c -o $@ $< $(CC) $(CFLAGS) -c -o $@ $<
...@@ -14,4 +22,4 @@ bench: $(OBJS) ...@@ -14,4 +22,4 @@ bench: $(OBJS)
$(CC) $(CFLAGS) -c -o $@ $< $(CC) $(CFLAGS) -c -o $@ $<
clean: clean:
rm -f bench $(OBJS) rm -f bench $(OBJS) bench_optimized $(OBJS_optimized)
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "nr_pdcp_integrity_nia2.h"
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <openssl/cmac.h>
void *nr_pdcp_integrity_nia2_init(unsigned char *integrity_key)
{
return NULL;
}
void nr_pdcp_integrity_nia2_integrity(void *integrity_context,
unsigned char *out,
unsigned char *buffer, int length,
int bearer, int count, int direction)
{
}
void nr_pdcp_integrity_nia2_free_integrity(void *integrity_context)
{
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "nr_pdcp_security_nea2.h"
#include <stdlib.h>
#include <string.h>
#include <nettle/nettle-meta.h>
#include <nettle/aes.h>
#include <nettle/ctr.h>
void *nr_pdcp_security_nea2_init(unsigned char *ciphering_key)
{
return NULL;
}
void nr_pdcp_security_nea2_cipher(void *security_context,
unsigned char *buffer, int length,
int bearer, int count, int direction)
{
}
void nr_pdcp_security_nea2_free_security(void *security_context)
{
}
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