Re: [PATCH net-next v3] Add support of Cavium Liquidio ethernet adapters
From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2014-12-19 07:14:11
From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2014-12-19 07:14:11
On Thu, 18 Dec 2014 19:25:19 -0800 Raghu Vatsavayi [off-list ref] wrote:
+static int liquidio_xmit(struct sk_buff *skb, struct net_device *netdev)
+{
+ struct lio *lio;
+ struct octnet_buf_free_info *finfo;
+ union octnic_cmd_setup cmdsetup;
+ struct octnic_data_pkt ndata;
+ struct octeon_device *oct;
+ int cpu = 0, status = 0;
+ int q_idx = 0;
+ int xmit_more;
+
+ lio = GET_LIO(netdev);
+ oct = lio->oct_dev;
+ atomic64_inc((atomic64_t *)&lio->stats.tx_packets);
+ lio->stats.tx_bytes += skb->len;
+
+ if (!ifstate_check(lio, LIO_IFSTATE_TXENABLED)) {
+ lio_info(lio, tx_err, "Transmit Busy, not enabled\n");
+ return NETDEV_TX_BUSY;
+ }This kind of busy handling in transmit, will cause the send in higher level to retry and spin the CPU. Better to do proper flow control like other drivers.