mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Jan-Bernd Themann <ossthema@de.ibm.com>
Cc: netdev <netdev@vger.kernel.org>,
	Christoph Raisch <raisch@de.ibm.com>,
	Jan-Bernd Themann <themann@de.ibm.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-ppc <linuxppc-dev@ozlabs.org>,
	Marcus Eder <meder@de.ibm.com>, Thomas Klein <tklein@de.ibm.com>,
	Stefan Roscher <stefan.roscher@de.ibm.com>,
	David Miller <davem@davemloft.net>
Subject: Re: [RFC 1/1] lro: Generic Large Receive Offload for TCP traffic
Date: Mon, 23 Jul 2007 14:38:32 +0400	[thread overview]
Message-ID: <20070723103832.GB22877@2ka.mipt.ru> (raw)
In-Reply-To: <200707201741.49290.ossthema@de.ibm.com>

Hi Jan-Bernd.

On Fri, Jul 20, 2007 at 05:41:48PM +0200, Jan-Bernd Themann (ossthema@de.ibm.com) wrote:
> Generic LRO patch
> 
> Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>

Besides couple trivial codyng/formatting nits I did not found any
problematic places after review. Details below.

Thanks.

> +#define TCP_PAYLOAD_LENGTH(iph, tcph) \
> +(ntohs(iph->tot_len) - IP_HDR_LEN(iph) - TCP_HDR_LEN(tcph))

A tab?

> +static void lro_add_common(struct net_lro_desc *lro_desc, struct iphdr *iph,
> +			   struct tcphdr *tcph, int tcp_data_len)
> +{
> +	struct sk_buff *parent = lro_desc->parent;
> +	u32 *topt;
> +
> +	lro_desc->pkt_aggr_cnt++;
> +	lro_desc->ip_tot_len += tcp_data_len;
> +	lro_desc->tcp_next_seq += tcp_data_len;
> +	lro_desc->tcp_window = tcph->window;
> +	lro_desc->tcp_ack = tcph->ack_seq;
> +
> +	/* don't update tcp_rcv_tsval, would not work with PAWS */
> +	if (lro_desc->tcp_saw_tstamp) {
> +		topt = (u32 *) (tcph + 1);
> +		lro_desc->tcp_rcv_tsecr = *(topt + 2);
> +	}
> +
> +	parent->len += tcp_data_len;
> +	parent->data_len += tcp_data_len;
> +
> +	lro_desc->data_csum = csum_add(lro_desc->data_csum,
> +				       lro_tcp_data_csum(iph, tcph,
> +							 tcp_data_len));
> +	return;
> +}

return from void? And in other places too.

> +int __lro_proc_skb(struct net_lro_mgr *lro_mgr, struct sk_buff *skb,
> +		   struct vlan_group *vgrp, u16 vlan_tag, void *priv)
> +{
> +	struct net_lro_desc *lro_desc;
> +        struct iphdr *iph;
> +        struct tcphdr *tcph;
> +	u64 flags;

Broken tab and spaces.

> +struct sk_buff *lro_gen_skb(struct net_lro_mgr *lro_mgr,
> +			    struct skb_frag_struct *frags,
> +			    int len, int true_size,
> +			    void *mac_hdr,
> +			    int hlen)
> +{
> +	struct sk_buff *skb;
> +        struct skb_frag_struct *skb_frags;
> +	int data_len = len;

The same.

> +	skb = netdev_alloc_skb(lro_mgr->dev, hlen);
> +	if (!skb)
> +		return NULL;
> +
> +        skb->len = len;
> +	skb->data_len = len - hlen;

Here too.
There is number of such places, ommitted others.


-- 
	Evgeniy Polyakov

      parent reply	other threads:[~2007-07-23 10:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-20 15:41 Jan-Bernd Themann
2007-07-22  2:29 ` David Miller
2007-07-23 10:38 ` Evgeniy Polyakov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070723103832.GB22877@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=meder@de.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=ossthema@de.ibm.com \
    --cc=raisch@de.ibm.com \
    --cc=stefan.roscher@de.ibm.com \
    --cc=themann@de.ibm.com \
    --cc=tklein@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®