diff mbox

[1/2] linux-generic/odp_packet_socket.c: Add intalization

Message ID 1408999731-35261-1-git-send-email-mike.holmes@linaro.org
State Accepted
Commit 3422f64c4aa248d21c9b13e05b63ca055b9fa25e
Headers show

Commit Message

Mike Holmes Aug. 25, 2014, 8:48 p.m. UTC
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 platform/linux-generic/odp_packet_socket.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Mike Holmes Aug. 28, 2014, 6:26 p.m. UTC | #1
ping


On 25 August 2014 16:48, Mike Holmes <mike.holmes@linaro.org> wrote:

> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
> ---
>  platform/linux-generic/odp_packet_socket.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/platform/linux-generic/odp_packet_socket.c
> b/platform/linux-generic/odp_packet_socket.c
> index d44c333..e7e82c1 100644
> --- a/platform/linux-generic/odp_packet_socket.c
> +++ b/platform/linux-generic/odp_packet_socket.c
> @@ -255,6 +255,14 @@ int recv_pkt_sock_basic(pkt_sock_t *const pkt_sock,
>         uint8_t *l2_hdr;
>         int nb_rx = 0;
>
> +       /*  recvfrom:
> +        *  If the address argument is not a null pointer
> +        *  and the protocol does not provide the source address of
> +        *  messages, the the value stored in the object pointed to
> +        *  by address is unspecified.
> +        */
> +       memset(&sll, 0, sizeof(sll));
> +
>         for (i = 0; i < len; i++) {
>                 if (odp_likely(pkt == ODP_PACKET_INVALID)) {
>                         pkt = odp_packet_alloc(pkt_sock->pool);
> --
> 1.9.1
>
>
Maxim Uvarov Aug. 28, 2014, 8:20 p.m. UTC | #2
Change looks good. Patch-set approved.

Thanks,
Maxim.

On 08/26/2014 12:48 AM, Mike Holmes wrote:
> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
> ---
>   platform/linux-generic/odp_packet_socket.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
>
> diff --git a/platform/linux-generic/odp_packet_socket.c b/platform/linux-generic/odp_packet_socket.c
> index d44c333..e7e82c1 100644
> --- a/platform/linux-generic/odp_packet_socket.c
> +++ b/platform/linux-generic/odp_packet_socket.c
> @@ -255,6 +255,14 @@ int recv_pkt_sock_basic(pkt_sock_t *const pkt_sock,
>   	uint8_t *l2_hdr;
>   	int nb_rx = 0;
>   
> +	/*  recvfrom:
> +	 *  If the address argument is not a null pointer
> +	 *  and the protocol does not provide the source address of
> +	 *  messages, the the value stored in the object pointed to
> +	 *  by address is unspecified.
> +	 */
> +	memset(&sll, 0, sizeof(sll));
> +
>   	for (i = 0; i < len; i++) {
>   		if (odp_likely(pkt == ODP_PACKET_INVALID)) {
>   			pkt = odp_packet_alloc(pkt_sock->pool);
Maxim Uvarov Aug. 28, 2014, 8:20 p.m. UTC | #3
On 08/29/2014 12:20 AM, Maxim Uvarov wrote:
> Change looks good. Patch-set approved.
i.e. applied :)
>
> Thanks,
> Maxim.
>
> On 08/26/2014 12:48 AM, Mike Holmes wrote:
>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
>> ---
>>   platform/linux-generic/odp_packet_socket.c | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/platform/linux-generic/odp_packet_socket.c 
>> b/platform/linux-generic/odp_packet_socket.c
>> index d44c333..e7e82c1 100644
>> --- a/platform/linux-generic/odp_packet_socket.c
>> +++ b/platform/linux-generic/odp_packet_socket.c
>> @@ -255,6 +255,14 @@ int recv_pkt_sock_basic(pkt_sock_t *const pkt_sock,
>>       uint8_t *l2_hdr;
>>       int nb_rx = 0;
>>   +    /*  recvfrom:
>> +     *  If the address argument is not a null pointer
>> +     *  and the protocol does not provide the source address of
>> +     *  messages, the the value stored in the object pointed to
>> +     *  by address is unspecified.
>> +     */
>> +    memset(&sll, 0, sizeof(sll));
>> +
>>       for (i = 0; i < len; i++) {
>>           if (odp_likely(pkt == ODP_PACKET_INVALID)) {
>>               pkt = odp_packet_alloc(pkt_sock->pool);
>
diff mbox

Patch

diff --git a/platform/linux-generic/odp_packet_socket.c b/platform/linux-generic/odp_packet_socket.c
index d44c333..e7e82c1 100644
--- a/platform/linux-generic/odp_packet_socket.c
+++ b/platform/linux-generic/odp_packet_socket.c
@@ -255,6 +255,14 @@  int recv_pkt_sock_basic(pkt_sock_t *const pkt_sock,
 	uint8_t *l2_hdr;
 	int nb_rx = 0;
 
+	/*  recvfrom:
+	 *  If the address argument is not a null pointer
+	 *  and the protocol does not provide the source address of
+	 *  messages, the the value stored in the object pointed to
+	 *  by address is unspecified.
+	 */
+	memset(&sll, 0, sizeof(sll));
+
 	for (i = 0; i < len; i++) {
 		if (odp_likely(pkt == ODP_PACKET_INVALID)) {
 			pkt = odp_packet_alloc(pkt_sock->pool);