天下无双,专注网络


  • 首页

  • 分类

  • 关于

  • 归档

  • 标签

  • 公益404

如何使用hexo

发表于 2017-09-13

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

Hello World

发表于 2017-09-13

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

solution of "git send-email is not a git command"

发表于 2017-04-16

On ubuntu system, when run “git send-email”, the system will reply that:

git: 'send-email' is not a git command. See 'git --help'.

the solution will be follow:

sudo apt install git-email

i40e probe

发表于 2016-12-12

i40evf Analysize

发表于 2016-12-05

The function interface

i40evf_init_module
    |-->create_singlethread_workqueue(i40evf_driver_name);
    |-->pci_register_driver(&i40evf_driver);

static struct pci_driver i40evf_driver = {
.name = i40evf_driver_name,
.id_table = i40evf_pci_tbl,
.probe = i40evf_probe,
.remove = i40evf_remove,

#ifdef CONFIG_PM
.suspend = i40evf_suspend,
.resume = i40evf_resume,

#endif
.shutdown = i40evf_shutdown,
};

i40evf_probe
1) enable pcie device;

pci_enable_device(pdev);

2) set dma mask to 64bits or 32bits

dma_set_mask_and_coherent();

3) request regions, indicate this pdev belonged to this driver

pci_request_regions(pdev, i40evf_driver_name);

4) enable error report, pcie device have its own error report machisum

pci_enable_pcie_error_reporting(pdev);

5) set pci master, then the device can access the DDR

pci_set_master(pdev);

6) alloc net device, mac support 16 queues

alloc_etherdev_mq(sizeof(struct i40evf_adapter), MAX_QUEUES);

7) set netdev dev

SET_NETDEV_DEV(netdev, &pdev->dev);
pci_set_drvdata(pdev, netdev);

8) adapter initialize

hw = &adapter->hw;
hw->back = adapter;

9) get mem base address

hw->hw_addr = ioremap(pci_resource_start(pdev, 0),
              pci_resource_len(pdev, 0));

10) get the vendor_id, device_id, revision_id, susystem_vendor_id,
subsystem_device_id, bus_id, bus_func;

11) initialize two lock(ASQ and ARQ) for admin queue

12) initialize two list(mac, vlan) for filter

13) 4 work queue

i40evf_reset_task
i40evf_adminq_task
i40evf_watchdog_task
i40evf_init_task(delayed work queue)

14) call i40evf_init_task

schedule_delayed_work(&adapter->init_task,
              secs_to_jiffies(5 * (pdev->devfn & 0x07)));

HNS Analysize

发表于 2016-10-01

In this file I will analysize the HNS network dirvers
The hnae driver start by using class_create to create a new class name “hnae”.
After that, this driver provide some function for other module (hns_dsaf and
hns_enet_drv) to use. This funtions are as below:

hnae_register_notifier
hnae_unregister_notifier

hnae_get_handle
hnae_put_handle
hnae_reinit_handle

hnae_ae_register
hnae_ae_unregister

在ubuntu上截图

发表于 2016-09-12

如何在不安装第三方工具的情况下,Ubuntu如何截图呢?这个问题一直困扰着我,今天终于找到一个不借用其他工具,使用Ubuntu系统自带的工具就可以完成截图了,这个工具就是gnome-screenshot。
先看帮助文档:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$ gnome-screenshot --help
Usage:
gnome-screenshot [OPTION...]
Help Options:
-h, --help Show help options
--help-all Show all help options
--help-gapplication Show GApplication options
--help-gtk Show GTK+ Options
Application Options:
-c, --clipboard Send the grab directly to the clipboard
-w, --window Grab a window instead of the entire screen
-a, --area Grab an area of the screen instead of the entire screen
-b, --include-border Include the window border with the screenshot
-B, --remove-border Remove the window border from the screenshot
-p, --include-pointer Include the pointer with the screenshot
-d, --delay=seconds Take screenshot after specified delay [in seconds]
-e, --border-effect=effect Effect to add to the border (shadow, border, vintage or none)
-i, --interactive Interactively set options
-f, --file=filename Save screenshot directly to this file
--version Print version information and exit
--display=DISPLAY X display to use

说一下主要的选项
-a: 选择区域
-w: 选择窗口
-c: 直接拷贝到剪贴板
-f: 直接保存到文件
常用的就是这几项了,所以可以省去安装什么shullter之类的工具了,如果仅仅是截图的话,还是挺方便的。

我的2015

发表于 2015-07-03

#2015年已经过完了一年

My New Post

发表于 2015-06-13

今晚在做小二班的logo时,发现了一个生成logo网站,虽然不能保存为jpg格式,但可以自己通过截图软件保存下来,效果还是不错的,总比自己用PS做好看点:)
网站地址http://in.01w.com/logodesign.php

天无

天无

9 日志
RSS
© 2017 天无
由 Hexo 强力驱动
主题 - NexT.Pisces