From: Byungho An <bh74.an@samsung.com>
To: 'Rayagond Kokatanur' <rayagond@vayavyalabs.com>
Cc: 'netdev' <netdev@vger.kernel.org>,
linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org,
'David Miller' <davem@davemloft.net>,
"'ks.giri'" <ks.giri@samsung.com>,
"'siva.kallam'" <siva.kallam@samsung.com>,
"'vipul.pandya'" <vipul.pandya@samsung.com>,
"'ilho215.lee'" <ilho215.lee@samsung.com>
Subject: RE: [PATCH V6 3/8] net: sxgbe: add TSO support for Samsung sxgbe
Date: Wed, 19 Mar 2014 11:29:40 -0700 [thread overview]
Message-ID: <00aa01cf43a1$32ec0d00$98c42700$@samsung.com> (raw)
In-Reply-To: <CAJ3bTp6BSD5qCJEVJX36Xd=-oX6oDkmTXA2NK42g7zUj6dJgjA@mail.gmail.com>
Rayagond Kokatanur <rayagond@vayavyalabs.com> wrote:
> On Wed, Mar 19, 2014 at 11:02 AM, Byungho An <bh74.an@samsung.com> wrote:
[snip]
> >
> > /* save the skb address */
> > tqueue->tx_skbuff[entry] = skb;
> >
> > if (!is_jumbo) {
> > - tx_desc->tdes01 = dma_map_single(priv->device, skb->data,
> > - no_pagedlen,
DMA_TO_DEVICE);
> > - if (dma_mapping_error(priv->device, tx_desc->tdes01))
> > - pr_err("%s: TX dma mapping failed!!\n", __func__);
> > -
> > - priv->hw->desc->prepare_tx_desc(tx_desc, 1, no_pagedlen,
> > - no_pagedlen);
> > + if (likely(skb_is_gso(skb))) {
> > + /* TSO support */
> > + mss = skb_shinfo(skb)->gso_size;
> > +
> > + priv->hw->desc->tx_ctxt_desc_set_mss(ctxt_desc, mss);
>
> No need to issue context descriptor for every TSO packets. Program context
descriptor only if MSS value is value is changed compared
> to previous TSO packet MSS value. By this way we can reduce the one extra
descriptor fetch by device and improve the performance.
OK. This will be applied in the next post.
[snip]
> > @@ -1893,7 +1943,9 @@ struct sxgbe_priv_data *sxgbe_dvr_probe(struct
> > device *device,
> >
> > ndev->netdev_ops = &sxgbe_netdev_ops;
> >
> > - ndev->hw_features = NETIF_F_SG | NETIF_F_RXCSUM;
> > + ndev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM |
NETIF_F_IPV6_CSUM |
> > + NETIF_F_RXCSUM | NETIF_F_TSO | NETIF_F_TSO6 |
> > + NETIF_F_GRO;
>
> Enable TSO only if HW supports, hence we have to check for HW
feature/capability registers here also.
OK. Thanks
>
> > ndev->features |= ndev->hw_features | NETIF_F_HIGHDMA;
> > ndev->watchdog_timeo = msecs_to_jiffies(TX_TIMEO);
> >
> > @@ -1905,6 +1957,13 @@ struct sxgbe_priv_data *sxgbe_dvr_probe(struct
device *device,
> > if (flow_ctrl)
> > priv->flow_ctrl = SXGBE_FLOW_AUTO; /* RX/TX pause on
*/
> >
> > + /* Enable TCP segmentation offload for all DMA channels */
> > + if (priv->hw_cap.tcpseg_offload) {
> > + SXGBE_FOR_EACH_QUEUE(SXGBE_TX_QUEUES, queue_num) {
> > + priv->hw->dma->enable_tso(priv->ioaddr,
queue_num);
> > + }
> > + }
> > +
> > /* Rx Watchdog is available, enable depend on platform data */
> > if (!priv->plat->riwt_off) {
> > priv->use_riwt = 1;
> > --
> > 1.7.10.4
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe netdev" in
> > the body of a message to majordomo@vger.kernel.org More majordomo info
> > at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in the
body of a message to majordomo@vger.kernel.org More
> majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2014-03-19 18:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-19 5:32 [PATCH V6 3/8] net: sxgbe: add TSO support for Samsung sxgbe Byungho An
2014-03-19 6:11 ` Rayagond Kokatanur
2014-03-19 18:29 ` Byungho An [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='00aa01cf43a1$32ec0d00$98c42700$@samsung.com' \
--to=bh74.an@samsung.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=ilho215.lee@samsung.com \
--cc=ks.giri@samsung.com \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rayagond@vayavyalabs.com \
--cc=siva.kallam@samsung.com \
--cc=vipul.pandya@samsung.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;
as well as URLs for NNTP newsgroup(s).